| | |
| | | |
| | | using Gs.DevApp.DevFrm.QC; |
| | | using Gs.DevApp.DevFrm.QC; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show(ex.Message); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError(ex.Message); |
| | | } |
| | | }; |
| | | frm.ShowDialog(); |
| | |
| | | { |
| | | if ((lbGuid.Text.Trim().Length < 10)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请先保存当前信息!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先保存当前信息!"); |
| | | return; |
| | | } |
| | | if ((txt_isCheck.Checked == false)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("该项目未审核,暂不能复制到其它物料!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("该项目未审核,暂不能复制到其它物料!"); |
| | | return; |
| | | } |
| | | Frm_WorkTechniqueShow frm = new Frm_WorkTechniqueShow(lbGuid.Text.Trim()); |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | if (txt_fType.SelectedIndex <= 0) |
| | | if (txt_fType.SelectedIndex <0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("生产类型不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("生产类型不能为空!"); |
| | | txt_fType.Focus(); |
| | | return; |
| | | } |
| | | if (txt_fJingDu.SelectedIndex < 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("管理精度不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("管理精度不能为空!"); |
| | | txt_fJingDu.Focus(); return; |
| | | } |
| | | if (txt_fBegDate.Text.Length <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("生效日期不能为空!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("生效日期不能为空!"); |
| | | txt_fBegDate.Focus(); return; |
| | | } |
| | | txt_fEndDate.DateTime= new DateTime(2099, 1, 1); |
| | | if (txt_fEndDate.Text.Length > 0 && txt_fBegDate.DateTime > txt_fEndDate.DateTime) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("生效日期不能大于失效日期!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("生效日期不能大于失效日期!"); |
| | | txt_fEndDate.Focus(); return; |
| | | } |
| | | decimal num = 0; |
| | | int num2 = 0; |
| | | if (!int.TryParse(txt_fSumPeople.Text.Trim(), out num2)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请输入正确的定员!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的定员!"); |
| | | txt_fSumPeople.Focus(); return; |
| | | } |
| | | if (!decimal.TryParse(txt_fCapacity.Text.Trim(), out num)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请输入正确的产能!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的产能!"); |
| | | txt_fCapacity.Focus(); return; |
| | | } |
| | | if (!decimal.TryParse(txt_fMaxWeight.Text.Trim(), out num)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请输入正确的重量上限!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的重量上限!"); |
| | | txt_fMaxWeight.Focus(); return; |
| | | } |
| | | if (!decimal.TryParse(txt_fMinWeight.Text.Trim(), out num)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("请输入正确的重量下限!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请输入正确的重量下限!"); |
| | | txt_fMinWeight.Focus(); return; |
| | | } |
| | | //上限不能低于下限 |
| | | if (decimal.Parse(txt_fMaxWeight.Text.Trim()) < decimal.Parse(txt_fMinWeight.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowInformation("上限不能低于下限!"); |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("上限不能低于下限!"); |
| | | txt_fMaxWeight.Focus(); return; |
| | | } |
| | | var _obj = new |
| | |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | ToolBox.MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | toolBarMenu1.isSetBtn = true; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | |
| | | toolBarMenu1.currentAction = ""; |
| | | //Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | ToolBox.MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | getModel(rowGuid); |
| | |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | var _obj = new |
| | |
| | | } |
| | | else |
| | | { |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_itemNo, gridView1, "itemNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?")) |
| | |
| | | _webServiceName + "EditModelSubmit", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); |
| | | if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) |
| | | { |
| | | MsgHelper.ShowInformation(_rtn.rtnData.outMsg.ToString()); |
| | | getModel(lbGuid.Text.Trim()); |
| | | } |
| | | else |
| | | MsgHelper.ShowError(_rtn.rtnData.outMsg.ToString()); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | if (_rtn.rtnCode > 0) getModel(lbGuid.Text); |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | getModel(lbGuid.Text); |
| | | } |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | } |
| | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | } |