当前位置: 首页 > news >正文

SalescustomerController

目录

1、 SalescustomerController

1.1、 /// 查询

1.1.1、 CustomerCode = tbSales.CustomerCode,//客户编号

1.1.2、 //客户名称

1.2、 /// 修改

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="bsgridPage"></param>

        /// <returns></returns>

        public ActionResult SelectSales(BsgridPage bsgridPage, int RegionID)

        {

            var listSales = (from tbSales in myModels.SYS_SalesCustomer

                             join tbCustomerType in myModels.SYS_CustomerType on tbSales.CustomerTypeID equals tbCustomerType.CustomerTypeID

                             join tbCustomerLevel in myModels.SYS_CustomerLevel on tbSales.CustomerLevelID equals tbCustomerLevel.CustomerLevelID

                             join tbRegion in myModels.SYS_Region on tbSales.RegionID equals tbRegion.RegionID

                             join tbCustomerSou in myModels.SYS_CustomerSou on tbSales.CustomerSouID equals tbCustomerSou.CustomerSouID

                             join tbPayment in myModels.SYS_Payment on tbSales.PaymentID equals tbPayment.PaymentID

                             join tbUser in myModels.PW_User on tbSales.UserID equals tbUser.UserID

                             select new SalesVo

                             {

                                 RegionID = tbRegion.RegionID,//客户区域ID

                                 SalesCustomerID = tbSales.SalesCustomerID,//销售客户ID

      1.                                  CustomerCode = tbSales.CustomerCode,//客户编号

                                 CustomerName = tbSales.CustomerName,

      1. //客户名称

                                 FullName = tbSales.FullName,//全称

                                 CustomerType = tbCustomerType.CustomerType,//客户类别

                                 CustomerLevel = tbCustomerLevel.CustomerLevel,//客户等级

                                 RegionName = tbRegion.RegionName,//客户区域

                                 CustomerSou = tbCustomerSou.CustomerSou,//客户来源

                                 Contacts = tbSales.Contacts,//联系人

                                 TelePhone = tbSales.TelePhone,//电话

                                 MobilePhone = tbSales.MobilePhone,//手机

                                 IdNumber = tbSales.IdNumber,//身份证

                                 Address = tbSales.Address,//地址

                                 ZipCode = tbSales.ZipCode,//邮箱

                                 UserName = tbUser.UserName,//业务员

                                 ToDeactivate = tbSales.ToDeactivate,//停用标志

                                 PaymentName = tbPayment.PaymentName,//付款方式

                                 InputPerson = tbSales.InputPerson,//录入人

                                 Remark = tbSales.Remark,//备注

                             }).ToList();

            if (RegionID > 0)

            {

                listSales = listSales.Where(m => m.RegionID == RegionID).ToList();

            }

            int count = listSales.Count();

            List<SalesVo> listFittingsInfo = listSales.OrderByDescending(m => RegionID).Skip(bsgridPage.GetStartIndex()).Take(bsgridPage.pageSize).ToList();

            Bsgrid<SalesVo> bsgrid = new Bsgrid<SalesVo>()

            {

                success = true,

                totalRows = count,

                curPage = bsgridPage.curPage,

                data = listFittingsInfo,

            };

            return Json(bsgrid, JsonRequestBehavior.AllowGet);

        }

       


http://www.mrgr.cn/news/30665.html

相关文章:

  • Agent Zero
  • 谷歌论文提前揭示o1模型原理:AI大模型竞争或转向硬件
  • Golang | Leetcode Golang题解之第417题太平洋大西洋水流问题
  • 视觉 注意力机制——通道注意力、空间注意力、自注意力、交叉注意力
  • C# 访问Access存取图片
  • 软件安全最佳实践:首先关注的地方
  • 【macOS】【Python】安装Python到虚拟环境的命令
  • 版本控制之Git
  • 电力施工作业安全行为检测图像数据集
  • 算法打卡 Day41(动态规划)-理论基础 + 斐波那契数 + 爬楼梯 + 使用最小花费爬楼梯
  • MATLAB矩阵下标引用
  • 图数据库之HugeGraph
  • 深度学习笔记(8)预训练模型
  • Linux文件系统
  • 8.1差分边缘检测
  • 介绍几个AI生成视频的工具
  • 新发布的OpenAI o1生成式AI模型在强化学习方面迈出了重要的一步
  • iptables 基础示例
  • 电脑维修的基本原则
  • AI助力智慧农田作物病虫害监测,基于YOLOv8全系列【n/s/m/l/x】参数模型开发构建花田作物种植场景下棉花作物常见病虫害检测识别系统