| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx( gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter( gridView1, picCheckBox, this, "shState", "", (value) => |
| | | toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; |
| | | // Gs.DevApp.ToolBox.DragResizeHelp.RegisterControl(this, this.panelControl3, splitContainerControl1. splitMx1.Panel1, label1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "chkStatus", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | |
| | | }); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | //设置仓库选择 |
| | | txt_invFcode.getSuppler(""); |
| | | txt_fromFcode.getSuppler(""); |
| | | this.txt_invFcode.EditChanged += (s, e) => |
| | | //设置申请组织 |
| | | this.txt_fapporgid.EditChanged += (s, e) => |
| | | { |
| | | txt_fstockoutorgidNo.Text = txt_invFcode.GetOrgName(); |
| | | txt_fowneroutidhead.Text = txt_invFcode.GetOrgId(); |
| | | var _obj = new |
| | | { |
| | | currentPage = 1, |
| | | everyPageSize = 999999, |
| | | sortName = "", |
| | | keyWhere = "", |
| | | }; |
| | | string _sqGuid = txt_fapporgid.GetId(); |
| | | if (string.IsNullOrEmpty(_sqGuid)) |
| | | return; |
| | | System.Text.StringBuilder sbWhere = new System.Text.StringBuilder(); |
| | | sbWhere.Append(" and a.FSubsidiary ='" + _sqGuid + "'"); |
| | | var _obj = new PageQueryModel(1, 999999, "item_no", "asc", "", sbWhere.ToString(), ""); |
| | | var json = JsonConvert.SerializeObject(_obj); |
| | | try |
| | | { |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | }; |
| | | this.txt_fromFcode.EditChanged += (s, e) => { |
| | | txt_fstockorgidNo.Text = txt_fromFcode.GetOrgName(); |
| | | txt_fowneridhead.Text = txt_fromFcode.GetOrgId(); |
| | | }; |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_billno, gridView1, "billno"); |
| | | lbGuid, txt_fBillNo, gridView1, "fBillNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | getModel(lbGuid.Text.Trim()); |
| | | else |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | //_filterList.Clear(); |
| | | //if (gridView1.ActiveFilter.Count > 0) |
| | | //{ |
| | | // gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | // gridView1.ActiveFilter.Clear(); |
| | | // gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | //} |
| | | //getPageList(1); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billno, gridView1, "billno"); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "billno"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(rowGuid); |
| | | 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); |
| | | UtilityHelper.ChangeEnableByControl( splitMx1.Panel1.Controls, true, gvList); |
| | | |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 4); |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews); |
| | | UtilityHelper.CleanValueByControl(this. splitMx1.Panel1.Controls, true, gridViews); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | |
| | | } |
| | |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | string _inCkId = txt_invFcode.GetId();//出 |
| | | string _inRkId = txt_fromFcode.GetId();//入 |
| | | if (string.IsNullOrEmpty(_inCkId)) |
| | | string djlx = txt_fBillTypeID.Text.ToString(); |
| | | string ywlx = txt_fBusinessType.Text.ToString(); |
| | | string dbfx = txt_fTransferDirect.Text.ToString(); |
| | | string sqOrg = txt_fapporgid.GetId(); |
| | | string dblx = txt_ftranstype.Text.ToString(); |
| | | string dchzlx = txt_fOwnerTypeIdHead.Text.ToString(); |
| | | string drhzlx = txt_fOwnerTypeInIdHead.Text.ToString(); |
| | | //if (txt_fBillTypeID.SelectedIndex <= 0) |
| | | //{ |
| | | // Gs.DevApp.ToolBox.MsgHelper.Warning("请选择单据类型!"); |
| | | // txt_fBillTypeID.Focus(); |
| | | // return; |
| | | //} |
| | | if (txt_fTransferDirect.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择出货仓库!"); |
| | | txt_invFcode.Focus(); |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调拨方向!"); |
| | | txt_fTransferDirect.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_inRkId)) |
| | | if (string.IsNullOrEmpty(sqOrg)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择收货仓库!"); |
| | | txt_fromFcode.Focus(); |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择申请组织!"); |
| | | txt_fapporgid.Focus(); |
| | | return; |
| | | } |
| | | if (txt_fOwnerTypeIdHead.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调出货主类型!"); |
| | | txt_fOwnerTypeIdHead.Focus(); |
| | | return; |
| | | } |
| | | if (txt_fOwnerTypeInIdHead.SelectedIndex <= 0) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("请选择调入货主类型!"); |
| | | txt_fOwnerTypeInIdHead.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | inCkId = _inCkId,//出仓 |
| | | inRkId = _inRkId,//入库 |
| | | inDjlx= txt_fbilltypeid.Text.Trim(),//单据类型 |
| | | inDbfx= txt_ftransferdirect.Text.Trim(),//调拨方向 |
| | | inRemark = txt_remark.Text.Trim(),//备注 |
| | | djlx = djlx,//单据类型 |
| | | ywlx = ywlx,//业务类型 |
| | | dbfx = dbfx,//调拨方向 |
| | | sqOrg = sqOrg,//审请组织 |
| | | dblx = dblx,//调拨类型 |
| | | dchzlx = dchzlx,//调出货主类型 |
| | | drhzlx = drhzlx,//调入货主类型 |
| | | inRemark = txt_fRemarks.Text.Trim(),//备注 |
| | | list = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | |
| | | MsgHelper.ShowError("数量不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["dcOrgGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调出组织不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["dcCkGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调出仓库不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["drOrgGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调入组织不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["drCkGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调入仓库不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["dcHzGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调出货主不能为空!"); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(row["drHzGuid"].ToString())) |
| | | { |
| | | MsgHelper.ShowError("调入货主不能为空!"); |
| | | return; |
| | | } |
| | | _obj.list.Add(new |
| | | { |
| | | Guid = _guid, |
| | | ItemId = (row["itemId"].ToString()), |
| | | Sqsl = (row["shNum"].ToString()), |
| | | Bz = (row["remark"].ToString()), |
| | | dczz = (row["dcOrgGuid"].ToString()), |
| | | dcck = (row["dcCkGuid"].ToString()), |
| | | drzz = (row["drOrgGuid"].ToString()), |
| | | drck = (row["drCkGuid"].ToString()), |
| | | dchz = (row["dcHzGuid"].ToString()), |
| | | drhz = (row["drHzGuid"].ToString()), |
| | | }); |
| | | } |
| | | } |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData.outGuid; |
| | | txt_billno.Text = _rtn.rtnData.outNo; |
| | | txt_fBillNo.Text = _rtn.rtnData.outNo; |
| | | toolBarMenu1.isSetBtn = true; |
| | | //List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | //gvList.Add(gvMx1); |
| | | //UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList); |
| | | //ucLookHuoZhu1.Enabled = false; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(this. splitMx1.Panel1.Controls, false, gvList); |
| | | toolBarMenu1.currentAction = ""; |
| | | } |
| | | } |
| | |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 日志 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLogClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_fBillNo, gridView1); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | gridView1.BestFitColumns(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | |
| | | lbGuid.Text = strGuid; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList); |
| | | UtilityHelper.SetValueByObj(this. splitMx1.Panel1.Controls, dy, isEdit, gvList); |
| | | JObject _job = JObject.Parse(strJson); |
| | | JArray array = new JArray(); |
| | | foreach (var a in _job["rtnData"]["list"]) |
| | |
| | | gcMx1.BindingContext = new BindingContext(); |
| | | gcMx1.DataSource = dt; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.BestFitColumns(); |
| | | } |
| | | else |
| | | { |
| | |
| | | }; |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billno, gridView1, "billno"); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "fBillNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | } |
| | | int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | | UtilityHelper.SetCheckIco(gridView1, "shState", "shBy", "shDate", picCheckBox, this, _inFieldValue.ToString()); |
| | | UtilityHelper.SetCheckIco(gridView1, "chkStatus", "FAPPROVEBY", "FAPPROVEDATE", picCheckBox, this, _inFieldValue.ToString()); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow(); |
| | | gvMx1.SetFocusedRowCellValue("itemNo", SelectedDataRow["itemNo"].ToString()); |
| | | gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"].ToString()); |
| | | gvMx1.SetFocusedRowCellValue("itemMpdel", SelectedDataRow["itemModel"].ToString()); |
| | | gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"].ToString()); |
| | | gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"].ToString()); |
| | | gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString()); |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | } |
| | | |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | |
| | | } |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 查找调出组织 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void rptDcOrg_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | SelectOrg frm = new SelectOrg(); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("dcOrg", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("dcOrgGuid", lst[0].guid); |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 查找调出仓库 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void rptDcCk_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | var dr = gvMx1.GetDataRow(rowhandle); |
| | | var strOrgGuid = dr["dcOrgGuid"].ToString(); |
| | | if (string.IsNullOrEmpty(strOrgGuid)) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调出组织!"); |
| | | return; |
| | | }; |
| | | SelectCk frm = new SelectCk(strOrgGuid); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("dcCk", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("dcCkGuid", lst[0].guid); |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 查找仓位 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void rptDcCw_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | var dr = gvMx1.GetDataRow(rowhandle); |
| | | if (dr["dcCkGuid"] == null) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调出仓库!"); |
| | | return; |
| | | }; |
| | | var strCkGuid = dr["dcCkGuid"].ToString(); |
| | | if (string.IsNullOrEmpty(strCkGuid)) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调出仓库!"); |
| | | return; |
| | | }; |
| | | SelectCw frm = new SelectCw(strCkGuid); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("dcCw", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("dcCwGuid", lst[0].guid); |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 调入组织 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void rptDrOrg_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | SelectOrg frm = new SelectOrg(); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("drOrg", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("drOrgGuid", lst[0].guid); |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 调入仓库 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void rptDrCk_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | var dr = gvMx1.GetDataRow(rowhandle); |
| | | var strOrgGuid = dr["drOrgGuid"].ToString(); |
| | | if (string.IsNullOrEmpty(strOrgGuid)) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调入组织!"); |
| | | return; |
| | | }; |
| | | SelectCk frm = new SelectCk(strOrgGuid); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("drCk", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("drCkGuid", lst[0].guid); |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 调入仓位 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void rptDrCw_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | var dr = gvMx1.GetDataRow(rowhandle); |
| | | if (dr["drCkGuid"] == null) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调入仓库!"); |
| | | return; |
| | | }; |
| | | var strCkGuid = dr["drCkGuid"].ToString(); |
| | | if (string.IsNullOrEmpty(strCkGuid)) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调入仓库!"); |
| | | return; |
| | | }; |
| | | SelectCw frm = new SelectCw(strCkGuid); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("drCw", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("drCwGuid", lst[0].guid); |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 调入货主 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void rptDrHz_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | int _drhzlx = txt_fOwnerTypeInIdHead.SelectedIndex; |
| | | if (_drhzlx <= 0) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调入货主类型!"); |
| | | return; |
| | | } |
| | | SelectHz frm = new SelectHz("", _drhzlx.ToString()); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("drHz", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("drHzGuid", lst[0].guid); |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 调出货主 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | |
| | | private void rptDcHz_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | int _drhzlx = txt_fOwnerTypeIdHead.SelectedIndex; |
| | | if (_drhzlx <= 0) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调出货主类型!"); |
| | | return; |
| | | } |
| | | SelectHz frm = new SelectHz("", _drhzlx.ToString()); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | | var lst = new List<dynamic>(); |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("dcHz", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("dcHzGuid", lst[0].guid); |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | | } |
| | | } |