| | |
| | | using DevExpress.Pdf.Native.BouncyCastle.Utilities.Collections; |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | |
| | | { |
| | | |
| | | }; |
| | | //设置工单 |
| | | this.txt_bl001.EditChanged += (s, e) => |
| | | { |
| | | |
| | | txt_bl002.Text = txt_bl001.GetPrdNo(); |
| | | txt_bl014.Text = txt_bl001.GetPrdName(); |
| | | txt_bl015.Text = txt_bl001.GetPrdModel(); |
| | | txt_bl011.Text = txt_bl001.GetWorkName(); |
| | | txt_bl012.Text = txt_bl001.GetWorkXb(); |
| | | }; |
| | | var _obj = new |
| | | { |
| | |
| | | return; |
| | | } |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim()); |
| | | } |
| | | else |
| | | { |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 新增事件 |
| | |
| | | txt_bl010.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_bl017.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择单据类型!"); |
| | | txt_bl017.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | inGdId = inGdId,//工单号 |
| | | inCkId = inCkId,//仓库 |
| | | inYy = txt_bl007.Text.Trim(),//原因 |
| | | inType = txt_bl017.Text.Trim(), |
| | | list = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | |
| | | if (row != null) |
| | | { |
| | | Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); |
| | | //string _msl = row["quantity"].ToString(); |
| | | //if (string.IsNullOrEmpty(_msl)) |
| | | //{ |
| | | // MsgHelper.ShowError("数量不能为空!"); |
| | | // return; |
| | | //} |
| | | string _msl = row["bld007"].ToString(); |
| | | if (string.IsNullOrEmpty(_msl)) |
| | | { |
| | | MsgHelper.ShowError("数量不能为空!"); |
| | | return; |
| | | } |
| | | _obj.list.Add(new |
| | | { |
| | | Guid = _guid, |
| | | DabGuid= (row["dabGuid"].ToString()), |
| | | DabGuid = (row["dabGuid"].ToString()), |
| | | ItemId = (row["bld012"].ToString()), |
| | | Sqsl = (row["bld007"].ToString()), |
| | | Bz = (row["bld010"].ToString()), |
| | |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow(); |
| | | gvMx1.SetFocusedRowCellValue("bld002", SelectedDataRow["itemNo"]); |
| | | gvMx1.SetFocusedRowCellValue("bld003", SelectedDataRow["itemName"]); |
| | | gvMx1.SetFocusedRowCellValue("bld004", SelectedDataRow["itemModel"]); |
| | | gvMx1.SetFocusedRowCellValue("bld004", SelectedDataRow["itemModel"]); |
| | | gvMx1.SetFocusedRowCellValue("dabGuid", SelectedDataRow["dabGuid"]); |
| | | } |
| | | |
| | |
| | | if (e.Button.Index == 0) |
| | | { |
| | | var dr = gvMx1.GetDataRow(rowhandle); |
| | | var mxGuid = dr["id"].ToString(); |
| | | var mxGuid = dr["guid"].ToString(); |
| | | if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?")) |
| | | return; |
| | | if (string.IsNullOrEmpty(mxGuid)) |