| | |
| | | using DevExpress.XtraPivotGrid.Data; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using Newtonsoft.Json; |
| | |
| | | //移入 |
| | | btnIn.Click += (s, e) => |
| | | { |
| | | if (lbGuid.Text.Length <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先保存方案!"); |
| | | return; |
| | | } |
| | | string strItemsGuids = frm_CqfaItems2.GetSelect(); |
| | | if (string.IsNullOrEmpty(strItemsGuids)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先勾选需要移入的物料!"); |
| | | return; |
| | | } |
| | | _toolOutIn(1, strItemsGuids); |
| | | }; |
| | | //移出 |
| | | btnOut.Click += (s, e) => |
| | | { |
| | | if (lbGuid.Text.Length <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先保存方案!"); |
| | | return; |
| | | } |
| | | string strItemsGuids = frm_CqfaItems1.GetSelect(); |
| | | if (string.IsNullOrEmpty(strItemsGuids)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先勾选需要移出的物料!"); |
| | | return; |
| | | } |
| | | _toolOutIn(0, strItemsGuids); |
| | | }; |
| | | } |
| | |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "DeleteModelOrMx", |
| | | _webServiceName + "DeleteModel", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 0) |
| | | { } |
| | | else |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | |
| | | txt_fabm.ReadOnly = true; |
| | | txt_fSubsidiary.Enabled = false; |
| | | } |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 新增事件 |
| | |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | string _fabm = txt_fabm.Text.Trim(); |
| | | string _famc = txt_famc.Text.Trim(); |
| | | string _yjrq = txt_yjrq.Text.Trim(); |
| | | string _bzqx = txt_bzqx.Text.Trim(); |
| | | string _fjxz = txt_fjxz.Text.Trim(); |
| | | string _bz = txt_bz.Text.Trim(); |
| | | string _fSubsidiary = txt_fSubsidiary.GetId(); |
| | | if (string.IsNullOrEmpty(_fSubsidiary)) |
| | | { |
| | | MsgHelper.ShowError("组织不能为空!"); |
| | | txt_fSubsidiary.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_famc)) |
| | | { |
| | | MsgHelper.ShowError("方案编码不能为空!"); |
| | | txt_fabm.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_famc)) |
| | |
| | | txt_bzqx.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_fjxz)) |
| | | { |
| | | MsgHelper.ShowError("复检限值(次)不能为空!"); |
| | | txt_fjxz.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(lbGuid.Text.Trim()), |
| | | yjrq = (_yjrq), |
| | | bzqx = (_bzqx), |
| | | fjxz = (_fjxz), |
| | | fjxz = (0), |
| | | famc = _famc.Trim(), |
| | | fabm = _fabm.Trim(), |
| | | bz = _bz.Trim(), |
| | | fSubsidiary = _fSubsidiary.Trim(), |
| | | }; |
| | |
| | | _webServiceName + "EditModel", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg); |
| | |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false); |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | getModel(lbGuid.Text); |
| | | } |
| | | else |
| | | MsgHelper.ShowError("提示:" + _rtn.rtnMsg); |
| | |
| | | if (toolBarMenu1.currentAction == "edit") isEdit = true; |
| | | if (string.IsNullOrEmpty(strGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | ToolBox.MsgHelper.ShowError("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | var _obj = new |
| | |
| | | dynamic dy = _rtn.rtnData; |
| | | lbGuid.Text = strGuid; |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit); |
| | | frm_CqfaItems1.Initialize(lbGuid.Text.Trim(), QcSeason.cqcjyes.ToString(), txt_fSubsidiary.GetId()); |
| | | frm_CqfaItems1.Initialize(lbGuid.Text.Trim(), QcSeason.cqcjyes.ToString(), txt_fSubsidiary.GetId()); |
| | | frm_CqfaItems2.Initialize(lbGuid.Text.Trim(), QcSeason.cqcjno.ToString(), txt_fSubsidiary.GetId()); |
| | | } |
| | | else |
| | |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?")) |
| | | if (!MsgHelper.AskQuestion("确定把所选择的物料【"+ strMsg + "】方案【" + rowName + "】吗?")) |
| | | return; |
| | | var _obj = new |
| | | { |