| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | |
| | | using Gs.DevApp.UserControl; |
| | | using Newtonsoft.Json; |
| | | using Newtonsoft.Json.Linq; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm |
| | | { |
| | |
| | | public Frm_MesInvItemArn() |
| | | { |
| | | InitializeComponent(); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick; |
| | | toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; |
| | | toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; |
| | |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, picCheckBox, this, "fstatus", "", (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; |
| | | //设置组织 |
| | |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请先选择供应商,才能选择来料明细!"); |
| | | return; |
| | | } |
| | | var frm = new SelectCgMx(this.txt_suppId.GetId(), txt_receiveOrgId.GetId(), (txt_fType.Checked == true ? 2 : 1).ToString()); |
| | | var frm = new SelectCgMx(this.txt_suppId.GetId(), txt_receiveOrgId.GetId()); |
| | | //赋值给明细表 |
| | | frm.UpdateParent += (ss, ee) => |
| | | { |
| | |
| | | }; |
| | | frm.ShowDialog(); |
| | | }; |
| | | |
| | | } |
| | | |
| | | 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(); |
| | | } |
| | |
| | | Remark = txt_remark.Text.Trim(), //备注 |
| | | SuppId = _gysId, //供应商 |
| | | DepotsId = _ckId,//仓库 |
| | | FType = txt_fType.Checked ? 1 : 0,//0=采购,1=委外 |
| | | OrgId = _orgId, |
| | | list = new List<dynamic>(), |
| | | }; |
| | |
| | | ItemId = int.Parse(row["itemId"].ToString()), |
| | | Quantity = decimal.Parse(row["quantity"].ToString()), |
| | | UrgentFlag = Gs.DevApp.ToolBox.UtilityHelper.ToBit(row["urgentFlag"].ToString()), |
| | | Remark = row["memo"].ToString(), |
| | | }); |
| | | } |
| | | } |
| | |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false); |
| | | toolBarMenu1.currentAction = ""; |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | { |
| | | gcMain1.DataSource = dt; |
| | | gcMain1.ForceInitialize(); |
| | | gridView1.BestFitColumns(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | |
| | | gcMx1.DataSource = dt; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.BestFitColumns(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); |
| | | } |
| | | else |
| | | { |