CB2-20200827ONU\Administrator
2021-10-08 d789099e9dc45e7fa3ee0eb73ee97f80b1963466
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;