| | |
| | | using CY.BLL.Sys; |
| | | using CY.BLL.OA; |
| | | using CY.SQLDAL; |
| | | using System.Data.SqlClient; |
| | | |
| | | namespace CY.WebForm.Pages.business |
| | | { |
| | |
| | | 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; |