| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "chkStatus", "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | }); |
| | | |
| | | }, tips); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) => |
| | | { |
| | | getModel(value); |
| | | }, (value) => |
| | | { |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | }); |
| | | }, lbGuid); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | //设置申请组织 |
| | |
| | | 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) |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_fBillNo, gridView1, "fBillNo"); |
| | | lbGuid, txt_fBillNo, gridView1, "FBillNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | } |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | string rowGuid = "", rowName = ""; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "billno"); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim()); |
| | | getModel(rowGuid); |
| | | } |
| | | else |
| | | { |
| | | 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> |
| | |
| | | gridViews.Add(gvMx1); |
| | | UtilityHelper.CleanValueByControl(this.layoutMx1.Controls, true, gridViews); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx1, gvMx1); |
| | | |
| | | } |
| | | /// <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()), //主建 |
| | |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain1.BindingContext = new BindingContext(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | gcMain1.DataSource = dt; |
| | | gcMain1.ForceInitialize(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | |
| | | gcMx1.DataSource = dt; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.BestFitColumns(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); |
| | | } |
| | | else |
| | | { |
| | |
| | | }; |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "fBillNo"); |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "FBillNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | { |
| | | 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) => |
| | | { |