예제 #1
0
        protected void List_SelectedIndexChanging(object sender, GridViewSelectEventArgs e)
        {
            this.List.SelectedIndex = e.NewSelectedIndex;
            string no = this.List.DataKeys[this.List.SelectedIndex]["PRHNO"].ToString();

            //绑定详情列表
            //DetailLabel.Visible = true;
            using (PurProvider purProvider = new PurProvider())
            {
                DetailList.DataSource = purProvider.GetPRCheckDetail(no);
            }
            DetailList.DataBind();
        }
예제 #2
0
        /// <summary>
        /// 绑定列表
        /// </summary>
        private void BindList()
        {
            using (ContractProvider contProvider = new ContractProvider())
            {
                string dFrom = string.IsNullOrWhiteSpace(DateFrom.Text.Trim()) ? string.Empty :
                               LocalGlobal.ConvertDateFormat(DateFrom.Text.Trim()).ToString("yyyyMMdd");
                string dTo = string.IsNullOrWhiteSpace(DateTo.Text.Trim()) ? string.Empty :
                             LocalGlobal.ConvertDateFormat(DateTo.Text.Trim()).ToString("yyyyMMdd");

                List.DataSource = contProvider.GetContractList(ORDNO.Text.Trim(), CUSTNO.Text.Trim(), CUSTNAME.Text.Trim(), dFrom, dTo);
            }
            List.DataBind();

            this.List.SelectedIndex = -1;
            DetailList.DataSource   = null;
            DetailList.DataBind();
        }