您的位置:首页 > 健康 > 养生 > 深圳纯手工seo_网页设计代码模板在哪找_现在如何进行网上推广_国外直播平台tiktok

深圳纯手工seo_网页设计代码模板在哪找_现在如何进行网上推广_国外直播平台tiktok

2024/12/5 21:35:28 来源:https://blog.csdn.net/weixin_42132177/article/details/143713845  浏览:    关键词:深圳纯手工seo_网页设计代码模板在哪找_现在如何进行网上推广_国外直播平台tiktok
深圳纯手工seo_网页设计代码模板在哪找_现在如何进行网上推广_国外直播平台tiktok

目录

1、 CustomersettleController

1.1、 查询结算单

1.1.1、 //结算单ID

1.1.2、 //客户编码

1.1.3、 //收款金额

1.1.4、 //单号

1.1.5、 // 审核

1.1.6、 //获取当前查询出来的数据的条数

  1. CustomersettleController 

using QXQPS.Models;

using QXQPS.Vo;

using System;

using System.Collections;

using System.Collections.Generic;

using System.Linq;

using System.Web;

using System.Web.Mvc;

namespace QXQPS.Areas.ProcurementManagment.Controllers

{

    public class CustomersettleController : Controller

    {

        QXQPEntities myModels = new QXQPEntities();

    1. 查询结算单

        public ActionResult Selectenciphers(BsgridPage bsgriPage, string Receipt, string ToAudit)//查询结算单

        {

            var listSalBalance = (from tbSalBalance in myModels.PW_SalBalance

                                  join tbSalesCustomer in myModels.SYS_SalesCustomer on tbSalBalance.SalesCustomerID equals tbSalesCustomer.SalesCustomerID

                                  orderby tbSalBalance.SalBalanceID descending

                                  select new SalBalanceVo

                                  {

                                      SalBalanceID = tbSalBalance.SalBalanceID,

      1. //结算单ID

                                      SalesCustomerID = tbSalesCustomer.SalesCustomerID,//客户ID

                                      CustomerCode = tbSalesCustomer.CustomerCode,

      1. //客户编码

                                      CustomerName = tbSalesCustomer.CustomerName,//客户名称

                                      ToAudit = tbSalBalance.ToAudit,//审核

                                      Receipt = tbSalBalance.Receipt,//单号

                                      Operator = tbSalBalance.Operator,//操作人

                                      ReceiptDates = tbSalBalance.ReceiptDate.ToString(),//单据日期

                                      ReceiptDate = tbSalBalance.ReceiptDate,//单据日期   

                                      CurrentMany = tbSalBalance.CurrentMany

      1. //收款金额

                                  }).ToList();

            #region 条件查询

      1.             //单号

            if (!string.IsNullOrEmpty(Receipt))

            {

                listSalBalance = listSalBalance.Where(m => m.Receipt.Contains(Receipt)).ToList();//模糊查询

            }

      1.             // 审核

            if (ToAudit == "1")

            {

                listSalBalance = listSalBalance.Where(m => m.ToAudit == true).ToList();

            }

            else if (ToAudit == "2")

            {

                listSalBalance = listSalBalance.Where(m => m.ToAudit == false).ToList();

            }

            #endregion

      1.             //获取当前查询出来的数据的条数

            var totalCount = listSalBalance.Count();

            List<SalBalanceVo> listItem = listSalBalance

                                          .Skip(bsgriPage.GetStartIndex()) //Skip取数据的位置

                                          .Take(bsgriPage.pageSize)  //Take取数据的条数

                                          .ToList();

            Bsgrid<SalBalanceVo> bsgrid = new Bsgrid<SalBalanceVo>()   //实例化对象

            {

                success = true,

                totalRows = totalCount,

                curPage = bsgriPage.curPage,

                data = listItem

            };

            return Json(bsgrid, JsonRequestBehavior.AllowGet);

        }

版权声明:

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

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