| | |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | |
| | | }); |
| | | }, tips); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | |
| | | var rtn = UtilityHelper.ReturnToTablePage(strReturn); |
| | | var dt = rtn.rtnData.list; |
| | | this.repositoryItemSearchLookUpEdit1.DataSource = dt; |
| | | // repositoryItemSearchLookUpEdit1.BestFitMode = DevExpress.XtraEditors.Controls.BestFitMode.BestFitResizePopup; |
| | | //Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView2); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | }; |
| | | |
| | | this.gvMx1.InitNewRow += (s, e) => |
| | | { |
| | | string _orgId = txt_fapporgid.GetId(); |
| | | string _orgName = txt_fapporgid.GetName(); |
| | | if (string.IsNullOrEmpty(_orgId)) return; |
| | | |
| | | gvMx1.SetFocusedRowCellValue("dcOrg", _orgName); |
| | | gvMx1.SetFocusedRowCellValue("dcOrgGuid", _orgId); |
| | | gvMx1.SetFocusedRowCellValue("drOrg", _orgName); |
| | | gvMx1.SetFocusedRowCellValue("drOrgGuid", _orgId); |
| | | gvMx1.SetFocusedRowCellValue("drHz", _orgName); |
| | | gvMx1.SetFocusedRowCellValue("drHzGuid", _orgId); |
| | | gvMx1.SetFocusedRowCellValue("dcHz", _orgName); |
| | | gvMx1.SetFocusedRowCellValue("dcHzGuid", _orgId); |
| | | }; |
| | | } |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | { |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl( splitMx1.Panel1.Controls, true, gvList); |
| | | UtilityHelper.ChangeEnableByControl(splitMx1.Panel1.Controls, true, gvList); |
| | | } |
| | | } |
| | | /// <summary> |
| | |
| | | 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; |
| | | } |
| | | //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()), //主建 |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 选择物料 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemSearchLookUpEdit1_EditValueChanged(object sender, EventArgs e) |
| | | { |
| | | SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit; |
| | |
| | | gvMx1.UpdateCurrentRow(); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 删除物料 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | |
| | | private void rptDrHz_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | //if (rowhandle < 0) |
| | | // return; |
| | | int _drhzlx = txt_fOwnerTypeInIdHead.SelectedIndex; |
| | | if (_drhzlx <= 0) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调入货主类型!"); |
| | | return; |
| | | } |
| | | //if (_drhzlx <= 0) |
| | | //{ |
| | | // MsgHelper.Warning("提示:请先选择调入货主类型!"); |
| | | // return; |
| | | //} |
| | | SelectHz frm = new SelectHz("", _drhzlx.ToString()); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | |
| | | lst = ee.DynamicList; |
| | | gvMx1.SetFocusedRowCellValue("drHz", lst[0].name); |
| | | gvMx1.SetFocusedRowCellValue("drHzGuid", lst[0].guid); |
| | | |
| | | }; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | private void rptDcHz_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | | var rowhandle = gvMx1.FocusedRowHandle; |
| | | if (rowhandle < 0) |
| | | return; |
| | | //if (rowhandle < 0) |
| | | // return; |
| | | int _drhzlx = txt_fOwnerTypeIdHead.SelectedIndex; |
| | | if (_drhzlx <= 0) |
| | | { |
| | | MsgHelper.Warning("提示:请先选择调出货主类型!"); |
| | | return; |
| | | } |
| | | //if (_drhzlx <= 0) |
| | | //{ |
| | | // MsgHelper.Warning("提示:请先选择调出货主类型!"); |
| | | // return; |
| | | //} |
| | | SelectHz frm = new SelectHz("", _drhzlx.ToString()); |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |