Exemple #1
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        private void BindList()
        {
            using (ContractProvider contProvider = new ContractProvider())
            {
                string date = DateTime.Now.ToString("yyyy-MM-dd");
                if (Limit.SelectedValue == "1")
                {
                    date = DateTime.Now.AddDays(15).ToString("yyyy-MM-dd");
                }
                else if (Limit.SelectedValue == "2")
                {
                    date = DateTime.Now.AddDays(30).ToString("yyyy-MM-dd");
                }
                else
                {
                    date = LimitDate.Text.Trim();
                }

                var table = contProvider.GetZbAlarmList(ORDNO.Text.Trim(), CUSTNO.Text.Trim(), date);
                List.DataSource = table;

                //剩余质保金总额
                decimal remainTotal = 0;
                foreach (DataRow row in table.Rows)
                {
                    remainTotal += Util.ToDecimal(row["remainzb"].ToString());
                }
                ZbRemainTotal.Text = remainTotal.ToString();
            }
            List.DataBind();
        }