您的位置:首页 > 财经 > 产业 > vr看房制作软件_web程序设计用什么软件_合肥网站推广公司_西安sem竞价托管

vr看房制作软件_web程序设计用什么软件_合肥网站推广公司_西安sem竞价托管

2025/1/3 12:36:02 来源:https://blog.csdn.net/weixin_42132177/article/details/142355832  浏览:    关键词:vr看房制作软件_web程序设计用什么软件_合肥网站推广公司_西安sem竞价托管
vr看房制作软件_web程序设计用什么软件_合肥网站推广公司_西安sem竞价托管

目录

1、 SalescustomerController

1.1、 /// 修改

1.2、 /// 新增

1.2.1、 //判断销售客户表中是否已经存在新增的销售客户信息

using QXQPS.Models;

using QXQPS.Vo;

using System;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;

namespace QXQPS.Areas.BasicdataManagment.Controllers

{

  1. SalescustomerController 

    public class SalescustomerController : Controller

    {

        // GET: BasicdataManagment/Salescustomer

        Models.QXQPEntities myModels = new Models.QXQPEntities();

    1.         /// 修改

        /// </summary>

        /// <param name="SalesCustomerID"></param>

        /// <returns></returns>

        public ActionResult SelectSale(int SalesCustomerID)

        {

            var list = myModels.SYS_SalesCustomer.Where(m => m.SalesCustomerID == SalesCustomerID).Select(m => new

            {

                SalesCustomerID = m.SalesCustomerID,

                RegionID = m.RegionID,

                CustomerCode = m.CustomerCode,

                CustomerName = m.CustomerName,

                CustomerSouID = m.CustomerSouID,

                Address = m.Address,

                ZipCode = m.ZipCode,

                FullName = m.FullName,

                PinYinCode = m.PinYinCode,

                IdNumber = m.IdNumber,

                Contacts = m.Contacts,

                Facsimile = m.Facsimile,

                TelePhone = m.TelePhone,

                MobilePhone = m.MobilePhone,

                Emai = m.Emai,

                CustomerLevelID = m.CustomerLevelID,

                CustomerTypeID = m.CustomerTypeID,

                PaymentID = m.PaymentID,

                Remark = m.Remark,

                UserID = m.UserID,

                InputPerson = m.InputPerson,

                ToDeactivate = m.ToDeactivate,

            });

            return Json(list, JsonRequestBehavior.AllowGet);

        }

    1.         /// 新增

        /// </summary>

        /// <param name="Sales"></param>

        /// <returns></returns>

        public ActionResult InsertSales(SYS_SalesCustomer Sales)

        {

            string strMsg = "failed";

            try

            {

      1.                 //判断销售客户表中是否已经存在新增的销售客户信息

                var SalesCount = (from tbSales in myModels.SYS_SalesCustomer

                                  where tbSales.SalesCustomerID == Sales.SalesCustomerID ||

                                  tbSales.IdNumber == Sales.IdNumber

                                  select tbSales).Count();

                if (SalesCount == 0)

                {

                    if (Sales.CustomerName != null)

                    {

                        if (Sales.IdNumber != null)

                        {

                            if (Sales.CustomerCode != null)

                            {

                                myModels.SYS_SalesCustomer.Add(Sales);

                                myModels.SaveChanges();

                                strMsg = "success";

                            }

                            else

                            {

                                strMsg = "编号不能为空,请输入完整信息";

                            }

                        }

                        else

                        {

                            strMsg = "身份证不能为空,请输入完整信息";

                        }

                    }

                    else

                    {

                        strMsg = "客户名称不能为空,请输入完整信息";

                    }

                }

                else

                {

                    strMsg = "该销售客户信息已经存在,不需要重复输入数据!";

                }

            }

            catch (Exception e)

            {

                strMsg = "failed";

            }

            return Json(strMsg, JsonRequestBehavior.AllowGet);

        }

        /// <summary>

版权声明:

本网仅为发布的内容提供存储空间,不对发表、转载的内容提供任何形式的保证。凡本网注明“来源:XXX网络”的作品,均转载自其它媒体,著作权归作者所有,商业转载请联系作者获得授权,非商业转载请注明出处。

我们尊重并感谢每一位作者,均已注明文章来源和作者。如因作品内容、版权或其它问题,请及时与我们联系,联系邮箱:809451989@qq.com,投稿邮箱:809451989@qq.com