| | |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | txt_depotId.getSuppler(""); |
| | | txt_suppId.getSuppler(""); |
| | | txt_thOrgId.EditChanged += (s, e) => |
| | | { |
| | | var orgId = txt_thOrgId.GetId(); |
| | | if (string.IsNullOrEmpty(orgId)) |
| | | return; |
| | | txt_suppId.getSuppler(orgId); |
| | | txt_depotId.getSuppler(orgId); |
| | | }; |
| | | //选择需要的明细 |
| | | btnSelect.Click += (s, e) => |
| | | { |
| | |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择供应商,才能选择来料明细!"); |
| | | return; |
| | | } |
| | | var frm = new SelectMesCgthSq(this.txt_suppId.GetId()); |
| | | var frm = new SelectMesCgthSq(this.txt_suppId.GetId(),this.txt_suppId.GetId(), (txt_isOut.Checked == true ? 2 : 1).ToString()); |
| | | //赋值给明细表 |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1, "blNo"); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1, "billNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | | 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> |
| | | /// 新增事件 |
| | |
| | | toolBarMenu1.isSetBtn = false; |
| | | var _ckId = txt_depotId.GetId(); //仓库编号 depots_code |
| | | var _gysId = txt_suppId.GetId(); //供应商编号 |
| | | string _orgId = txt_thOrgId.GetId(); |
| | | if (string.IsNullOrEmpty(_orgId)) |
| | | { |
| | | MsgHelper.Warning("请选择组织!"); |
| | | txt_thOrgId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_gysId)) |
| | | { |
| | | MsgHelper.Warning("请选择供应商!"); |
| | |
| | | } |
| | | if (string.IsNullOrEmpty(txt_returnType.Text.Trim())) |
| | | { |
| | | MsgHelper.Warning("请选择退料类型!"); |
| | | MsgHelper.Warning("请选择退料原因!"); |
| | | txt_returnType.Focus(); |
| | | return; |
| | | } |
| | |
| | | DepotId = int.Parse(_ckId),//仓库 |
| | | FType = txt_isOut.Checked == true ? 1 : 0, //0=采购,1=委外 |
| | | Fmrmode = txt_returnMethod.Text,//退料方式 |
| | | Reason = txt_returnType.Text,//退料类型 |
| | | Reason = txt_returnType.Text,//退料原因 |
| | | list = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | gridView1.BestFitColumns(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | |
| | | gcMx1.BindingContext = new BindingContext(); |
| | | gcMx1.DataSource = dt; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.BestFitColumns(); |
| | | } |
| | | else |
| | | { |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 工具条事件 |
| | | /// </summary> |
| | |
| | | } |
| | | |
| | | } |
| | | |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | gvMx1.CloseEditor(); |