protected void Page_Load(object sender, EventArgs e) { Msg msg = SiteStorageModel.QueryOutBunch(); if (msg.Status) { List <Tbl_SiteStorage> lBunch = msg.UserData as List <Tbl_SiteStorage>; StringBuilder sBuild = new StringBuilder(); if (this.CurrentUserInfo.Type == (int)LoginType.主管密码) { foreach (Tbl_SiteStorage oBunch in lBunch) { sBuild.Append("<a href='EditSiteOutBunch.aspx?BuildBunchId=" + oBunch.BuildBatchID + "'>构建批次:" + oBunch.BuildBatchID + "</a>"); } } else if (this.CurrentUserInfo.Type == (int)LoginType.确认密码) { foreach (Tbl_SiteStorage oBunch in lBunch) { sBuild.Append("<a href='EnsureSiteOutBunch.aspx?BuildBunchId=" + oBunch.BuildBatchID + "'>构建批次:" + oBunch.BuildBatchID + "</a>"); } } else //暂留 { } list.InnerHtml = sBuild.ToString(); } }
protected void Ensure_Click(object sender, EventArgs e) { Tbl_SiteStorage oBunch = new Tbl_SiteStorage(); oBunch.PlanID = int.Parse(txbPlanId.Value); oBunch.Time = DateTime.Now; oBunch.MateriesID = int.Parse(txbMateriesID.Value); oBunch.BuildBatchID = int.Parse(txbBuildBunchID.Value); oBunch.BuildID = txbBuildID.Value; oBunch.BuildName = txbBuildName.Value.ToString(); oBunch.MateriesType = txbMetriesType.Value.ToString(); oBunch.PreAdmTime = DateTime.Now; oBunch.PreAdmStatus = 128; oBunch.InCount = int.Parse(txbCount.Value); oBunch.NowAdmStatus = 1; oBunch.NowAdmTime = DateTime.Now; oBunch.MateriesTasbleID = 1; oBunch.ProjectName = txbProjectName.Value; oBunch.WorkMapID = txbProductNum.Value; Msg msg = SiteStorageModel.EnsureInBunch(int.Parse(txbBuildBunchID.Value), oBunch); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, msg.Message); } }
protected void Page_Load(object sender, EventArgs e) { Msg msg = SiteStorageModel.QueryStorage(); if (msg.Status) { List <Tbl_SiteStorage> lStorage = msg.UserData as List <Tbl_SiteStorage>; gdvStorage.DataSource = BuildGridViewDataSource(lStorage); gdvStorage.DataBind(); } }
protected void Ensure_Click(object sender, EventArgs e) { Msg msg = SiteStorageModel.EnsureOutBunch(int.Parse(txbBuildBunchID.Value), int.Parse(txbCount.Value)); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, msg.Message); } }
protected void Page_Load(object sender, EventArgs e) { string sBuildBunchId = this.Request["BuildBunchId"]; Msg msg = SiteStorageModel.QueryInBunchById(int.Parse(sBuildBunchId)); if (msg.Status) { Tbl_SiteStorageBatch oBunch = msg.UserData as Tbl_SiteStorageBatch; txbPlanId.Value = oBunch.PlanID.ToString(); txbMateriesID.Value = oBunch.MateriesID.ToString(); txbBuildID.Value = oBunch.BuildID.ToString(); txbBuildName.Value = oBunch.BuildName; txbCount.Value = oBunch.Count.ToString(); txbMetriesType.Value = oBunch.MateriesType; txbProjectName.Value = oBunch.ProjectName; txbBuildBunchID.Value = oBunch.BuildBatchID.ToString(); txbProductNum.Value = oBunch.WorkMapID.ToString(); } }
protected void ensure_Click(object sender, EventArgs e) { bool isHave = SiteStorageModel.QueryOutBunchById(int.Parse(txbBuildBunchID.Value)); if (isHave) { Msg msg = SiteStorageModel.UpdateOutBunch(int.Parse(txbBuildBunchID.Value), int.Parse(txbCount.Value)); if (msg.Status) { PageHelper.ShowAlertMsg(this, "编辑成功"); } else { PageHelper.ShowAlertMsg(this, msg.Message); } } else { Tbl_OutSiteStorage oBunch = new Tbl_OutSiteStorage(); oBunch.PlanID = int.Parse(txbPlanId.Value); oBunch.Time = DateTime.Now; oBunch.MateriesID = int.Parse(txbMateriesID.Value); oBunch.BuildID = txbBuildID.Value; oBunch.BuildName = txbBuildName.Value.ToString(); oBunch.MateriesType = txbMetriesType.Value.ToString(); oBunch.PreAdmTime = DateTime.Now; oBunch.Count = int.Parse(txbCount.Value); oBunch.BuildBatchID = int.Parse(txbBuildBunchID.Value); oBunch.ProjectName = txbProjectName.Value; oBunch.MateriesTasbleID = 0; oBunch.Time = DateTime.Now; oBunch.WorkMapID = txbProductNum.Value; Msg msg = SiteStorageModel.EditOutBunch(oBunch); if (msg.Status) { PageHelper.ShowAlertMsg(this, "编辑成功"); } else { PageHelper.ShowAlertMsg(this, msg.Message); } } }
protected void Page_Load(object sender, EventArgs e) { string BuildBunchId = this.Request["BuildBunchId"]; Msg msg = SiteStorageModel.QueryStorageById(int.Parse(BuildBunchId)); Tbl_SiteStorage oStorage = msg.UserData as Tbl_SiteStorage; if (oStorage != null) { txbPlanId.Value = oStorage.PlanID.ToString(); txbMateriesID.Value = oStorage.MateriesID.ToString(); txbBuildID.Value = oStorage.BuildID.ToString(); txbBuildName.Value = oStorage.BuildName; txbCount.Value = oStorage.InCount.ToString(); txbMetriesType.Value = oStorage.MateriesType; txbProjectName.Value = oStorage.ProjectName; txbBuildBunchID.Value = oStorage.BuildBatchID.ToString(); txbProductNum.Value = oStorage.WorkMapID.ToString(); } }
protected void Page_Load(object sender, EventArgs e) { ReturnMsg ret = new ReturnMsg(); ret.Status = 0; this.Response.ContentType = "text/plain"; JavaScriptSerializer jss = new JavaScriptSerializer(); string sImei = this.Request["imei"]; string Id = this.Request["username"]; string table = this.Request["tablename"]; if (table != null) { if (table.Equals("Tbl_Materies")) { Msg msg = MetriesModel.AndroidEnsure(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_ProductBatch")) { Msg msg = ProductModel.AndroidInBunch(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_OutProductBatch")) { Msg msg = ProductModel.AndroidOutEnsure(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_CenterStorageBatch")) { Msg msg = Center.AndroidInEnsure(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_OutCenterStorage")) { Msg msg = Center.AndroidOutBatch(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_SiteStorageBatch")) { Msg msg = SiteStorageModel.AndroidInEnsure(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_OutSiteStorage")) { Msg msg = SiteStorageModel.AndroidOutBatch(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else { ret.Status = 0; } } this.Response.Write(jss.Serialize(ret)); }
private void Save(object data, int identify) { if (identify == (int)CurrentType.加工登录入库) { List <Tbl_Materies> lMa = data as List <Tbl_Materies>; List <Tbl_ProductBatch> lObj = new List <Tbl_ProductBatch>(); foreach (Tbl_Materies oPro in lMa) { Tbl_ProductBatch oSto = new Tbl_ProductBatch(); oSto.BuildID = oPro.BuildNum; oSto.BuildName = oPro.BuildName; oSto.Count = oPro.TotalNum; oSto.MateriesID = oPro.MateriesID; oSto.MateriesTasbleID = 0; oSto.MateriesType = oPro.MateriesType; oSto.PlanID = oPro.PlanID; oSto.PreAdmStatus = 1; oSto.PreAdmTime = DateTime.Now; oSto.NowAdmStatus = 1; oSto.NowAdmTime = DateTime.Now; oSto.ProjectName = oPro.ProjectName; oSto.Time = DateTime.Now; oSto.WorkMapID = oPro.ProcessingNum; lObj.Add(oSto); } Msg msg = ProductModel.NEditInBunch(lObj); if (msg.Status) { PageHelper.ShowAlertMsg(this, "编辑成功"); } // CallBack call = ReturnMsg; // Thread thread = new Thread(() => GetBarCode(lObj, call)); // thread.IsBackground = true; // thread.Start(); } else if (identify == (int)CurrentType.加工确认入库) { List <Tbl_ProductBatch> lMa = data as List <Tbl_ProductBatch>; List <Tbl_ProductStorage> lObj = new List <Tbl_ProductStorage>(); foreach (Tbl_ProductBatch oPro in lMa) { Tbl_ProductStorage oSto = new Tbl_ProductStorage(); oSto.BuildBatchID = (int)oPro.BuildBatchID; oSto.BuildID = oPro.BuildID; oSto.BuildName = oPro.BuildName; oSto.InCount = oPro.Count; oSto.MateriesID = oPro.MateriesID; oSto.MateriesTasbleID = oPro.MateriesTasbleID; oSto.MateriesType = oPro.MateriesType; oSto.PlanID = oPro.PlanID; oSto.PreAdmStatus = 128; oSto.PreAdmTime = DateTime.Now; oSto.NowAdmStatus = 1; oSto.NowAdmTime = DateTime.Now; oSto.ProjectName = oPro.ProjectName; oSto.Time = DateTime.Now; oSto.WorkMapID = oPro.WorkMapID; lObj.Add(oSto); } Msg msg = ProductModel.NEnsureInBunch(lObj); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message); } } else if (identify == (int)CurrentType.加工登录出库) { List <Tbl_ProductStorage> lMa = data as List <Tbl_ProductStorage>; List <Tbl_OutProductBatch> lObj = new List <Tbl_OutProductBatch>(); foreach (Tbl_ProductStorage oPro in lMa) { Tbl_OutProductBatch oSto = new Tbl_OutProductBatch(); oSto.BuildBatchID = (int)oPro.BuildBatchID; oSto.BuildID = oPro.BuildID; oSto.BuildName = oPro.BuildName; oSto.Count = oPro.InCount == null?0:(int)oPro.InCount; oSto.MateriesID = oPro.MateriesID; oSto.MateriesTasbleID = oPro.MateriesTasbleID; oSto.MateriesType = oPro.MateriesType; oSto.PlanID = oPro.PlanID; oSto.PreAdmStatus = 1; oSto.PreAdmTime = DateTime.Now; oSto.NowAdmStatus = 1; oSto.NowAdmTime = DateTime.Now; oSto.ProjectName = oPro.ProjectName; oSto.Time = DateTime.Now; oSto.WorkMapID = oPro.WorkMapID; lObj.Add(oSto); } Msg msg = ProductModel.NEditOurBunch(lObj); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message); } } else if (identify == (int)CurrentType.加工确认出库) { List <Tbl_OutProductBatch> lMa = data as List <Tbl_OutProductBatch>; List <Tbl_CenterStorageBatch> lObj = new List <Tbl_CenterStorageBatch>(); foreach (Tbl_OutProductBatch oPro in lMa) { Tbl_CenterStorageBatch oSto = new Tbl_CenterStorageBatch(); oSto.BuildBatchID = (int)oPro.BuildBatchID; oSto.BuildID = oPro.BuildID; oSto.BuildName = oPro.BuildName; oSto.Count = oPro.Count; oSto.MateriesID = oPro.MateriesID; oSto.MateriesTasbleID = oPro.MateriesTasbleID; oSto.MateriesType = oPro.MateriesType; oSto.PlanID = oPro.PlanID; oSto.PreAdmStatus = 128; oSto.PreAdmTime = DateTime.Now; oSto.NowAdmStatus = 1; oSto.NowAdmTime = DateTime.Now; oSto.ProjectName = oPro.ProjectName; oSto.Time = DateTime.Now; oSto.WorkMapID = oPro.WorkMapID; lObj.Add(oSto); } Msg msg = ProductModel.NEnsureOutBunch(lObj); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message); } } else if (identify == (int)CurrentType.中心确认入库) { List <Tbl_CenterStorageBatch> lMa = data as List <Tbl_CenterStorageBatch>; List <Tbl_CenterStorage> lObj = new List <Tbl_CenterStorage>(); foreach (Tbl_CenterStorageBatch oPro in lMa) { Tbl_CenterStorage oSto = new Tbl_CenterStorage(); oSto.BuildBatchID = (int)oPro.BuildBatchID; oSto.BuildID = oPro.BuildID; oSto.BuildName = oPro.BuildName; oSto.InCount = oPro.Count; oSto.MateriesID = oPro.MateriesID; oSto.MateriesTasbleID = oPro.MateriesTasbleID; oSto.MateriesType = oPro.MateriesType; oSto.PlanID = oPro.PlanID; oSto.PreAdmStatus = 128; oSto.PreAdmTime = DateTime.Now; oSto.NowAdmStatus = 1; oSto.NowAdmTime = DateTime.Now; oSto.ProjectName = oPro.ProjectName; oSto.Time = DateTime.Now; oSto.WorkMapID = oPro.WorkMapID; lObj.Add(oSto); } Msg msg = Center.NEnsureInBunch(lObj); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message); } } else if (identify == (int)CurrentType.中心登录出库) { List <Tbl_CenterStorage> lMa = data as List <Tbl_CenterStorage>; List <Tbl_OutCenterStorage> lObj = new List <Tbl_OutCenterStorage>(); foreach (Tbl_CenterStorage oPro in lMa) { Tbl_OutCenterStorage oSto = new Tbl_OutCenterStorage(); oSto.BuildBatchID = (int)oPro.BuildBatchID; oSto.BuildID = oPro.BuildID; oSto.BuildName = oPro.BuildName; oSto.Count = oPro.Count; oSto.MateriesID = oPro.MateriesID; oSto.MateriesTasbleID = oPro.MateriesTasbleID; oSto.MateriesType = oPro.MateriesType; oSto.PlanID = oPro.PlanID; oSto.PreAdmStatus = 1; oSto.PreAdmTime = DateTime.Now; oSto.ProjectName = oPro.ProjectName; oSto.Time = DateTime.Now; oSto.WorkMapID = oPro.WorkMapID; lObj.Add(oSto); } Msg msg = Center.NEditOutBunch(lObj); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message); } } else if (identify == (int)CurrentType.中心确认出库) { List <Tbl_OutCenterStorage> lMa = data as List <Tbl_OutCenterStorage>; List <Tbl_SiteStorageBatch> lObj = new List <Tbl_SiteStorageBatch>(); foreach (Tbl_OutCenterStorage oPro in lMa) { Tbl_SiteStorageBatch oSto = new Tbl_SiteStorageBatch(); oSto.BuildBatchID = (int)oPro.BuildBatchID; oSto.BuildID = oPro.BuildID; oSto.BuildName = oPro.BuildName; oSto.Count = oPro.Count; oSto.MateriesID = oPro.MateriesID; oSto.MateriesTasbleID = oPro.MateriesTasbleID; oSto.MateriesType = oPro.MateriesType; oSto.PlanID = oPro.PlanID; oSto.PreAdmStatus = 128; oSto.PreAdmTime = DateTime.Now; oSto.ProjectName = oPro.ProjectName; oSto.Time = DateTime.Now; oSto.WorkMapID = oPro.WorkMapID; lObj.Add(oSto); } Msg msg = Center.NEnsureOutBunch(lObj); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message); } } else if (identify == (int)CurrentType.现场确认入库) { List <Tbl_SiteStorageBatch> lMa = data as List <Tbl_SiteStorageBatch>; List <Tbl_SiteStorage> lObj = new List <Tbl_SiteStorage>(); foreach (Tbl_SiteStorageBatch oPro in lMa) { Tbl_SiteStorage oSto = new Tbl_SiteStorage(); oSto.BuildBatchID = (int)oPro.BuildBatchID; oSto.BuildID = oPro.BuildID; oSto.BuildName = oPro.BuildName; oSto.InCount = oPro.Count; oSto.MateriesID = oPro.MateriesID; oSto.MateriesTasbleID = oPro.MateriesTasbleID; oSto.MateriesType = oPro.MateriesType; oSto.PlanID = oPro.PlanID; oSto.PreAdmStatus = 128; oSto.PreAdmTime = DateTime.Now; oSto.ProjectName = oPro.ProjectName; oSto.Time = DateTime.Now; oSto.WorkMapID = oPro.WorkMapID; lObj.Add(oSto); } Msg msg = SiteStorageModel.NEnsureInBunch(lObj); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message); } } else if (identify == (int)CurrentType.现场登录出库) { List <Tbl_SiteStorage> lMa = data as List <Tbl_SiteStorage>; List <Tbl_OutSiteStorage> lObj = new List <Tbl_OutSiteStorage>(); foreach (Tbl_SiteStorage oPro in lMa) { Tbl_OutSiteStorage oSto = new Tbl_OutSiteStorage(); oSto.BuildBatchID = (int)oPro.BuildBatchID; oSto.BuildID = oPro.BuildID; oSto.BuildName = oPro.BuildName; oSto.Count = oPro.Count; oSto.MateriesID = oPro.MateriesID; oSto.MateriesTasbleID = oPro.MateriesTasbleID; oSto.MateriesType = oPro.MateriesType; oSto.PlanID = oPro.PlanID; oSto.PreAdmStatus = 1; oSto.PreAdmTime = DateTime.Now; oSto.ProjectName = oPro.ProjectName; oSto.Time = DateTime.Now; oSto.WorkMapID = oPro.WorkMapID; lObj.Add(oSto); } Msg msg = SiteStorageModel.NEditOutBunch(lObj); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message); } } else if (identify == (int)CurrentType.现场确认出库) { List <Tbl_OutSiteStorage> lMa = data as List <Tbl_OutSiteStorage>; Msg msg = SiteStorageModel.EnsureOutBunch(lMa); if (msg.Status) { PageHelper.ShowAlertMsg(this, "确认成功"); } else { PageHelper.ShowAlertMsg(this, "确认失败:" + msg.Message); } } }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { string palnId = this.Request["PlanID"]; string type = this.Request["Type"]; StringBuilder build = new StringBuilder(); int iPlanId = int.Parse(palnId); Msg planMsg = PlanModel.QyeryPlanById(iPlanId); if (planMsg.Status) { planName.InnerText = "用户导航:" + (planMsg.UserData as Tbl_Plan).ProjectName + "信息"; } if (this.CurrentUserInfo.Type == (int)LoginType.主管密码) { if (int.Parse(type) == (int)BatchStatus.加工仓库入库待审批) { Msg msg = ProductModel.NGetAllMetaries(int.Parse(palnId)); if (msg.Status) { List <Tbl_Materies> lMetries = msg.UserData as List <Tbl_Materies>; ViewState["ListData"] = lMetries; ViewState["Identify"] = (int)CurrentType.加工登录入库; if (lMetries.Count > 0) { for (int i = 0; i < lMetries.Count; i++) { //div的事件onclick='urlLocation(" + i + ")' build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='EditProductInBunch.aspx?MateriesID=" + lMetries[i].MateriesID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' /><strong><a href='EditProductInBunch.aspx?MateriesID=" + lMetries[i].MateriesID + "'>材料编号:" + lMetries[i].MateriesID + "</a></strong></div></li>"); } } } } else if (int.Parse(type) == (int)BatchStatus.加工仓库待出库审批) { Msg msg = ProductModel.NQueryProductOutBunch(iPlanId); if (msg.Status) { List <Tbl_ProductStorage> lStorage = msg.UserData as List <Tbl_ProductStorage>; ViewState["ListData"] = lStorage; ViewState["Identify"] = (int)CurrentType.加工登录出库; if (lStorage.Count > 0) { for (int i = 0; i < lStorage.Count; i++) { build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='EditProductOutBunch.aspx?BuildBunchId=" + lStorage[i].BuildBatchID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' /><strong><a href='EditProductOutBunch.aspx?BuildBunchId=" + lStorage[i].BuildBatchID + "'>材料编号:" + lStorage[i].BuildBatchID + "</a></strong></div></li>"); } } } } else if (int.Parse(type) == (int)BatchStatus.中心仓库待出库审批) { Msg msg = Center.NQueryOutBunch(iPlanId); if (msg.Status) { List <Tbl_CenterStorage> lStorage = msg.UserData as List <Tbl_CenterStorage>; ViewState["ListData"] = lStorage; ViewState["Identify"] = (int)CurrentType.中心登录出库; if (lStorage.Count > 0) { for (int i = 0; i < lStorage.Count; i++) { build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='CenterStorage/EditOutBunch.aspx?BuildBunchId=" + lStorage[i].BuildBatchID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' ' /><strong><a href='CenterStorage/EditOutBunch.aspx?BuildBunchId=" + lStorage[i].BuildBatchID + "'>批次编号:" + lStorage[i].BuildBatchID + "</a></strong></div></li>"); } } } } else if (int.Parse(type) == (int)BatchStatus.现场仓库待出库审批) { Msg msg = SiteStorageModel.NQueryOutBunch(iPlanId); if (msg.Status) { List <Tbl_SiteStorage> lBunch = msg.UserData as List <Tbl_SiteStorage>; ViewState["ListData"] = lBunch; ViewState["Identify"] = (int)CurrentType.现场登录出库; if (lBunch.Count > 0) { for (int i = 0; i < lBunch.Count; i++) { build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='EditSiteOutBunch.aspx?BuildBunchId=" + lBunch[i].BuildBatchID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' ' /><strong><a href='EditSiteOutBunch.aspx?BuildBunchId=" + lBunch[i].BuildBatchID + "'>批次编号:" + lBunch[i].BuildBatchID + "</a></strong></div></li>"); } } } } else { } } else if (this.CurrentUserInfo.Type == (int)LoginType.确认密码) { if (int.Parse(type) == (int)BatchStatus.加工仓库入库待审批) { Msg msg = ProductModel.NGetPreUnsureInBatch(int.Parse(palnId)); if (msg.Status) { List <Tbl_ProductBatch> lMetries = msg.UserData as List <Tbl_ProductBatch>;//批次表 ViewState["ListData"] = lMetries; ViewState["Identify"] = (int)CurrentType.加工确认入库; if (lMetries.Count > 0) { for (int i = 0; i < lMetries.Count; i++) { build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='EnsureProductInBunch.aspx?BuildBatchId=" + lMetries[i].BuildBatchID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' /><strong><a href='EnsureProductInBunch.aspx?BuildBunchId=" + lMetries[i].BuildBatchID + "'>批次编号:" + lMetries[i].BuildBatchID + "</a></strong></div></li>"); } } } } else if (int.Parse(type) == (int)BatchStatus.加工仓库待出库审批) { Msg msg = ProductModel.NQueryEnsureProductOutBunch(iPlanId); if (msg.Status) { List <Tbl_OutProductBatch> lStorage = msg.UserData as List <Tbl_OutProductBatch>; ViewState["ListData"] = lStorage; ViewState["Identify"] = (int)CurrentType.加工确认出库; if (lStorage.Count > 0) { for (int i = 0; i < lStorage.Count; i++) { build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='EnsureProductOutBunch.aspx?BuildBunchId=" + lStorage[i].BuildBatchID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' /><strong><a href='EnsureProductOutBunch.aspx?BuildBunchId=" + lStorage[i].BuildBatchID + "'>批次编号:" + lStorage[i].BuildBatchID + "</a></strong></div></li>"); } } } } else if (int.Parse(type) == (int)BatchStatus.中心仓库入库待审批) { Msg msg = Center.NQueryWaitInBunch(iPlanId); if (msg.Status) { List <Tbl_CenterStorageBatch> lBunch = msg.UserData as List <Tbl_CenterStorageBatch>; ViewState["ListData"] = lBunch; ViewState["Identify"] = (int)CurrentType.中心确认入库; if (lBunch.Count > 0) { for (int i = 0; i < lBunch.Count; i++) { build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='CenterStorage/EnsureCenterInBunch.aspx?BuildBunchId=" + lBunch[i].BuildBatchID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' /><strong><a href='CenterStorage/EnsureCenterInBunch.aspx?BuildBunchId=" + lBunch[i].BuildBatchID + "'>批次编号:" + lBunch[i].BuildBatchID + "</a></strong></div></li>"); } } } } else if (int.Parse(type) == (int)BatchStatus.中心仓库待出库审批) { Msg msg = Center.NQueryEnsureOutBunch(iPlanId); if (msg.Status) { List <Tbl_OutCenterStorage> lStorage = msg.UserData as List <Tbl_OutCenterStorage>; ViewState["ListData"] = lStorage; ViewState["Identify"] = (int)CurrentType.中心确认出库; if (lStorage.Count > 0) { for (int i = 0; i < lStorage.Count; i++) { build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='CenterStorage/EnsureOutBunch.aspx?BuildBunchId=" + lStorage[i].BuildBatchID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' /><strong><a href='CenterStorage/EnsureOutBunch.aspx?BuildBunchId=" + lStorage[i].BuildBatchID + "'>批次编号:" + lStorage[i].BuildBatchID + "</a></strong></div></li>"); } } } } else if (int.Parse(type) == (int)BatchStatus.现场仓库入库待审批) { Msg msg = SiteStorageModel.NQueryInBunch(iPlanId); if (msg.Status) { List <Tbl_SiteStorageBatch> lBunch = msg.UserData as List <Tbl_SiteStorageBatch>; ViewState["ListData"] = lBunch; ViewState["Identify"] = (int)CurrentType.现场确认入库; for (int i = 0; i < lBunch.Count; i++) { build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='EnsureSiteInBunch.aspx?BuildBunchId=" + lBunch[i].BuildBatchID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' /><strong><a href='EnsureSiteInBunch.aspx?BuildBunchId=" + lBunch[i].BuildBatchID + "'>批次编号:" + lBunch[i].BuildBatchID + "</a></strong></div></li>"); } } } else if (int.Parse(type) == (int)BatchStatus.现场仓库待出库审批) { Msg msg = SiteStorageModel.NQueryEnsureOutBunch(iPlanId); if (msg.Status) { List <Tbl_OutSiteStorage> lBunch = msg.UserData as List <Tbl_OutSiteStorage>; ViewState["ListData"] = lBunch; ViewState["Identify"] = (int)CurrentType.现场确认出库; if (lBunch.Count > 0) { for (int i = 0; i < lBunch.Count; i++) { build.Append(@"<li><div style='margin-bottom:10px;padding:12px 15px;line-height:13px; background:#E5E3E4;'><input type='hidden' id='chk" + i + "' value='EnsureSiteOutBunch.aspx?BuildBunchId=" + lBunch[i].BuildBatchID + "'> <input id='chk'" + i + " value=" + i + " type='checkbox' /><strong><a href='EnsureSiteOutBunch.aspx?BuildBunchId=" + lBunch[i].BuildBatchID + "'>批次编号:" + lBunch[i].BuildBatchID + "</a></strong></div></li>"); } } } } else { } } else { } list.InnerHtml = build.ToString(); } }
public string AdmEnsure(string Id, string table) { JavaScriptSerializer jss = new JavaScriptSerializer(); //// string sImei = this.Request["imei"]; //string Id = this.Context.Request.QueryString["id"]; //string table =this.Context.Request.QueryString["table"]; if (table != null) { LingYunDemo.Web.android.AdmEnsure.ReturnMsg ret = new LingYunDemo.Web.android.AdmEnsure.ReturnMsg(); ret.Status = 1; if (table.Equals("Tbl_Materies")) { Msg msg = MetriesModel.AndroidEnsure(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_ProductBatch")) { Msg msg = ProductModel.AndroidInBunch(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_OutProductBatch")) { Msg msg = ProductModel.AndroidOutEnsure(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_CenterStorageBatch")) { Msg msg = Center.AndroidInEnsure(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_OutCenterStorage")) { Msg msg = Center.AndroidOutBatch(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_SiteStorageBatch")) { Msg msg = SiteStorageModel.AndroidInEnsure(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } else if (table.Equals("Tbl_OutSiteStorage")) { Msg msg = SiteStorageModel.AndroidOutBatch(int.Parse(Id)); if (msg.Status) { ret.Status = 1; } } //this.Response.Write(jss.Serialize(ret)); //this.Response.Write("#"); } //this.Context.Response.Write(Id); //this.Context.Response.Write(table); return(Id); }