From d789099e9dc45e7fa3ee0eb73ee97f80b1963466 Mon Sep 17 00:00:00 2001 From: CB2-20200827ONU\Administrator <liaoxujun@qq.com> Date: 星期五, 08 十月 2021 09:23:47 +0800 Subject: [PATCH] no message --- CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsList.aspx.cs | 21 +++++++++++++++++++++ 1 files changed, 21 insertions(+), 0 deletions(-) diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsList.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsList.aspx.cs index bd89264..aed7ac1 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsList.aspx.cs +++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/CorporateClientsList.aspx.cs @@ -11,6 +11,7 @@ using CY.BLL.Sys; using CY.BLL.OA; using CY.SQLDAL; +using System.Data.SqlClient; namespace CY.WebForm.Pages.business { @@ -155,6 +156,26 @@ item.LessOrderMoneyProperty = item.Contractmoney-item.OrderMoney; item.NoOverOderCount = bll_eC_OrderBasicDAL.GetOrderById(item.Keyid, -1).Count; + Database DC = new Database(); + try + { + + string sqlStr = string.Format("select count(*) from [dbo].[OA_CorporateClientContract] where CorporateClientsid='{0}'", item.Keyid); + SqlCommand myCmd = new SqlCommand(sqlStr, DC.Connection); + item.ContractCount = (int)myCmd.ExecuteScalar(); + } + catch (Exception) + { + + item.ContractCount = 0; + } + finally + { + if (DC.Connection.State != System.Data.ConnectionState.Closed) + DC.Connection.Close(); + } + + } this.RepClientList.DataBind(); UCPager1.AspNetPager.RecordCount = pa.RecordCount; -- Gitblit v1.9.1