protected void btnOK_Click(object sender, EventArgs e) { try { if (ViewState["pModelID"] != null && ViewState["pModelID"].ToString() != string.Empty) { sqlaccess.Open(); sqlaccess.BeginTransaction(); SqlCommand cmd = new SqlCommand(); if (this.ddlop.SelectedValue == "3")//删除时 { cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", this.ddlop.SelectedValue); cmd.Parameters.AddWithValue("@p3", System.DateTime.Now); cmd.CommandText = "update ta_plan set State=@p2, CloseTime=@p3 where id=@p1"; sqlaccess.ExecuteQuerry(cmd); cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.CommandText = "delete TC_PlanProcedure where planid=@p1"; sqlaccess.ExecuteQuerry(cmd); sqlaccess.Commit(); string strLog = "关闭计划单[" + ViewState["planid"].ToString() + "] ## "; Methods.WriteOprationLog(SessionUser.ID, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), strLog + "update ta_plan set State=3 where id=" + ViewState["planid"].ToString() + ";delete TC_PlanProcedure where planid='" + ViewState["planid"].ToString() + "'"); Methods.Write(this, "window.parent.closeit();window.parent.query()"); return; } string logstr = ""; if (this.rblProductModel.SelectedIndex != -1) { //更新计划激活状态 cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", this.ddlop.SelectedValue); cmd.CommandText = "update ta_plan set State=@p2 where id=@p1"; sqlaccess.ExecuteQuerry(cmd); //产品工艺流程发生变化 if (rblProductModelOld.Text != rblProductModel.Items[rblProductModel.SelectedIndex].Value) { string sql = "SELECT ID FROM TA_Product" + " WHERE PlanID = '" + ViewState["planid"].ToString() + "' AND ModelID='" + this.lblProductModel.Text + "'"; DataSet tmpDS = Methods.getInforBySql(sql); if (tmpDS != null && tmpDS.Tables[0].Rows.Count > 0) { string tmpProductID; string oMsg; WSProcedureCtrl.ProcedureCtrl c = new MCSApp.WSProcedureCtrl.ProcedureCtrl(); for (int i = 0; i < tmpDS.Tables[0].Rows.Count; i++) { //发生了流程变更的产品序列号 tmpProductID = tmpDS.Tables[0].Rows[i][0].ToString(); //创建一条流程变更的工序历史记录 c.SaveProcessPurely(tmpProductID, "变更工艺流程", SessionUser.ID, 2, "", "", DateTime.Now, DateTime.Now, out oMsg); } c.Dispose(); } tmpDS.Dispose(); } //更新计划选定的产品工艺流程 cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", ViewState["pModelID"]); cmd.CommandText = "delete TC_PlanProcedure where planid = @p1 AND ModelID = @p2"; sqlaccess.ExecuteQuerry(cmd); cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", ViewState["pModelID"]); cmd.Parameters.AddWithValue("@p3", this.rblProductModel.SelectedValue); cmd.CommandText = "insert into TC_PlanProcedure (planid,modelid,procedureid) values (@p1,@p2,@p3)"; sqlaccess.ExecuteQuerry(cmd); logstr = "delete TC_PlanProcedure where planid='" + ViewState["planid"].ToString() + "';insert into TC_PlanProcedure (planid,modelid,procedureid) values ('" + ViewState["planid"].ToString() + "','" + ViewState["pModelID"].ToString() + "','" + this.rblProductModel.SelectedValue + "');"; //逐项处理部件工艺流程 for (int i = 0; i < this.GridView1.Rows.Count; i++) { RadioButtonList rbl = (RadioButtonList)this.GridView1.Rows[i].FindControl("rblComModel"); Label lblitemid = (Label)this.GridView1.Rows[i].FindControl("lblitemid"); Label rblOld = (Label)this.GridView1.Rows[i].FindControl("rblComModelOld"); if (rbl != null && rbl.SelectedIndex != -1) { //部件工艺流程发生变化 if (rblOld.Text != rbl.Items[rbl.SelectedIndex].Value) { string sql = "SELECT ID FROM TA_Product" + " WHERE PlanID = '" + ViewState["planid"].ToString() + "' AND ModelID='" + lblitemid.Text + "'"; DataSet tmpDS = Methods.getInforBySql(sql); if (tmpDS != null && tmpDS.Tables[0].Rows.Count > 0) { string tmpProductID; string oMsg; WSProcedureCtrl.ProcedureCtrl c = new MCSApp.WSProcedureCtrl.ProcedureCtrl(); for (int j = 0; j < tmpDS.Tables[0].Rows.Count; j++) { //发生了流程变更的产品序列号 tmpProductID = tmpDS.Tables[0].Rows[j][0].ToString(); //创建一条流程变更的工序历史记录 c.SaveProcessPurely(tmpProductID, "变更工艺流程", SessionUser.ID, 2, "", "", DateTime.Now, DateTime.Now, out oMsg); } c.Dispose(); } tmpDS.Dispose(); } //更新计划选定的部件工艺流程 cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", lblitemid.Text); cmd.CommandText = "delete TC_PlanProcedure where planid = @p1 AND ModelID = @p2"; sqlaccess.ExecuteQuerry(cmd); cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", lblitemid.Text); cmd.Parameters.AddWithValue("@p3", rbl.SelectedValue); cmd.CommandText = "insert into TC_PlanProcedure (planid,modelid,procedureid) values (@p1,@p2,@p3)"; sqlaccess.ExecuteQuerry(cmd); logstr = logstr + "insert into TC_PlanProcedure (planid,modelid,procedureid) values ('" + ViewState["planid"].ToString() + "','" + lblitemid.Text + "','" + rbl.SelectedValue + "')"; } } } else { Methods.AjaxMessageBox(this, "请选择产品的流程!"); } sqlaccess.Commit(); if (logstr != "") { string strLog = "激活计划单[" + ViewState["planid"].ToString() + "] ## "; Methods.WriteOprationLog(SessionUser.ID, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), strLog + logstr); } Methods.Write(this, "window.parent.closeit();window.parent.query()"); } } catch (Exception ex) { LogManager.Write(this, ex.Message); Methods.AjaxMessageBox(this, "保存流程到计划流程表时出现异常!可能是由于添加重复记录!"); } finally { sqlaccess.Close(); } }
public void test1(string Barcode) { if (ComboBox1.SelectedItem.Value == "待定" || ComboBox2.SelectedItem.Value == "待定") { Ext.Msg.Alert("提示", "您必须选择工序和流向信息!").Show(); return; } //用户登陆名 string Id = SessionUser.ID;//"00002";// //获取工序 //string[] process_probable = Hidden3.Text.Split('或'); string msg; WSProcedureCtrl.ProcedureCtrl c = new MCSApp.WSProcedureCtrl.ProcedureCtrl(); WSProductTrace.ProductTrace P = new MCSApp.WSProductTrace.ProductTrace(); //如果品号未通过 if (!c.CheckModel(Barcode.Substring(0, 9), Id)) { Ext.Msg.Alert("错误", "当前产品不是正在生产的产品。").Show(); return; } ////这时还需要收集工艺信息 //if (Hidden4.Text == "待定") //{ // //第一步:判断是否为新入工序的产品 // if (!c.CheckProcedure(Barcode, string.Empty, 0, out msg) && msg == "根据输入的条形码未查询到对应的产品") // { // P.SaveProduct(Id, Barcode, Barcode.Substring(0, 9), "", out msg); // } // //确定可能正确的工序 // for (int i = 0; i < process_probable.Length; i++) // { // if (c.CheckProcedure(Barcode, process_probable[i], 0, out msg)) // { // Label3.Text = process_probable[i]; // Hidden3.Text = process_probable[i]; // Label4.Text = "入"; // Hidden4.Text = "入"; // break; // } // if (c.CheckProcedure(Barcode, process_probable[i], 1, out msg)) // { // Label3.Text = process_probable[i]; // Hidden3.Text = process_probable[i]; // Label4.Text = "出"; // Hidden4.Text = "出"; // break; // } // } // if (Hidden4.Text == "待定") // { // Ext.Msg.Alert("错误", msg).Show(); // return; // } if (Hidden_s.Value.ToString() != "") { Hidden_s.Value = string.Empty; //自动提取已完工的数据清单 { List<object[]> data = (List<object[]>)Cache["data"]; if (data == null) data = new List<object[]>(); string sql1 = "select ProductID, Name from dbo.TB_ProcedureHistory,dbo.TA_Employee where ProductID like '" + Barcode.Substring(0, 9) + "A%' and Process ='" + ComboBox1.SelectedItem.Value + "'"; if (ComboBox2.SelectedItem.Value == "出") sql1 += " and Result=0"; sql1 += " and TA_Employee.ID=EmployeeID"; SqlAccess sqlAccess = new SqlAccess(); DataTable mytab = sqlAccess.OpenQuerry(sql1).Tables[0]; foreach (DataRow row in mytab.Rows) { int id = (data.Count + 1); string Barcode1 = row["ProductID"].ToString(); string ModelId = row["ProductID"].ToString().Substring(0, 9); string PlanId = string.Empty; string Process = ComboBox1.SelectedItem.Value; string User = row["Name"].ToString(); { SqlAccess sqlAccess1 = new SqlAccess(); DataRow myrow; try { myrow = sqlAccess.OpenQuerry("select * from TC_PlanProcedure where ModelId= '" + ModelId + "'").Tables[0].Rows[0]; PlanId = myrow["PlanId"].ToString(); } catch { } } data.Add(new object[] { id, Barcode1, PlanId, ModelId, Process, User }); } Cache["data"] = data; } } //} //如果是新产品 if (!c.CheckProcedure(Barcode, string.Empty, 0, out msg) && msg == "根据输入的条形码未查询到对应的产品") { P.SaveProduct(Id, Barcode, Barcode.Substring(0, 9), "", out msg); } if (!c.CheckProcedure(Barcode, ComboBox1.SelectedItem.Value, ComboBox2.SelectedItem.Value == "入" ? 0 : 1, out msg)) { Ext.Msg.Alert("错误", msg).Show(); return; } if (ComboBox2.SelectedItem.Value == "入") { if (!c.SaveProcessBegin(Barcode, ComboBox1.SelectedItem.Value, Id, DateTime.Now, out msg)) Ext.Msg.Alert("工序保存错误", msg); } if (ComboBox2.SelectedItem.Value == "出") { if (!c.SaveProcessEnd(Barcode, ComboBox1.SelectedItem.Value, 0, string.Empty, string.Empty, DateTime.Now, out msg)) Ext.Msg.Alert("工序保存错误", msg); } //下面是填充已扫描的列表数据-------------------------------------------------------------------------------------------------------------- { List<object[]> data = (List<object[]>)Cache["data"]; if (data == null) data = new List<object[]>(); int id = (data.Count + 1); string ModelId = Barcode.Substring(0, 9); string PlanId = string.Empty; string Process = ComboBox1.SelectedItem.Value; string User = SessionUser.Name; SqlAccess sqlAccess = new SqlAccess(); DataRow myrow; try { myrow = sqlAccess.OpenQuerry("select * from TC_PlanProcedure where ModelId= '" + ModelId + "'").Tables[0].Rows[0]; } catch { myrow = null; } if (myrow != null) { PlanId = myrow["PlanId"].ToString(); data.Add(new object[] { id, Barcode, PlanId, ModelId, Process, User }); Cache["data"] = data; } else { Ext.Msg.Alert("警告", Barcode + "并不是正在生产的产品。").Show(); } Cache["data"] = data; this.Store2.DataSource = data; this.Store2.DataBind(); } }
protected void btnOK_Click(object sender, EventArgs e) { try { if (ViewState["pModelID"] != null && ViewState["pModelID"].ToString() != string.Empty) { sqlaccess.Open(); sqlaccess.BeginTransaction(); SqlCommand cmd = new SqlCommand(); if (this.ddlop.SelectedValue == "3")//删除时 { cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", this.ddlop.SelectedValue); cmd.Parameters.AddWithValue("@p3", System.DateTime.Now); cmd.CommandText = "update ta_plan set State=@p2, CloseTime=@p3 where id=@p1"; sqlaccess.ExecuteQuerry(cmd); cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.CommandText = "delete TC_PlanProcedure where planid=@p1"; sqlaccess.ExecuteQuerry(cmd); sqlaccess.Commit(); string strLog = "关闭计划单[" + ViewState["planid"].ToString() + "] ## "; Methods.WriteOprationLog(SessionUser.ID, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), strLog + "update ta_plan set State=3 where id=" + ViewState["planid"].ToString() + ";delete TC_PlanProcedure where planid='" + ViewState["planid"].ToString() + "'"); Methods.Write(this, "window.parent.closeit();window.parent.query()"); return; } string logstr = ""; if (this.rblProductModel.SelectedIndex != -1) { //更新计划激活状态 cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", this.ddlop.SelectedValue); cmd.CommandText = "update ta_plan set State=@p2 where id=@p1"; sqlaccess.ExecuteQuerry(cmd); //产品工艺流程发生变化 if (rblProductModelOld.Text != rblProductModel.Items[rblProductModel.SelectedIndex].Value) { string sql = "SELECT ID FROM TA_Product" + " WHERE PlanID = '" + ViewState["planid"].ToString() + "' AND ModelID='" + this.lblProductModel.Text +"'"; DataSet tmpDS = Methods.getInforBySql(sql); if (tmpDS != null && tmpDS.Tables[0].Rows.Count > 0) { string tmpProductID; string oMsg; WSProcedureCtrl.ProcedureCtrl c = new MCSApp.WSProcedureCtrl.ProcedureCtrl(); for (int i = 0; i < tmpDS.Tables[0].Rows.Count; i++) { //发生了流程变更的产品序列号 tmpProductID = tmpDS.Tables[0].Rows[i][0].ToString(); //创建一条流程变更的工序历史记录 c.SaveProcessPurely(tmpProductID, "变更工艺流程", SessionUser.ID, 2, "", "", DateTime.Now, DateTime.Now, out oMsg); } c.Dispose(); } tmpDS.Dispose(); } //更新计划选定的产品工艺流程 cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", ViewState["pModelID"]); cmd.CommandText = "delete TC_PlanProcedure where planid = @p1 AND ModelID = @p2"; sqlaccess.ExecuteQuerry(cmd); cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", ViewState["pModelID"]); cmd.Parameters.AddWithValue("@p3", this.rblProductModel.SelectedValue); cmd.CommandText = "insert into TC_PlanProcedure (planid,modelid,procedureid) values (@p1,@p2,@p3)"; sqlaccess.ExecuteQuerry(cmd); logstr = "delete TC_PlanProcedure where planid='" + ViewState["planid"].ToString() + "';insert into TC_PlanProcedure (planid,modelid,procedureid) values ('" + ViewState["planid"].ToString() + "','" + ViewState["pModelID"].ToString() + "','" + this.rblProductModel.SelectedValue + "');"; //逐项处理部件工艺流程 for (int i = 0; i < this.GridView1.Rows.Count; i++) { RadioButtonList rbl = (RadioButtonList)this.GridView1.Rows[i].FindControl("rblComModel"); Label lblitemid = (Label)this.GridView1.Rows[i].FindControl("lblitemid"); Label rblOld = (Label)this.GridView1.Rows[i].FindControl("rblComModelOld"); if (rbl != null && rbl.SelectedIndex != -1) { //部件工艺流程发生变化 if (rblOld.Text != rbl.Items[rbl.SelectedIndex].Value) { string sql = "SELECT ID FROM TA_Product" + " WHERE PlanID = '" + ViewState["planid"].ToString() + "' AND ModelID='" + lblitemid.Text + "'"; DataSet tmpDS = Methods.getInforBySql(sql); if (tmpDS != null && tmpDS.Tables[0].Rows.Count > 0) { string tmpProductID; string oMsg; WSProcedureCtrl.ProcedureCtrl c = new MCSApp.WSProcedureCtrl.ProcedureCtrl(); for (int j = 0; j < tmpDS.Tables[0].Rows.Count; j++) { //发生了流程变更的产品序列号 tmpProductID = tmpDS.Tables[0].Rows[j][0].ToString(); //创建一条流程变更的工序历史记录 c.SaveProcessPurely(tmpProductID, "变更工艺流程", SessionUser.ID, 2, "", "", DateTime.Now, DateTime.Now, out oMsg); } c.Dispose(); } tmpDS.Dispose(); } //更新计划选定的部件工艺流程 cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", lblitemid.Text); cmd.CommandText = "delete TC_PlanProcedure where planid = @p1 AND ModelID = @p2"; sqlaccess.ExecuteQuerry(cmd); cmd.Parameters.Clear(); cmd.Parameters.AddWithValue("@p1", ViewState["planid"]); cmd.Parameters.AddWithValue("@p2", lblitemid.Text); cmd.Parameters.AddWithValue("@p3", rbl.SelectedValue); cmd.CommandText = "insert into TC_PlanProcedure (planid,modelid,procedureid) values (@p1,@p2,@p3)"; sqlaccess.ExecuteQuerry(cmd); logstr = logstr + "insert into TC_PlanProcedure (planid,modelid,procedureid) values ('" + ViewState["planid"].ToString() + "','" + lblitemid.Text + "','" + rbl.SelectedValue + "')"; } } } else { Methods.AjaxMessageBox(this, "请选择产品的流程!"); } sqlaccess.Commit(); if (logstr != "") { string strLog = "激活计划单[" + ViewState["planid"].ToString() + "] ## "; Methods.WriteOprationLog(SessionUser.ID, System.DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss"), strLog + logstr); } Methods.Write(this, "window.parent.closeit();window.parent.query()"); } } catch (Exception ex) { LogManager.Write(this, ex.Message); Methods.AjaxMessageBox(this, "保存流程到计划流程表时出现异常!可能是由于添加重复记录!"); } finally { sqlaccess.Close(); } }
public void test1(string Barcode) { if (ComboBox1.SelectedItem.Value == "待定" || ComboBox2.SelectedItem.Value == "待定") { Ext.Msg.Alert("提示", "您必须选择工序和流向信息!").Show(); return; } //用户登陆名 string Id = SessionUser.ID;//"00002";// //获取工序 //string[] process_probable = Hidden3.Text.Split('或'); string msg; WSProcedureCtrl.ProcedureCtrl c = new MCSApp.WSProcedureCtrl.ProcedureCtrl(); WSProductTrace.ProductTrace P = new MCSApp.WSProductTrace.ProductTrace(); //如果品号未通过 if (!c.CheckModel(Barcode.Substring(0, 9), Id)) { Ext.Msg.Alert("错误", "当前产品不是正在生产的产品。").Show(); return; } ////这时还需要收集工艺信息 //if (Hidden4.Text == "待定") //{ // //第一步:判断是否为新入工序的产品 // if (!c.CheckProcedure(Barcode, string.Empty, 0, out msg) && msg == "根据输入的条形码未查询到对应的产品") // { // P.SaveProduct(Id, Barcode, Barcode.Substring(0, 9), "", out msg); // } // //确定可能正确的工序 // for (int i = 0; i < process_probable.Length; i++) // { // if (c.CheckProcedure(Barcode, process_probable[i], 0, out msg)) // { // Label3.Text = process_probable[i]; // Hidden3.Text = process_probable[i]; // Label4.Text = "入"; // Hidden4.Text = "入"; // break; // } // if (c.CheckProcedure(Barcode, process_probable[i], 1, out msg)) // { // Label3.Text = process_probable[i]; // Hidden3.Text = process_probable[i]; // Label4.Text = "出"; // Hidden4.Text = "出"; // break; // } // } // if (Hidden4.Text == "待定") // { // Ext.Msg.Alert("错误", msg).Show(); // return; // } if (Hidden_s.Value.ToString() != "") { Hidden_s.Value = string.Empty; //自动提取已完工的数据清单 { List <object[]> data = (List <object[]>)Cache["data"]; if (data == null) { data = new List <object[]>(); } string sql1 = "select ProductID, Name from dbo.TB_ProcedureHistory,dbo.TA_Employee where ProductID like '" + Barcode.Substring(0, 9) + "A%' and Process ='" + ComboBox1.SelectedItem.Value + "'"; if (ComboBox2.SelectedItem.Value == "出") { sql1 += " and Result=0"; } sql1 += " and TA_Employee.ID=EmployeeID"; SqlAccess sqlAccess = new SqlAccess(); DataTable mytab = sqlAccess.OpenQuerry(sql1).Tables[0]; foreach (DataRow row in mytab.Rows) { int id = (data.Count + 1); string Barcode1 = row["ProductID"].ToString(); string ModelId = row["ProductID"].ToString().Substring(0, 9); string PlanId = string.Empty; string Process = ComboBox1.SelectedItem.Value; string User = row["Name"].ToString(); { SqlAccess sqlAccess1 = new SqlAccess(); DataRow myrow; try { myrow = sqlAccess.OpenQuerry("select * from TC_PlanProcedure where ModelId= '" + ModelId + "'").Tables[0].Rows[0]; PlanId = myrow["PlanId"].ToString(); } catch { } } data.Add(new object[] { id, Barcode1, PlanId, ModelId, Process, User }); } Cache["data"] = data; } } //} //如果是新产品 if (!c.CheckProcedure(Barcode, string.Empty, 0, out msg) && msg == "根据输入的条形码未查询到对应的产品") { P.SaveProduct(Id, Barcode, Barcode.Substring(0, 9), "", out msg); } if (!c.CheckProcedure(Barcode, ComboBox1.SelectedItem.Value, ComboBox2.SelectedItem.Value == "入" ? 0 : 1, out msg)) { Ext.Msg.Alert("错误", msg).Show(); return; } if (ComboBox2.SelectedItem.Value == "入") { if (!c.SaveProcessBegin(Barcode, ComboBox1.SelectedItem.Value, Id, DateTime.Now, out msg)) { Ext.Msg.Alert("工序保存错误", msg); } } if (ComboBox2.SelectedItem.Value == "出") { if (!c.SaveProcessEnd(Barcode, ComboBox1.SelectedItem.Value, 0, string.Empty, string.Empty, DateTime.Now, out msg)) { Ext.Msg.Alert("工序保存错误", msg); } } //下面是填充已扫描的列表数据-------------------------------------------------------------------------------------------------------------- { List <object[]> data = (List <object[]>)Cache["data"]; if (data == null) { data = new List <object[]>(); } int id = (data.Count + 1); string ModelId = Barcode.Substring(0, 9); string PlanId = string.Empty; string Process = ComboBox1.SelectedItem.Value; string User = SessionUser.Name; SqlAccess sqlAccess = new SqlAccess(); DataRow myrow; try { myrow = sqlAccess.OpenQuerry("select * from TC_PlanProcedure where ModelId= '" + ModelId + "'").Tables[0].Rows[0]; } catch { myrow = null; } if (myrow != null) { PlanId = myrow["PlanId"].ToString(); data.Add(new object[] { id, Barcode, PlanId, ModelId, Process, User }); Cache["data"] = data; } else { Ext.Msg.Alert("警告", Barcode + "并不是正在生产的产品。").Show(); } Cache["data"] = data; this.Store2.DataSource = data; this.Store2.DataBind(); } }