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"]; QualityCheckBLL bll = null; WHQualityCheck info = new WHQualityCheck(); DataGridResult <WHQualityCheckResult> pList = new DataGridResult <WHQualityCheckResult>(); try { bll = BLLFactory.CreateBLL <QualityCheckBLL>(); int seq = 1; if (string.IsNullOrEmpty(id) == false) { info.ID = id; info = bll.Get(info); UIBindHelper.BindForm(this.Page, info); if (info.CheckResult == "0") { RB1.Checked = true; } else { RB2.Checked = true; } this.BillNoList.Items.Add(new ListItem(info.InStockBillNo, info.BillID)); this.BillNoList.SelectedValue = info.BillID; this.BillNoList.Enabled = false; this.hiID.Value = info.ID; this.HiCREATEUSER.Value = info.CREATEUSER; this.HiCREATETIME.Value = info.CREATETIME.ToString(); List <WHQualityCheckResult> list = bll.GetResultList(id); foreach (WHQualityCheckResult detail in list) { detail.DeleteAction = "deleteF(\'" + detail.FileName + "\')"; detail.DetailAction = "viewF(\'" + detail.FileName + "\')"; detail.SEQ = seq++; } pList.Total = list.Count; pList.Rows = list; } else { info = new WHQualityCheck(); this.BillNO.Text = bll.GetNewBillNO(); info.CheckPerson = GetLoginInfo().UserName; pList.Total = 0; pList.Rows = new List <WHQualityCheckResult>(); UIBindHelper.BindForm(this.Page, info); } this.hiPList.Value = pList.GetJsonSource(); } catch (Exception ex) { throw ex; } }
private void BindData() { string id = Request.QueryString["id"]; ProcessInfoBLL bll = null; Manage.Entity.MES.ProcessInfo info = new Manage.Entity.MES.ProcessInfo(); DataGridResult <EquipmentRef> eqList = new DataGridResult <EquipmentRef>(); DataGridResult <StationRef> wsList = new DataGridResult <StationRef>(); try { bll = BLLFactory.CreateBLL <ProcessInfoBLL>(); if (string.IsNullOrEmpty(id) == false) { info.PID = id; info = bll.Get(info); UIBindHelper.BindForm(this.Page, info); this.hiID.Value = info.PID; this.HiCREATEUSER.Value = info.CREATEUSER; this.HiCREATETIME.Value = info.CREATETIME.ToString(); List <EquipmentRef> eqlist = bll.GetEList(id); foreach (EquipmentRef item in eqlist) { item.DeleteAction = "deleteEQ('" + item.EQID + "')"; } List <StationRef> wslist = bll.GetSList(id); foreach (StationRef item in wslist) { item.DeleteAction = "deleteWS('" + item.STID + "')"; } wsList.Total = wslist.Count; wsList.Rows = wslist; eqList.Total = eqlist.Count; eqList.Rows = eqlist; this.HiFLOWID.Value = info.FLOWID; } else { string flowID = Request.QueryString["flowID"]; info = new ProcessInfo(); info.FLOWID = flowID; wsList.Total = 0; wsList.Rows = new List <StationRef>(); eqList.Total = 0; eqList.Rows = new List <EquipmentRef>(); } this.HiFLOWID.Value = info.FLOWID; this.hiWSList.Value = wsList.GetJsonSource(); this.hiEQList.Value = eqList.GetJsonSource(); } catch (Exception ex) { throw ex; } }
protected void Page_Load(object sender, EventArgs e) { if (this.IsPostBack == false) { DataGridResult <GoodPackingForm> matList = new DataGridResult <GoodPackingForm>(); matList.Total = 0; matList.Rows = new List <GoodPackingForm>(); this.hiMatList.Value = matList.GetJsonSource(); } }
private void BindData() { string id = Request.QueryString["id"]; OutStockBLL bll = null; OutStockBill info = new OutStockBill(); try { bll = BLLFactory.CreateBLL <OutStockBLL>(); if (string.IsNullOrEmpty(id) == false) { info.ID = id; info = bll.GetInfo(info); info.Details = info.Details.OrderBy(p => p.Seq).ToList(); UIBindHelper.BindForm(this.Page, info); this.hiID.Value = info.ID; this.HiCREATEUSER.Value = info.CREATEUSER; this.HiUPDATEUSER.Value = info.UPDATEUSER; this.HiCREATETIME.Value = info.CREATETIME.ToString(); this.btAdd.Visible = false; this.BillDate.Text = info.BillDate.ToString("yyyy年MM月dd日"); } else { info = new OutStockBill(); info.Details = new List <OutStockDetail>(); this.BillNO.Text = bll.GetNewBillNO(); this.BillDate.Text = DateTime.Now.ToString("yyyy年MM月dd日"); } //绑定明细 DataGridResult <OutStockDetail> matList = new DataGridResult <OutStockDetail>(); matList.Total = 0; matList.Rows = info.Details; foreach (OutStockDetail detail in info.Details) { detail.UnitName = string.IsNullOrEmpty(detail.UnitName) == false ? detail.UnitName : detail.MainUnitName; detail.OutSpecName = string.IsNullOrEmpty(detail.OutSpecName) == false ? detail.OutSpecName : detail.SpecCode; if (detail.OutAmount == 0) { detail.OutAmount = detail.MainUnitAmount; detail.UnitName = detail.MainUnitName; } detail.DeleteAction = "none"; } this.hiMatList.Value = matList.GetJsonSource(); } catch (Exception ex) { throw ex; } }
private void BindData() { string id = Request.QueryString["id"]; SupplyInfoBLL bll = null; SupplyInfo info = new SupplyInfo(); try { bll = BLLFactory.CreateBLL <SupplyInfoBLL>(); if (!string.IsNullOrEmpty(id)) { info.PID = id; info = bll.Get(info); info.Details = bll.GetList(info.PID); UIBindHelper.BindForm(this.Page, info); this.FNAME.Text = info.FactoryName; this.PDNAME.Text = info.ProduceName; this.PLNAME.Text = info.PLName; this.DELIVERYDATE.Text = info.DELIVERYDATE.ToString("yyyy-MM-dd"); this.REMARK.Text = info.REMARK; this.hiID.Value = info.PID; this.HiCREATEUSER.Value = info.CREATEUSER; this.HiCREATETIME.Value = info.CREATETIME.ToString(); this.hiPlanID.Value = info.PLANID; this.PLNAME.Text = info.PLName; this.BatchNumber.Visible = true; this.PLANID.Visible = false; } else { info = new SupplyInfo(); info.Details = new List <SupplyMaterialInfo>(); this.BatchNumber.Visible = false; this.PLANID.Visible = true; } //绑定明细 DataGridResult <SupplyMaterialInfo> supplyMaterialInfo = new DataGridResult <SupplyMaterialInfo>(); supplyMaterialInfo.Total = info.Details.Count; supplyMaterialInfo.Rows = info.Details; foreach (SupplyMaterialInfo detail in info.Details) { detail.DeleteAction = "deleteItem(\'" + detail.MATRIALID + "\')"; } this.hiMaterialList.Value = supplyMaterialInfo.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; } }
private void BindData() { string id = Request.QueryString["id"]; ProduceDOMBLL bll = null; ProduceBOM info = new ProduceBOM(); try { bll = BLLFactory.CreateBLL <ProduceDOMBLL>(); if (!string.IsNullOrEmpty(id)) { info.PID = id; info = bll.Get(info); info.Details = bll.GetList(info.PID); UIBindHelper.BindForm(this.Page, info); this.hiID.Value = info.PID; this.HiCREATEUSER.Value = info.CREATEUSER; this.HiCREATETIME.Value = info.CREATETIME.ToString(); } else { info = new ProduceBOM(); info.Details = new List <BOMDetail>(); } //绑定明细 DataGridResult <BOMDetail> bomDetail = new DataGridResult <BOMDetail>(); bomDetail.Total = info.Details.Count; bomDetail.Rows = info.Details; foreach (BOMDetail detail in info.Details) { detail.DeleteAction = "deleteItem(\'" + detail.MATRIALID + "\')"; } this.hiBomDetailList.Value = bomDetail.GetJsonSource(); } catch (Exception ex) { throw ex; } }
/// <summary> /// 生成 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void btBuild_Click(object sender, EventArgs e) { CheckStockBill info = new CheckStockBill(); CheckStockBLL bll = null; bll = BLLFactory.CreateBLL <CheckStockBLL>(); info = bll.BuildBill(new CheckStockBill { Warehouse = this.Warehouse.SelectedValue, AreaID = this.AreaID.SelectedValue }); this.BillNO.Text = info.BillNO; //绑定明细 DataGridResult <CheckStockDetail> matList = new DataGridResult <CheckStockDetail>(); matList.Total = 0; matList.Rows = info.Details; this.hiCheckList.Value = matList.GetJsonSource(); }
private void BindData() { string id = Request.QueryString["id"]; UseMatBLL bll = null; UseMatBill info = new UseMatBill(); try { bll = BLLFactory.CreateBLL <UseMatBLL>(); if (!string.IsNullOrEmpty(id)) { info.PID = id; info = bll.Get(info); UIBindHelper.BindForm(this.Page, info); PDNAME.Text = info.ProduceName; FNAME.Text = info.FactoryName; REMARK.Text = info.REMARK; DELIVERYDATE.Text = info.DELIVERYDATE.ToString(); } //绑定明细 DataGridResult <UseMatAmount> supplyMaterialInfo = new DataGridResult <UseMatAmount>(); supplyMaterialInfo.Total = info.Amounts.Count; supplyMaterialInfo.Rows = info.Amounts; this.hiMaterialList.Value = supplyMaterialInfo.GetJsonSource(); DataGridResult <UseMatDetail> details = new DataGridResult <UseMatDetail>(); details.Total = info.Details.Count; details.Rows = info.Details; this.hiUseMatList.Value = details.GetJsonSource(); } catch (Exception ex) { throw ex; } }
private void BindData() { string id = Request.QueryString["id"]; WorkGroupBLL bll = null; WorkGroup info = new WorkGroup(); DataGridResult <WorkGroupRef> pList = new DataGridResult <WorkGroupRef>(); try { bll = BLLFactory.CreateBLL <WorkGroupBLL>(); if (string.IsNullOrEmpty(id) == false) { info.PID = id; info = bll.Get(info); UIBindHelper.BindForm(this.Page, info); this.hiID.Value = info.PID; this.HiCREATEUSER.Value = info.CREATEUSER; this.HiCREATETIME.Value = info.CREATETIME.ToString(); List <WorkGroupRef> list = bll.GetPList(id); pList.Total = list.Count; pList.Rows = list; } else { info = new WorkGroup(); pList.Total = 0; pList.Rows = new List <WorkGroupRef>(); } this.hiPList.Value = pList.GetJsonSource(); } catch (Exception ex) { throw ex; } }
private void BindData() { string id = Request.QueryString["id"]; QualityCheckBLL bll = null; QualityCheckInfo info = new QualityCheckInfo(); DataGridResult <QualityCheckResult> pList = new DataGridResult <QualityCheckResult>(); try { bll = BLLFactory.CreateBLL <QualityCheckBLL>(); int seq = 0; if (string.IsNullOrEmpty(id) == false) { info.ID = id; info = bll.Get(info); if (!string.IsNullOrEmpty(info.BatchNumber)) { QualityCheckBLL qcBll = BLLFactory.CreateBLL <QualityCheckBLL>(); QualityCheckInfo qualityCheckInfo = qcBll.GetPDInfo(info.BatchNumber); if (qualityCheckInfo != null) { info.PDDATE = qualityCheckInfo.PDDATE; info.PDCODE = qualityCheckInfo.PDCODE; info.PDNAME = qualityCheckInfo.PDNAME; } } UIBindHelper.BindForm(this.Page, info); if (info.CheckResult == "0") { RB1.Checked = true; } else { RB2.Checked = true; } this.BatchNumber.Enabled = false; this.hiID.Value = info.ID; this.HiCREATEUSER.Value = info.CREATEUSER; this.HiCREATETIME.Value = info.CREATETIME.ToString(); List <QualityCheckResult> list = bll.GetResultList(id); foreach (QualityCheckResult detail in list) { detail.DeleteAction = "deleteF(\'" + detail.FileName + "\')"; detail.DetailAction = "viewF(\'" + detail.FileName + "\')"; detail.SEQ = seq++; } pList.Total = list.Count; pList.Rows = list; } else { info = new QualityCheckInfo(); info.CheckPerson = GetLoginInfo().UserName; pList.Total = 0; pList.Rows = new List <QualityCheckResult>(); UIBindHelper.BindForm(this.Page, info); } this.hiPList.Value = pList.GetJsonSource(); } catch (Exception ex) { throw ex; } }