private void BindData() { string id = Request.QueryString["id"]; CheckStockBLL bll = null; CheckStockBill info = new CheckStockBill(); try { bll = BLLFactory.CreateBLL <CheckStockBLL>(); if (string.IsNullOrEmpty(id) == false) { info.ID = id; info = bll.GetInfo(info); UIBindHelper.BindForm(this.Page, info); this.hiID.Value = info.ID; this.HiCREATEUSER.Value = info.CREATEUSER; this.HiCREATETIME.Value = info.CREATETIME.ToString(); this.BillDate.Text = info.BillDate.ToString("yyyy-MM-dd"); } this.IsConfirmName.Text = info.IsConfirm == 0 ? "未确认" : "已确认"; //绑定明细 DataGridResult <CheckStockDetail> matList = new DataGridResult <CheckStockDetail>(); matList.Total = 0; matList.Rows = info.Details; this.hiCheckList.Value = matList.GetJsonSource(); } catch (Exception ex) { throw ex; } }
private void BindData() { string id = Request.QueryString["id"]; CheckStockBLL bll = null; CheckStockBill info = new CheckStockBill(); try { bll = BLLFactory.CreateBLL <CheckStockBLL>(); if (string.IsNullOrEmpty(id) == false) { info.ID = id; info = bll.GetInfo(info); UIBindHelper.BindForm(this.Page, info); this.hiID.Value = info.ID; this.HiCREATEUSER.Value = info.CREATEUSER; this.HiCREATETIME.Value = info.CREATETIME.ToString(); this.BillDate.Text = info.BillDate.ToString("yyyy-MM-dd"); this.btConfirm.Visible = true; this.btBuild.Visible = false; } else { info = new CheckStockBill(); info.Details = new List <CheckStockDetail>(); this.BillNO.Text = bll.GetNewBillNO(); this.BillDate.Text = DateTime.Now.ToString("yyyy-MM-dd"); LoginInfo user = this.GetLoginInfo(); this.CheckHeader.SelectedValue = user.UserID; } this.IsConfirmName.Text = info.IsConfirm == 0 ? "未确认" : "已确认"; //绑定明细 DataGridResult <CheckStockDetail> matList = new DataGridResult <CheckStockDetail>(); matList.Total = 0; matList.Rows = info.Details.OrderBy(p => p.Seq).ToList(); this.hiCheckList.Value = matList.GetJsonSource(); } catch (Exception ex) { throw ex; } }