/// <summary> /// 接班按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsbJieBan_Click(object sender, EventArgs e) { Flag = 2; if (lupFacRoom.Text == "") { MessageService.ShowMessage("请选择工厂名称?", "${res:Global.SystemInfo}"); return; } if (lupGongXu.Text == "") { MessageService.ShowMessage("请选择工序名称?", "${res:Global.SystemInfo}"); return; } OperationHandover _operationHandover = new OperationHandover(); factRoom = this.lupFacRoom.EditValue.ToString(); operation = this.lupGongXu.EditValue.ToString(); shift = this.lupShift.EditValue.ToString(); receiveoperator = this.txtJobNumber.EditValue.ToString(); sendoperator = this.txtJobNumber.EditValue.ToString(); string _lupShift = lupShift.Text.Trim(); string _lupGongXu = lupGongXu.Text.Trim(); string facRoom = lupFacRoom.Text; string _lupFacRoomKey = lupFacRoom.Properties.GetKeyValueByDisplayText(facRoom).ToString(); //根据当前班次和当前日期获取上一班次和上一班的交班日期。根据上一班次、工厂车间、工序名称、上一班的交班日期获取上一班的交班记录 DataSet dsGetShangBanShift = _operationHandover.GetShangBanShift(_lupShift, _lupGongXu, _lupFacRoomKey); if (dsGetShangBanShift.Tables[0].Rows.Count > 0) { if (dsGetShangBanShift.Tables[0].Rows[0][0].ToString() == "1") {//如果存在上一班交班记录且交班记录状态为已交班,打开“工序交接班清单”界面 foreach (IViewContent viewContent in WorkbenchSingleton.Workbench.ViewContentCollection) { //if (viewContent.TitleName == StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.WorkOrderManagement.Name}")) if (viewContent.TitleName == "Default Title") { viewContent.WorkbenchWindow.SelectWindow(); return; } } //显示材料耗用清单的用户控件 WorkbenchSingleton.Workbench.ShowView(new HandOverTheWatchListContent()); } else if (dsGetShangBanShift.Tables[0].Rows[0][0].ToString() == "2") { MessageService.ShowMessage("已进行接班,不能再次接班。", "${res:Global.SystemInfo}"); } else if (dsGetShangBanShift.Tables[0].Rows[0][0].ToString() == "0") {//如果存在上一班交班记录且交班记录状态为未交班,给出提示上一班没有确认交班,不能进行接班。 MessageService.ShowMessage("上一班没有确认交班,不能进行接班。", "${res:Global.SystemInfo}"); } } else { MessageService.ShowMessage("上一班没有交班记录,不能进行接班。", "${res:Global.SystemInfo}"); } }
/// <summary> /// 接班时更新状态并且插入一条接班记录期同时插入mat和wip的记录初数量为接班时数量的期末数量 /// </summary> public void UpdateAndInsertWipMatHandOverBySaveJieBan(HandOverTheWatchCtrl handOverTheWatchCtrl) { if (MessageBox.Show(StringParser.Parse("确定要接班吗?"), StringParser.Parse("${res:Global.SystemInfo}"), MessageBoxButtons.OKCancel) == DialogResult.OK) { DataSet dsGetShangYiBanHandOver = new DataSet(); OperationHandover _operationHandover = new OperationHandover(); //获取上一班的交接记录 dsGetShangYiBanHandOver = _operationHandover.GetShangYiBanHandOver(handOverTheWatchCtrl.Shift, handOverTheWatchCtrl.Operation, handOverTheWatchCtrl.FactRoom); string handOverKey = dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][0].ToString(); Hashtable hashTable1 = new Hashtable(); hashTable1.Add("OPERATION_HANDOVER_KEY", handOverKey); hashTable1.Add("Receiveoperator", handOverTheWatchCtrl.Receiveoperator); hashTable1.Add("SHIFT", handOverTheWatchCtrl.Shift); hashTable1.Add("EDITOR", PropertyService.Get(PROPERTY_FIELDS.USER_NAME)); hashTable1.Add("EDIT_TIMEZONE", PropertyService.Get(PROPERTY_FIELDS.TIMEZONE)); DataTable tableParam1 = FanHai.Hemera.Share.Common.CommonUtils.ParseToDataTable(hashTable1); tableParam1.TableName = "HASH1"; DataSet dsSetIn1 = new DataSet(); dsSetIn1.Merge(tableParam1); _operationHandover.UpdateHandOver(dsSetIn1); //插入数据到工序交接班表 DataSet dsGetDangQianHandOver = _operationHandover.GetDangQianShiftHandover(handOverTheWatchCtrl.Shift, handOverTheWatchCtrl.Operation, handOverTheWatchCtrl.FactRoom); Hashtable hashTable = new Hashtable(); hashTable.Add("LOCATIOMKEY", handOverTheWatchCtrl.FactRoom); hashTable.Add("OPERATIONNAME", handOverTheWatchCtrl.Operation); hashTable.Add("SENDSHIFTVALUE", handOverTheWatchCtrl.Shift); hashTable.Add("DAY", dsGetDangQianHandOver.Tables["DAY"].Rows[0][0].ToString().Trim()); hashTable.Add("STATUS", "0"); hashTable.Add("SENDOPERATOR", handOverTheWatchCtrl.Sendoperator); hashTable.Add("CREATE_TIMEZONE", PropertyService.Get(PROPERTY_FIELDS.TIMEZONE)); hashTable.Add("CREATOR", PropertyService.Get(PROPERTY_FIELDS.USER_NAME)); DataTable tableParam = FanHai.Hemera.Share.Common.CommonUtils.ParseToDataTable(hashTable); tableParam.TableName = "HASH"; DataSet dsSetIn = new DataSet(); dsSetIn.Merge(tableParam); try { _operationHandover.InsertHandOver(dsSetIn); //插入数据到工序交接班表 DataSet dsGetDangQianHandOver1 = _operationHandover.GetDangQianShiftHandover(handOverTheWatchCtrl.Shift, handOverTheWatchCtrl.Operation, handOverTheWatchCtrl.FactRoom); string handDangqianOverKey = dsGetDangQianHandOver1.Tables["ShiftHandover"].Rows[0][0].ToString(); _operationHandover.InsertMatWipQiChu(handDangqianOverKey, handOverKey);//根据上一工序交接班主键获取上一工序交接班的期末数量插入到新生成的数据中的期初数量 MessageService.ShowMessage("保存成功", "系统提示"); } catch (Exception ex) { MessageService.ShowMessage(ex.Message, "系统提示"); } } }
/// <summary> /// 绑定数据表数据 /// </summary> public void BindGridViewSource() { string operations = PropertyService.Get(PROPERTY_FIELDS.OPERATIONS); //string stores = PropertyService.Get(PROPERTY_FIELDS.STORES); //获取用户拥有权限的工厂名称 DataTable dt2 = FactoryUtils.GetFactoryRoomByStores(PropertyService.Get(PROPERTY_FIELDS.STORES)); OperationHandover _operationHandover = new OperationHandover(); gdcData.MainView = gdvHandOverTheWatch; DataSet ds = _operationHandover.GetOperationHandoverBySAndF(operations, dt2); gdcData.DataSource = ds.Tables.Count > 0 ? ds.Tables[0] : null; }
/// <summary> /// 绑定数据表 /// </summary> /// <param name="key"></param> public void BindShuJuBiao(string key) { gridView1.Columns["OUT_QTY_2"].OptionsColumn.AllowEdit = true; OperationHandover _operationHandover = new OperationHandover(); gvWuLiaoJiaoJieList.MainView = gridView1; DataSet dtGetWipAndMat = _operationHandover.GetWipAndMatByKey(key);//绑定数据表通过工序交接班主键获取物料信息和WIP信息 gvWuLiaoJiaoJieList.DataSource = dtGetWipAndMat.Tables["MatByKey"]; gvWipJiaoJieList.MainView = gridView2; gvWipJiaoJieList.DataSource = dtGetWipAndMat.Tables["WipByKey"]; }
/// <summary> /// 交班时更新wip和mat数据和交接班记录表的数据 /// </summary> public void UpdateWipMatHandOverBySaveJiaoban(HandOverTheWatchCtrl handOverTheWatchCtrl) { DataSet dsGetDangQianShiftHandover = new DataSet(); OperationHandover _operationHandover = new OperationHandover(); dsGetDangQianShiftHandover = _operationHandover.GetDangQianShiftHandover(handOverTheWatchCtrl.Shift, handOverTheWatchCtrl.Operation, handOverTheWatchCtrl.FactRoom); //获取当前班次的交班日期 DataTable dtHandOverTable = new DataTable(); DataView dv = gridView1.DataSource as DataView; if (dv != null) { dtHandOverTable = dv.Table; } string handOverKey = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][0].ToString(); Hashtable hashTable = new Hashtable(); hashTable.Add("OPERATION_HANDOVER_KEY", handOverKey); hashTable.Add("EDITOR", PropertyService.Get(PROPERTY_FIELDS.USER_NAME)); hashTable.Add("EDIT_TIMEZONE", PropertyService.Get(PROPERTY_FIELDS.TIMEZONE)); DataTable tableParam = FanHai.Hemera.Share.Common.CommonUtils.ParseToDataTable(hashTable);//02322 136669 tableParam.TableName = "HASH"; DataSet dsSetIn = new DataSet(); dtHandOverTable.TableName = "WST_OPERATION_HANDOVER_MAT"; dsSetIn.Merge(dtHandOverTable); dsSetIn.Merge(tableParam); if (dtHandOverTable == null) { MessageService.ShowMessage("没有可保存的物料信息!", "${res:Global.SystemInfo}"); } if (MessageBox.Show(StringParser.Parse("确定要交班吗?"), StringParser.Parse("${res:Global.SystemInfo}"), MessageBoxButtons.OKCancel) == DialogResult.OK) { if (_operationHandover.UpdateWipMatHandOverBySaveJiaoban(dsSetIn) != true)//保存数据到MAT和工序交接班表中 { MessageService.ShowMessage("交接信息保存失败!", "${res:Global.SystemInfo}"); } else { MessageService.ShowMessage("交接信息保存成功!", "${res:Global.SystemInfo}"); } } }
/// <summary> /// 查询交接班记录 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsbSelect_Click(object sender, EventArgs e) { HandOverTheWatchDialog handOverTheWatchDialog = new HandOverTheWatchDialog(); if (handOverTheWatchDialog.ShowDialog() == DialogResult.OK) { SetRetrunToDefine(handOverTheWatchDialog); string operations = PropertyService.Get(PROPERTY_FIELDS.OPERATIONS); //string stores = PropertyService.Get(PROPERTY_FIELDS.STORES); //获取用户拥有权限的工厂名称 DataTable dt2 = FactoryUtils.GetFactoryRoomByStores(PropertyService.Get(PROPERTY_FIELDS.STORES)); OperationHandover _operationHandover = new OperationHandover(); gdcData.MainView = gdvHandOverTheWatch; //查询 DataSet ds = _operationHandover.GetOperationHandoverByReturn(_lupFactoryRoom, _cmbGongXuName, _lupJiaoBanShife, _lupJieBanShife, _timJiaoBanStart, _timJiaoBanEnd, _lupZhuangTai, operations, dt2); gdcData.DataSource = ds.Tables.Count > 0 ? ds.Tables[0] : null; } }
/// <summary> /// 数据表双击事件 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void gdcData_DoubleClick(object sender, EventArgs e) { //获取视图的鼠标的焦点 //GridHitInfo gridHitInfo = this.gdvHandOverTheWatch.CalcHitInfo((sender as Control).PointToClient(Control.MousePosition)); int rowHandle = gdvHandOverTheWatch.FocusedRowHandle; if (rowHandle >= 0) { operationHandoverKey = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "OPERATION_HANDOVER_KEY").ToString(); factoryRoom = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "LOCATION_NAME").ToString(); gongXu = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "ROUTE_OPERATION_NAME").ToString(); jiaoBanShife = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "SEND_SHIFT_VALUE").ToString(); jieBanShife = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "RECEIVE_SHIFT_VALUE").ToString(); jiaoJieDate = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "HANDOVER_DATE").ToString(); zhuangTai = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "STATUS").ToString(); jiaoBanPeople = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "SEND_OPERATOR").ToString(); jieBanPeople = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "RECEIVE_OPERATOR").ToString(); //if (!string.IsNullOrEmpty(lupShift.EditValue.ToString())) dangQianBanBie = lupShift.EditValue.ToString(); //通过工厂名获取工厂主键 OperationHandover _operationHandover = new OperationHandover(); DataSet dsFacKeyByName = new DataSet(); dsFacKeyByName = _operationHandover.GetFacKeyByFacName(this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "LOCATION_NAME").ToString()); factRoom = dsFacKeyByName.Tables[0].Rows[0][0].ToString(); operation = this.gdvHandOverTheWatch.GetRowCellValue(rowHandle, "ROUTE_OPERATION_NAME").ToString(); shift = this.lupShift.EditValue.ToString(); receiveoperator = this.txtJobNumber.EditValue.ToString(); } Flag = 0; foreach (IViewContent viewContent in WorkbenchSingleton.Workbench.ViewContentCollection) { //if (viewContent.TitleName == StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.WorkOrderManagement.Name}")) if (viewContent.TitleName == "Default Title") { viewContent.WorkbenchWindow.SelectWindow(); return; } } //显示材料耗用清单的用户控件 WorkbenchSingleton.Workbench.ShowView(new HandOverTheWatchListContent()); }
/// <summary> /// HandOverTheWatchCtrl上接班按钮Click事件绑定窗体控件值 /// </summary> /// <param name="handOverTheWatchCtrl"></param> public void BindContralByJieBanClick(HandOverTheWatchCtrl handOverTheWatchCtrl) { DataSet dsGetShangYiBanHandOver = new DataSet(); OperationHandover _operationHandover = new OperationHandover(); //获取上一班的交接记录 dsGetShangYiBanHandOver = _operationHandover.GetShangYiBanHandOver(handOverTheWatchCtrl.Shift, handOverTheWatchCtrl.Operation, handOverTheWatchCtrl.FactRoom); string handOverKey = dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][0].ToString(); this.txtFacRoom.Text = dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][1].ToString(); this.txtGongXu.Text = dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][2].ToString(); this.txtJiaoBanShift.Text = dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][3].ToString(); this.txtJieBanShift.Text = handOverTheWatchCtrl.Shift;//dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][4].ToString(); this.txtJiaoBaoTime.Text = Convert.ToDateTime(dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][5].ToString()).ToString("yyyy-MM-dd"); this.txtZhuangTai.Text = dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][6].ToString(); this.txtJiaoBanJobNumber.Text = dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][7].ToString(); this.txtJieBanJobNumber.Text = handOverTheWatchCtrl.Receiveoperator; //dsGetShangYiBanHandOver.Tables["ShiftHandover"].Rows[0][8].ToString(); BindShuJuBiao(handOverKey); //绑定数据表通过工序交接班主键获取物料信息和WIP信息 gridView1.Columns["OUT_QTY_2"].OptionsColumn.AllowEdit = false; }
/// <summary> /// 交班按钮 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void tsbRefresMaterial_Click(object sender, EventArgs e) { Flag = 1; if (lupFacRoom.Text == "") { MessageService.ShowMessage("请选择工厂名称?", "${res:Global.SystemInfo}"); return; } if (lupGongXu.Text == "") { MessageService.ShowMessage("请选择工序名称?", "${res:Global.SystemInfo}"); return; } factRoom = this.lupFacRoom.EditValue.ToString(); operation = this.lupGongXu.EditValue.ToString(); shift = this.lupShift.EditValue.ToString(); sendoperator = this.txtJobNumber.EditValue.ToString(); OperationHandover _operationHandover = new OperationHandover(); string _lupShift = lupShift.Text.Trim(); string _lupGongXu = lupGongXu.Text.Trim(); string facRoom = lupFacRoom.Text; string _lupFacRoomKey = lupFacRoom.Properties.GetKeyValueByDisplayText(facRoom).ToString(); //根据当前班次和当前日期获取上一班次和上一班的交班日期。根据上一班次、工厂车间、工序名称、上一班的交班日期获取上一班的交班记录 DataSet dsGetShangBanShift = _operationHandover.GetShangBanShift(_lupShift, _lupGongXu, _lupFacRoomKey); if (dsGetShangBanShift.Tables[0].Rows.Count > 0) { if (dsGetShangBanShift.Tables[0].Rows[0][0].ToString() != "2") {//如果上一班次的工序交接班记录状态不为”2:已接班“,则提示用户”不能交班,您还没有进行接班操作,是否执行接班操作?" //MessageService.ShowMessage("不能交班,您还没有进行接班操作,是否执行接班操作?", "${res:Global.SystemInfo}"); if (MessageBox.Show(StringParser.Parse("不能交班,您还没有进行接班操作,是否执行接班操作?"), StringParser.Parse("${res:Global.SystemInfo}"), MessageBoxButtons.OKCancel) == DialogResult.OK) { tsbJieBan_Click(sender, e); } } else { foreach (IViewContent viewContent in WorkbenchSingleton.Workbench.ViewContentCollection) { //if (viewContent.TitleName == StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.WorkOrderManagement.Name}")) if (viewContent.TitleName == "Default Title") { viewContent.WorkbenchWindow.SelectWindow(); return; } } //显示材料耗用清单的用户控件 WorkbenchSingleton.Workbench.ShowView(new HandOverTheWatchListContent()); } } else { DataSet dsGetShangBan = _operationHandover.GetShangBan(_lupGongXu, _lupFacRoomKey); if (dsGetShangBan.Tables[0].Rows.Count > 0) {//如果上一班次的工序交接班记录不存在,继续根据工厂车间、工序名称判断是否存在工序交接班记录 MessageService.ShowMessage("上一班次未执行交接班操作,请补齐交接班记录", "${res:Global.SystemInfo}"); } else { foreach (IViewContent viewContent in WorkbenchSingleton.Workbench.ViewContentCollection) { //if (viewContent.TitleName == StringParser.Parse("${res:FanHai.Hemera.Addins.FMM.WorkOrderManagement.Name}")) if (viewContent.TitleName == "Default Title") { viewContent.WorkbenchWindow.SelectWindow(); return; } } //显示材料耗用清单的用户控件 WorkbenchSingleton.Workbench.ShowView(new HandOverTheWatchListContent()); } } }
/// <summary> /// HandOverTheWatchCtrl上交接按钮Click事件绑定窗体控件值 /// </summary> /// <param name="handOverTheWatchCtrl"></param> public void BindContralByJiaoJieClick(HandOverTheWatchCtrl handOverTheWatchCtrl) { DataSet dsGetDangQianShiftHandover = new DataSet(); OperationHandover _operationHandover = new OperationHandover(); dsGetDangQianShiftHandover = _operationHandover.GetDangQianShiftHandover(handOverTheWatchCtrl.Shift, handOverTheWatchCtrl.Operation, handOverTheWatchCtrl.FactRoom); //获取当前班次的交班日期 if (dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows.Count > 0) { string handOverKey = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][0].ToString(); _operationHandover.UpdateHandOverMatAndWip(handOverKey); //通过工序交接班的主键然后获取WIP和物料的数量更新到表中 _operationHandover.UpdateHandOverMatAndWipQiMoShuLiang(handOverKey); //通过工序交接班的主键更新期末数据 this.txtFacRoom.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][1].ToString(); this.txtGongXu.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][2].ToString(); this.txtJiaoBanShift.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][3].ToString(); this.txtJieBanShift.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][4].ToString(); this.txtJiaoBaoTime.Text = Convert.ToDateTime(dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][5].ToString()).ToString("yyyy-MM-dd"); this.txtZhuangTai.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][6].ToString(); this.txtJiaoBanJobNumber.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][7].ToString(); this.txtJieBanJobNumber.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][8].ToString(); BindShuJuBiao(handOverKey); //绑定数据表通过工序交接班主键获取物料信息和WIP信息 } else { //没有查询出来的交接班记录 为交接班表插入一条记录 定义hash准备插入操作 Hashtable hashTable = new Hashtable(); hashTable.Add("LOCATIOMKEY", handOverTheWatchCtrl.FactRoom); hashTable.Add("OPERATIONNAME", handOverTheWatchCtrl.Operation); hashTable.Add("SENDSHIFTVALUE", handOverTheWatchCtrl.Shift); hashTable.Add("DAY", dsGetDangQianShiftHandover.Tables["DAY"].Rows[0][0].ToString()); hashTable.Add("STATUS", "0"); hashTable.Add("SENDOPERATOR", handOverTheWatchCtrl.Sendoperator); hashTable.Add("CREATE_TIMEZONE", PropertyService.Get(PROPERTY_FIELDS.TIMEZONE)); hashTable.Add("CREATOR", PropertyService.Get(PROPERTY_FIELDS.USER_NAME)); DataTable tableParam = FanHai.Hemera.Share.Common.CommonUtils.ParseToDataTable(hashTable); tableParam.TableName = "HASH"; DataSet dsSetIn = new DataSet(); dsSetIn.Merge(tableParam); _operationHandover.InsertHandOver(dsSetIn); //插入数据到工序交接班表 //获取插入后的工序交接班的详细信息 dsGetDangQianShiftHandover = _operationHandover.GetDangQianShiftHandover(handOverTheWatchCtrl.Shift, handOverTheWatchCtrl.Operation, handOverTheWatchCtrl.FactRoom); //先获取当前班次的交班日期然后获取工序交接班的信息记录 //获取插入记录的主键 string handOverKey = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][0].ToString(); //通过根据工序和工厂车间获取所有线上仓中的物料信息(WST_STORE,WST_STORE_MATERIAL)插入到WST_OPERATION_HANDOVER_MAT中 //(数量全部设置为0)。根据工序和工厂车间获取所有工单的在制品信息(POR_LOT,POR_WORK_ORDER,WIP_TRANSACTION)插入到 //WST_OPERATION_HANDOVER_WIP中(数量全部设置为0) _operationHandover.InsertHandOverMatAndWip(handOverKey, handOverTheWatchCtrl.FactRoom, handOverTheWatchCtrl.Operation); _operationHandover.UpdateHandOverMatAndWip(handOverKey); //通过工序交接班的主键然后获取WIP和物料的数量更新到表中 _operationHandover.UpdateHandOverMatAndWipQiMoShuLiang(handOverKey); //通过工序交接班的主键更新期末数据 this.txtFacRoom.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][1].ToString(); this.txtGongXu.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][2].ToString(); this.txtJiaoBanShift.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][3].ToString(); this.txtJieBanShift.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][4].ToString(); this.txtJiaoBaoTime.Text = Convert.ToDateTime(dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][5].ToString()).ToString("yyyy-MM-dd"); this.txtZhuangTai.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][6].ToString(); this.txtJiaoBanJobNumber.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][7].ToString(); this.txtJieBanJobNumber.Text = dsGetDangQianShiftHandover.Tables["ShiftHandover"].Rows[0][8].ToString(); BindShuJuBiao(handOverKey); } }