| | |
| | | this.gv_lotFlag = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_itemSap = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_itemC = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_factory = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.lb_company = new DevExpress.XtraEditors.LabelControl(); |
| | | this.txt_company = new DevExpress.XtraEditors.TextEdit(); |
| | | this.lb_remark = new DevExpress.XtraEditors.LabelControl(); |
| | | this.txt_remark = new DevExpress.XtraEditors.TextEdit(); |
| | | this.gv_remark = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | |
| | | this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); |
| | | this.gcMain = new DevExpress.XtraGrid.GridControl(); |
| | | this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); |
| | | this.gv_org = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); |
| | | this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); |
| | | this.pageBar1 = new UserControls.Data.UcPageBar(); |
| | |
| | | this.lbGuid = new System.Windows.Forms.Label(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_fseller.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_fforbidstatus.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_company.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_remark.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_lastupdateBy.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_lastupdateDate.Properties)).BeginInit(); |
| | |
| | | // |
| | | this.lb_fseller.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_fseller.Appearance.Options.UseFont = true; |
| | | this.lb_fseller.Location = new System.Drawing.Point(567, 155); |
| | | this.lb_fseller.Location = new System.Drawing.Point(567, 124); |
| | | this.lb_fseller.Name = "lb_fseller"; |
| | | this.lb_fseller.Size = new System.Drawing.Size(56, 21); |
| | | this.lb_fseller.TabIndex = 298; |
| | |
| | | // |
| | | // txt_fseller |
| | | // |
| | | this.txt_fseller.Location = new System.Drawing.Point(626, 151); |
| | | this.txt_fseller.Location = new System.Drawing.Point(626, 120); |
| | | this.txt_fseller.Name = "txt_fseller"; |
| | | this.txt_fseller.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_fseller.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_itemC.VisibleIndex = 11; |
| | | this.gv_itemC.Width = 94; |
| | | // |
| | | // gv_factory |
| | | // |
| | | this.gv_factory.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.gv_factory.AppearanceCell.Options.UseFont = true; |
| | | this.gv_factory.Caption = "工厂编码 "; |
| | | this.gv_factory.FieldName = "factory"; |
| | | this.gv_factory.MinWidth = 50; |
| | | this.gv_factory.Name = "gv_factory"; |
| | | this.gv_factory.OptionsColumn.AllowEdit = false; |
| | | this.gv_factory.Tag = "query_a.factory"; |
| | | this.gv_factory.Visible = true; |
| | | this.gv_factory.VisibleIndex = 1; |
| | | this.gv_factory.Width = 94; |
| | | // |
| | | // lb_company |
| | | // |
| | | this.lb_company.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_company.Appearance.Options.UseFont = true; |
| | | this.lb_company.Location = new System.Drawing.Point(337, 191); |
| | | this.lb_company.Name = "lb_company"; |
| | | this.lb_company.Size = new System.Drawing.Size(39, 21); |
| | | this.lb_company.TabIndex = 258; |
| | | this.lb_company.Text = "公司 "; |
| | | // |
| | | // txt_company |
| | | // |
| | | this.txt_company.Location = new System.Drawing.Point(377, 187); |
| | | this.txt_company.Name = "txt_company"; |
| | | this.txt_company.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_company.Properties.Appearance.Options.UseFont = true; |
| | | this.txt_company.Size = new System.Drawing.Size(150, 28); |
| | | this.txt_company.TabIndex = 258; |
| | | // |
| | | // lb_remark |
| | | // |
| | | this.lb_remark.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_remark.Appearance.Options.UseFont = true; |
| | | this.lb_remark.Location = new System.Drawing.Point(584, 117); |
| | | this.lb_remark.Location = new System.Drawing.Point(584, 86); |
| | | this.lb_remark.Name = "lb_remark"; |
| | | this.lb_remark.Size = new System.Drawing.Size(39, 21); |
| | | this.lb_remark.TabIndex = 252; |
| | |
| | | // |
| | | // txt_remark |
| | | // |
| | | this.txt_remark.Location = new System.Drawing.Point(626, 113); |
| | | this.txt_remark.Location = new System.Drawing.Point(626, 82); |
| | | this.txt_remark.Name = "txt_remark"; |
| | | this.txt_remark.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_remark.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_createDate.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_createDate.Appearance.Options.UseFont = true; |
| | | this.lb_createDate.Location = new System.Drawing.Point(550, 84); |
| | | this.lb_createDate.Location = new System.Drawing.Point(303, 197); |
| | | this.lb_createDate.Name = "lb_createDate"; |
| | | this.lb_createDate.Size = new System.Drawing.Size(73, 21); |
| | | this.lb_createDate.TabIndex = 235; |
| | |
| | | // |
| | | // txt_createDate |
| | | // |
| | | this.txt_createDate.Location = new System.Drawing.Point(626, 80); |
| | | this.txt_createDate.Location = new System.Drawing.Point(379, 193); |
| | | this.txt_createDate.Name = "txt_createDate"; |
| | | this.txt_createDate.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_createDate.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_id.OptionsColumn.AllowEdit = false; |
| | | this.gv_id.Tag = "query_a.id"; |
| | | this.gv_id.Visible = true; |
| | | this.gv_id.VisibleIndex = 0; |
| | | this.gv_id.VisibleIndex = 1; |
| | | this.gv_id.Width = 94; |
| | | // |
| | | // toolBarMenu1 |
| | |
| | | this.gridView1.Appearance.Row.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.gridView1.Appearance.Row.Options.UseFont = true; |
| | | this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { |
| | | this.gv_org, |
| | | this.gv_id, |
| | | this.gv_factory, |
| | | this.gv_custNo, |
| | | this.gv_custName, |
| | | this.gv_custSname, |
| | |
| | | this.gridView1.OptionsFind.ShowSearchNavButtons = false; |
| | | this.gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | this.gridView1.OptionsView.ShowGroupPanel = false; |
| | | // |
| | | // gv_org |
| | | // |
| | | this.gv_org.Caption = "使用组织"; |
| | | this.gv_org.FieldName = "fSubsidiary"; |
| | | this.gv_org.MinWidth = 250; |
| | | this.gv_org.Name = "gv_org"; |
| | | this.gv_org.Tag = "org.fnamber"; |
| | | this.gv_org.Visible = true; |
| | | this.gv_org.VisibleIndex = 0; |
| | | this.gv_org.Width = 250; |
| | | // |
| | | // xtraTabControl1 |
| | | // |
| | |
| | | this.panel1.Controls.Add(this.txt_fseller); |
| | | this.panel1.Controls.Add(this.lb_fforbidstatus); |
| | | this.panel1.Controls.Add(this.txt_fforbidstatus); |
| | | this.panel1.Controls.Add(this.lb_company); |
| | | this.panel1.Controls.Add(this.txt_company); |
| | | this.panel1.Controls.Add(this.lb_remark); |
| | | this.panel1.Controls.Add(this.txt_remark); |
| | | this.panel1.Controls.Add(this.lb_lastupdateBy); |
| | |
| | | this.Name = "Frm_Customer"; |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_fseller.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_fforbidstatus.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_company.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_remark.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_lastupdateBy.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_lastupdateDate.Properties)).EndInit(); |
| | |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_lotFlag; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_itemSap; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_itemC; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_factory; |
| | | |
| | | private DevExpress.XtraEditors.LabelControl lb_company; |
| | | private DevExpress.XtraEditors.TextEdit txt_company; |
| | | |
| | | private DevExpress.XtraEditors.LabelControl lb_remark; |
| | | private DevExpress.XtraEditors.TextEdit txt_remark; |
| | |
| | | private DevExpress.XtraEditors.LabelControl lb_id; |
| | | private DevExpress.XtraEditors.TextEdit txt_id; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_id; |
| | | |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_org; |
| | | } |
| | | } |
| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Base; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm |
| | |
| | | public Frm_Customer() |
| | | { |
| | | InitializeComponent(); |
| | | this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | gridView1.CustomDrawRowIndicator += GridView1_CustomDrawRowIndicator; |
| | | gridView1.CustomDrawRowIndicator += |
| | | GridView1_CustomDrawRowIndicator; |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | private void GridView1_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e) |
| | | { |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | /// <summary> |
| | | /// 查询事件 |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | Gs.DevApp.UserControl.ShowFilter frm = new Gs.DevApp.UserControl.ShowFilter(gridView1.Columns, _filterList); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); |
| | | foreach (FilterEntity itm in _filterList) |
| | | { |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + itm.fileValue + "'"); |
| | | } |
| | | PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | { |
| | |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | this.lb_parentId = new DevExpress.XtraEditors.LabelControl(); |
| | | this.txt_parentId = new DevExpress.XtraEditors.TextEdit(); |
| | | this.gv_parentId = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.lb_materialProperti = new DevExpress.XtraEditors.LabelControl(); |
| | | this.txt_materialProperti = new DevExpress.XtraEditors.TextEdit(); |
| | |
| | | this.lb_departmentid = new DevExpress.XtraEditors.LabelControl(); |
| | | this.txt_departmentid = new DevExpress.XtraEditors.TextEdit(); |
| | | this.gv_departmentid = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.lb_company = new DevExpress.XtraEditors.LabelControl(); |
| | | this.txt_company = new DevExpress.XtraEditors.TextEdit(); |
| | | this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); |
| | | this.gcMain = new DevExpress.XtraGrid.GridControl(); |
| | | this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); |
| | |
| | | this.panel1 = new System.Windows.Forms.Panel(); |
| | | this.labelControl11 = new DevExpress.XtraEditors.LabelControl(); |
| | | this.lbGuid = new System.Windows.Forms.Label(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_parentId.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_materialProperti.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_productionWorkshop.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_remark.Properties)).BeginInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_departmentname.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_departmentcode.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_departmentid.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_company.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); |
| | |
| | | this.xtraTabPage2.SuspendLayout(); |
| | | this.panel1.SuspendLayout(); |
| | | this.SuspendLayout(); |
| | | // |
| | | // lb_parentId |
| | | // |
| | | this.lb_parentId.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_parentId.Appearance.Options.UseFont = true; |
| | | this.lb_parentId.Location = new System.Drawing.Point(28, 184); |
| | | this.lb_parentId.Name = "lb_parentId"; |
| | | this.lb_parentId.Size = new System.Drawing.Size(73, 21); |
| | | this.lb_parentId.TabIndex = 312; |
| | | this.lb_parentId.Text = "上级部门 "; |
| | | // |
| | | // txt_parentId |
| | | // |
| | | this.txt_parentId.Location = new System.Drawing.Point(106, 180); |
| | | this.txt_parentId.Name = "txt_parentId"; |
| | | this.txt_parentId.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_parentId.Properties.Appearance.Options.UseFont = true; |
| | | this.txt_parentId.Size = new System.Drawing.Size(150, 28); |
| | | this.txt_parentId.TabIndex = 312; |
| | | // |
| | | // gv_parentId |
| | | // |
| | |
| | | this.gv_parentId.MinWidth = 150; |
| | | this.gv_parentId.Name = "gv_parentId"; |
| | | this.gv_parentId.OptionsColumn.AllowEdit = false; |
| | | this.gv_parentId.Tag = "query_a.parent_id"; |
| | | this.gv_parentId.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_parentId.Tag = "query_c.Departmentname"; |
| | | this.gv_parentId.Visible = true; |
| | | this.gv_parentId.VisibleIndex = 13; |
| | | this.gv_parentId.Width = 150; |
| | |
| | | // |
| | | this.lb_materialProperti.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_materialProperti.Appearance.Options.UseFont = true; |
| | | this.lb_materialProperti.Location = new System.Drawing.Point(270, 91); |
| | | this.lb_materialProperti.Location = new System.Drawing.Point(270, 87); |
| | | this.lb_materialProperti.Name = "lb_materialProperti"; |
| | | this.lb_materialProperti.Size = new System.Drawing.Size(73, 21); |
| | | this.lb_materialProperti.TabIndex = 291; |
| | |
| | | // |
| | | // txt_materialProperti |
| | | // |
| | | this.txt_materialProperti.Location = new System.Drawing.Point(349, 91); |
| | | this.txt_materialProperti.Location = new System.Drawing.Point(349, 83); |
| | | this.txt_materialProperti.Name = "txt_materialProperti"; |
| | | this.txt_materialProperti.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_materialProperti.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | // txt_productionWorkshop |
| | | // |
| | | this.txt_productionWorkshop.Location = new System.Drawing.Point(106, 150); |
| | | this.txt_productionWorkshop.Location = new System.Drawing.Point(107, 150); |
| | | this.txt_productionWorkshop.Name = "txt_productionWorkshop"; |
| | | this.txt_productionWorkshop.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_productionWorkshop.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_productionWorkshop.MinWidth = 50; |
| | | this.gv_productionWorkshop.Name = "gv_productionWorkshop"; |
| | | this.gv_productionWorkshop.OptionsColumn.AllowEdit = false; |
| | | this.gv_productionWorkshop.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_productionWorkshop.Tag = "query_a.production_workshop"; |
| | | this.gv_productionWorkshop.Visible = true; |
| | | this.gv_productionWorkshop.VisibleIndex = 12; |
| | |
| | | // |
| | | this.lb_remark.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_remark.Appearance.Options.UseFont = true; |
| | | this.lb_remark.Location = new System.Drawing.Point(573, 119); |
| | | this.lb_remark.Location = new System.Drawing.Point(304, 154); |
| | | this.lb_remark.Name = "lb_remark"; |
| | | this.lb_remark.Size = new System.Drawing.Size(39, 21); |
| | | this.lb_remark.TabIndex = 273; |
| | |
| | | // |
| | | // txt_remark |
| | | // |
| | | this.txt_remark.Location = new System.Drawing.Point(618, 115); |
| | | this.txt_remark.Location = new System.Drawing.Point(349, 150); |
| | | this.txt_remark.Name = "txt_remark"; |
| | | this.txt_remark.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_remark.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_remark.MinWidth = 50; |
| | | this.gv_remark.Name = "gv_remark"; |
| | | this.gv_remark.OptionsColumn.AllowEdit = false; |
| | | this.gv_remark.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_remark.Tag = "query_a.remark"; |
| | | this.gv_remark.Visible = true; |
| | | this.gv_remark.VisibleIndex = 11; |
| | |
| | | this.gv_factory.MinWidth = 250; |
| | | this.gv_factory.Name = "gv_factory"; |
| | | this.gv_factory.OptionsColumn.AllowEdit = false; |
| | | this.gv_factory.Tag = "query_a.factory"; |
| | | this.gv_factory.OptionsFilter.AllowFilterModeChanging = DevExpress.Utils.DefaultBoolean.False; |
| | | this.gv_factory.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_factory.Tag = "org.fnamber"; |
| | | this.gv_factory.Visible = true; |
| | | this.gv_factory.VisibleIndex = 0; |
| | | this.gv_factory.Width = 250; |
| | |
| | | // |
| | | // txt_fmanager |
| | | // |
| | | this.txt_fmanager.Location = new System.Drawing.Point(106, 115); |
| | | this.txt_fmanager.Location = new System.Drawing.Point(107, 115); |
| | | this.txt_fmanager.Name = "txt_fmanager"; |
| | | this.txt_fmanager.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_fmanager.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_fmanager.MinWidth = 50; |
| | | this.gv_fmanager.Name = "gv_fmanager"; |
| | | this.gv_fmanager.OptionsColumn.AllowEdit = false; |
| | | this.gv_fmanager.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_fmanager.Tag = "query_a.fmanager"; |
| | | this.gv_fmanager.Visible = true; |
| | | this.gv_fmanager.VisibleIndex = 10; |
| | |
| | | // |
| | | this.lb_workshopName.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_workshopName.Appearance.Options.UseFont = true; |
| | | this.lb_workshopName.Location = new System.Drawing.Point(287, 119); |
| | | this.lb_workshopName.Location = new System.Drawing.Point(543, 87); |
| | | this.lb_workshopName.Name = "lb_workshopName"; |
| | | this.lb_workshopName.Size = new System.Drawing.Size(56, 21); |
| | | this.lb_workshopName.TabIndex = 240; |
| | |
| | | // |
| | | // txt_workshopName |
| | | // |
| | | this.txt_workshopName.Location = new System.Drawing.Point(349, 115); |
| | | this.txt_workshopName.Location = new System.Drawing.Point(605, 83); |
| | | this.txt_workshopName.Name = "txt_workshopName"; |
| | | this.txt_workshopName.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_workshopName.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_workshopName.MinWidth = 150; |
| | | this.gv_workshopName.Name = "gv_workshopName"; |
| | | this.gv_workshopName.OptionsColumn.AllowEdit = false; |
| | | this.gv_workshopName.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_workshopName.Tag = "query_a.workshop_name"; |
| | | this.gv_workshopName.Visible = true; |
| | | this.gv_workshopName.VisibleIndex = 9; |
| | |
| | | // |
| | | this.lb_workshopNo.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_workshopNo.Appearance.Options.UseFont = true; |
| | | this.lb_workshopNo.Location = new System.Drawing.Point(555, 84); |
| | | this.lb_workshopNo.Location = new System.Drawing.Point(542, 52); |
| | | this.lb_workshopNo.Name = "lb_workshopNo"; |
| | | this.lb_workshopNo.Size = new System.Drawing.Size(57, 21); |
| | | this.lb_workshopNo.TabIndex = 235; |
| | |
| | | // |
| | | // txt_workshopNo |
| | | // |
| | | this.txt_workshopNo.Location = new System.Drawing.Point(618, 84); |
| | | this.txt_workshopNo.Location = new System.Drawing.Point(605, 48); |
| | | this.txt_workshopNo.Name = "txt_workshopNo"; |
| | | this.txt_workshopNo.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_workshopNo.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_workshopNo.MinWidth = 50; |
| | | this.gv_workshopNo.Name = "gv_workshopNo"; |
| | | this.gv_workshopNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_workshopNo.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_workshopNo.Tag = "query_a.workshop_no"; |
| | | this.gv_workshopNo.Visible = true; |
| | | this.gv_workshopNo.VisibleIndex = 8; |
| | |
| | | // |
| | | this.lb_depextr4.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_depextr4.Appearance.Options.UseFont = true; |
| | | this.lb_depextr4.Location = new System.Drawing.Point(7, 84); |
| | | this.lb_depextr4.Location = new System.Drawing.Point(7, 87); |
| | | this.lb_depextr4.Name = "lb_depextr4"; |
| | | this.lb_depextr4.Size = new System.Drawing.Size(94, 21); |
| | | this.lb_depextr4.TabIndex = 228; |
| | |
| | | // |
| | | // txt_depextr4 |
| | | // |
| | | this.txt_depextr4.Location = new System.Drawing.Point(106, 84); |
| | | this.txt_depextr4.Location = new System.Drawing.Point(107, 83); |
| | | this.txt_depextr4.Name = "txt_depextr4"; |
| | | this.txt_depextr4.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_depextr4.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_depextr4.MinWidth = 50; |
| | | this.gv_depextr4.Name = "gv_depextr4"; |
| | | this.gv_depextr4.OptionsColumn.AllowEdit = false; |
| | | this.gv_depextr4.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_depextr4.Tag = "query_a.depextr4"; |
| | | this.gv_depextr4.Visible = true; |
| | | this.gv_depextr4.VisibleIndex = 7; |
| | |
| | | // |
| | | this.lb_depextr3.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_depextr3.Appearance.Options.UseFont = true; |
| | | this.lb_depextr3.Location = new System.Drawing.Point(274, 154); |
| | | this.lb_depextr3.Location = new System.Drawing.Point(274, 119); |
| | | this.lb_depextr3.Name = "lb_depextr3"; |
| | | this.lb_depextr3.Size = new System.Drawing.Size(69, 21); |
| | | this.lb_depextr3.TabIndex = 226; |
| | |
| | | // |
| | | // txt_depextr3 |
| | | // |
| | | this.txt_depextr3.Location = new System.Drawing.Point(348, 150); |
| | | this.txt_depextr3.Location = new System.Drawing.Point(349, 115); |
| | | this.txt_depextr3.Name = "txt_depextr3"; |
| | | this.txt_depextr3.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_depextr3.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_depextr3.MinWidth = 50; |
| | | this.gv_depextr3.Name = "gv_depextr3"; |
| | | this.gv_depextr3.OptionsColumn.AllowEdit = false; |
| | | this.gv_depextr3.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_depextr3.Tag = "query_a.depextr3"; |
| | | this.gv_depextr3.Visible = true; |
| | | this.gv_depextr3.VisibleIndex = 6; |
| | |
| | | // |
| | | this.lb_depextr2.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_depextr2.Appearance.Options.UseFont = true; |
| | | this.lb_depextr2.Location = new System.Drawing.Point(539, 52); |
| | | this.lb_depextr2.Location = new System.Drawing.Point(526, 14); |
| | | this.lb_depextr2.Name = "lb_depextr2"; |
| | | this.lb_depextr2.Size = new System.Drawing.Size(73, 21); |
| | | this.lb_depextr2.TabIndex = 222; |
| | |
| | | // |
| | | // txt_depextr2 |
| | | // |
| | | this.txt_depextr2.Location = new System.Drawing.Point(618, 52); |
| | | this.txt_depextr2.Location = new System.Drawing.Point(605, 14); |
| | | this.txt_depextr2.Name = "txt_depextr2"; |
| | | this.txt_depextr2.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_depextr2.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_depextr2.MinWidth = 100; |
| | | this.gv_depextr2.Name = "gv_depextr2"; |
| | | this.gv_depextr2.OptionsColumn.AllowEdit = false; |
| | | this.gv_depextr2.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_depextr2.Tag = "query_a.depextr2"; |
| | | this.gv_depextr2.Visible = true; |
| | | this.gv_depextr2.VisibleIndex = 5; |
| | |
| | | // |
| | | // txt_depextr1 |
| | | // |
| | | this.txt_depextr1.Location = new System.Drawing.Point(349, 52); |
| | | this.txt_depextr1.Location = new System.Drawing.Point(349, 48); |
| | | this.txt_depextr1.Name = "txt_depextr1"; |
| | | this.txt_depextr1.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_depextr1.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_depextr1.MinWidth = 100; |
| | | this.gv_depextr1.Name = "gv_depextr1"; |
| | | this.gv_depextr1.OptionsColumn.AllowEdit = false; |
| | | this.gv_depextr1.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_depextr1.Tag = "query_a.depextr1"; |
| | | this.gv_depextr1.Visible = true; |
| | | this.gv_depextr1.VisibleIndex = 4; |
| | |
| | | // |
| | | // txt_departmentname |
| | | // |
| | | this.txt_departmentname.Location = new System.Drawing.Point(106, 52); |
| | | this.txt_departmentname.Location = new System.Drawing.Point(107, 48); |
| | | this.txt_departmentname.Name = "txt_departmentname"; |
| | | this.txt_departmentname.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_departmentname.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_departmentname.MinWidth = 150; |
| | | this.gv_departmentname.Name = "gv_departmentname"; |
| | | this.gv_departmentname.OptionsColumn.AllowEdit = false; |
| | | this.gv_departmentname.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_departmentname.Tag = "query_a.departmentname"; |
| | | this.gv_departmentname.Visible = true; |
| | | this.gv_departmentname.VisibleIndex = 3; |
| | |
| | | // |
| | | this.lb_departmentcode.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_departmentcode.Appearance.Options.UseFont = true; |
| | | this.lb_departmentcode.Location = new System.Drawing.Point(539, 18); |
| | | this.lb_departmentcode.Location = new System.Drawing.Point(270, 14); |
| | | this.lb_departmentcode.Name = "lb_departmentcode"; |
| | | this.lb_departmentcode.Size = new System.Drawing.Size(73, 21); |
| | | this.lb_departmentcode.TabIndex = 216; |
| | |
| | | // |
| | | // txt_departmentcode |
| | | // |
| | | this.txt_departmentcode.Location = new System.Drawing.Point(618, 18); |
| | | this.txt_departmentcode.Location = new System.Drawing.Point(349, 14); |
| | | this.txt_departmentcode.Name = "txt_departmentcode"; |
| | | this.txt_departmentcode.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_departmentcode.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_departmentcode.MinWidth = 80; |
| | | this.gv_departmentcode.Name = "gv_departmentcode"; |
| | | this.gv_departmentcode.OptionsColumn.AllowEdit = false; |
| | | this.gv_departmentcode.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_departmentcode.Tag = "query_a.departmentcode"; |
| | | this.gv_departmentcode.Visible = true; |
| | | this.gv_departmentcode.VisibleIndex = 2; |
| | |
| | | // |
| | | this.lb_departmentid.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_departmentid.Appearance.Options.UseFont = true; |
| | | this.lb_departmentid.Location = new System.Drawing.Point(286, 18); |
| | | this.lb_departmentid.Location = new System.Drawing.Point(44, 14); |
| | | this.lb_departmentid.Name = "lb_departmentid"; |
| | | this.lb_departmentid.Size = new System.Drawing.Size(57, 21); |
| | | this.lb_departmentid.TabIndex = 213; |
| | |
| | | // |
| | | // txt_departmentid |
| | | // |
| | | this.txt_departmentid.Location = new System.Drawing.Point(349, 18); |
| | | this.txt_departmentid.Location = new System.Drawing.Point(107, 14); |
| | | this.txt_departmentid.Name = "txt_departmentid"; |
| | | this.txt_departmentid.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_departmentid.Properties.Appearance.Options.UseFont = true; |
| | |
| | | this.gv_departmentid.MinWidth = 50; |
| | | this.gv_departmentid.Name = "gv_departmentid"; |
| | | this.gv_departmentid.OptionsColumn.AllowEdit = false; |
| | | this.gv_departmentid.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | this.gv_departmentid.Tag = "query_a.departmentid"; |
| | | this.gv_departmentid.Visible = true; |
| | | this.gv_departmentid.VisibleIndex = 1; |
| | | this.gv_departmentid.Width = 94; |
| | | // |
| | | // lb_company |
| | | // |
| | | this.lb_company.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_company.Appearance.Options.UseFont = true; |
| | | this.lb_company.Location = new System.Drawing.Point(62, 18); |
| | | this.lb_company.Name = "lb_company"; |
| | | this.lb_company.Size = new System.Drawing.Size(39, 21); |
| | | this.lb_company.TabIndex = 211; |
| | | this.lb_company.Text = "公司 "; |
| | | // |
| | | // txt_company |
| | | // |
| | | this.txt_company.Location = new System.Drawing.Point(106, 18); |
| | | this.txt_company.Name = "txt_company"; |
| | | this.txt_company.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_company.Properties.Appearance.Options.UseFont = true; |
| | | this.txt_company.Size = new System.Drawing.Size(150, 28); |
| | | this.txt_company.TabIndex = 211; |
| | | // |
| | | // toolBarMenu1 |
| | | // |
| | |
| | | this.gridView1.GridControl = this.gcMain; |
| | | this.gridView1.IndicatorWidth = 50; |
| | | this.gridView1.Name = "gridView1"; |
| | | this.gridView1.OptionsCustomization.AllowFilter = false; |
| | | this.gridView1.OptionsFilter.AllowAutoFilterConditionChange = DevExpress.Utils.DefaultBoolean.False; |
| | | this.gridView1.OptionsFilter.AllowFilterEditor = false; |
| | | this.gridView1.OptionsFilter.ShowCustomFunctions = DevExpress.Utils.DefaultBoolean.False; |
| | | this.gridView1.OptionsFind.ShowSearchNavButtons = false; |
| | | this.gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | this.gridView1.OptionsView.ShowGroupPanel = false; |
| | |
| | | this.panel1.BackColor = System.Drawing.Color.White; |
| | | this.panel1.Controls.Add(this.labelControl11); |
| | | this.panel1.Controls.Add(this.lbGuid); |
| | | this.panel1.Controls.Add(this.lb_parentId); |
| | | this.panel1.Controls.Add(this.txt_parentId); |
| | | this.panel1.Controls.Add(this.lb_materialProperti); |
| | | this.panel1.Controls.Add(this.txt_materialProperti); |
| | | this.panel1.Controls.Add(this.lb_productionWorkshop); |
| | |
| | | this.panel1.Controls.Add(this.txt_departmentcode); |
| | | this.panel1.Controls.Add(this.lb_departmentid); |
| | | this.panel1.Controls.Add(this.txt_departmentid); |
| | | this.panel1.Controls.Add(this.lb_company); |
| | | this.panel1.Controls.Add(this.txt_company); |
| | | this.panel1.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.panel1.Location = new System.Drawing.Point(76, 20); |
| | | this.panel1.Name = "panel1"; |
| | |
| | | this.Controls.Add(this.xtraTabControl1); |
| | | this.Controls.Add(this.toolBarMenu1); |
| | | this.Name = "Frm_Department"; |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_parentId.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_materialProperti.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_productionWorkshop.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_remark.Properties)).EndInit(); |
| | |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_departmentname.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_departmentcode.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_departmentid.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_company.Properties)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gcMain)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit(); |
| | |
| | | private System.Windows.Forms.Panel panel1; |
| | | private System.Windows.Forms.Label lbGuid; |
| | | private DevExpress.XtraEditors.LabelControl labelControl11; |
| | | |
| | | private DevExpress.XtraEditors.LabelControl lb_parentId; |
| | | private DevExpress.XtraEditors.TextEdit txt_parentId; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_parentId; |
| | | |
| | | private DevExpress.XtraEditors.LabelControl lb_materialProperti; |
| | |
| | | private DevExpress.XtraEditors.LabelControl lb_departmentid; |
| | | private DevExpress.XtraEditors.TextEdit txt_departmentid; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gv_departmentid; |
| | | |
| | | private DevExpress.XtraEditors.LabelControl lb_company; |
| | | private DevExpress.XtraEditors.TextEdit txt_company; |
| | | } |
| | | } |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Columns; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | |
| | | { |
| | | private List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | private readonly string _webServiceName = "SysDepartmentManager/"; |
| | | |
| | | public Frm_Department() |
| | | { |
| | | InitializeComponent(); |
| | |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | gridView1.CustomDrawRowIndicator += |
| | | GridView1_CustomDrawRowIndicator; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | } |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | //string filterString = gridView1.Columns[0].FilterInfo.ToString(); |
| | | //ColumnFilterInfo filterString222 = gridView1.Columns[0].FilterInfo; |
| | | //if (filterString222 == null) |
| | | // return; |
| | | //_filterList.Clear(); |
| | | //System.Text.StringBuilder sbSql = new StringBuilder(); |
| | | //_filterList.Add(new FilterEntity("b.FNumber", "使用组织", " like ", "包含", "%"+ filterString222.Value + "%")); |
| | | //getPageList(1, UtilityHelper.GetPageSize()); |
| | | ////MessageBox.Show(filterString222); |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | |
| | | private void GridView1_CustomDrawRowIndicator(object sender, |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | var pgq = new PageQueryModel(curPage, pageSize, "a.create_date", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.create_date", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", |
| | | _webServiceName + "GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | |
| | | this.gv_isStatus.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.gv_isStatus.AppearanceCell.Options.UseFont = true; |
| | | this.gv_isStatus.Caption = "禁用状态"; |
| | | this.gv_isStatus.FieldName = "isStatus"; |
| | | this.gv_isStatus.FieldName = "fforbidstatus"; |
| | | this.gv_isStatus.MinWidth = 50; |
| | | this.gv_isStatus.Name = "gv_isStatus"; |
| | | this.gv_isStatus.OptionsColumn.AllowEdit = false; |
| | | this.gv_isStatus.Tag = "query_a.isStatus"; |
| | | this.gv_isStatus.Tag = "query_a.fforbidstatus"; |
| | | this.gv_isStatus.Visible = true; |
| | | this.gv_isStatus.VisibleIndex = 19; |
| | | this.gv_isStatus.Width = 94; |
| | |
| | | this.gv_depotNo.MinWidth = 80; |
| | | this.gv_depotNo.Name = "gv_depotNo"; |
| | | this.gv_depotNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_depotNo.Tag = "query_a.depotNo"; |
| | | this.gv_depotNo.Tag = "query_m.depot_name"; |
| | | this.gv_depotNo.Visible = true; |
| | | this.gv_depotNo.VisibleIndex = 18; |
| | | this.gv_depotNo.Width = 94; |
| | |
| | | this.gv_subconUnitNo.MinWidth = 80; |
| | | this.gv_subconUnitNo.Name = "gv_subconUnitNo"; |
| | | this.gv_subconUnitNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_subconUnitNo.Tag = "query_a.subconUnitNo"; |
| | | this.gv_subconUnitNo.Tag = "query_g.fname"; |
| | | this.gv_subconUnitNo.Visible = true; |
| | | this.gv_subconUnitNo.VisibleIndex = 16; |
| | | this.gv_subconUnitNo.Width = 94; |
| | |
| | | this.gv_purchaseUnitNo.MinWidth = 80; |
| | | this.gv_purchaseUnitNo.Name = "gv_purchaseUnitNo"; |
| | | this.gv_purchaseUnitNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_purchaseUnitNo.Tag = "query_a.purchaseUnitNo"; |
| | | this.gv_purchaseUnitNo.Tag = "query_d.fname"; |
| | | this.gv_purchaseUnitNo.Visible = true; |
| | | this.gv_purchaseUnitNo.VisibleIndex = 13; |
| | | this.gv_purchaseUnitNo.Width = 94; |
| | |
| | | this.gv_produceUnitNo.MinWidth = 80; |
| | | this.gv_produceUnitNo.Name = "gv_produceUnitNo"; |
| | | this.gv_produceUnitNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_produceUnitNo.Tag = "query_a.produceUnitNo"; |
| | | this.gv_produceUnitNo.Tag = "query_h.fname"; |
| | | this.gv_produceUnitNo.Visible = true; |
| | | this.gv_produceUnitNo.VisibleIndex = 17; |
| | | this.gv_produceUnitNo.Width = 94; |
| | |
| | | this.gv_storeUnitNo.MinWidth = 80; |
| | | this.gv_storeUnitNo.Name = "gv_storeUnitNo"; |
| | | this.gv_storeUnitNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_storeUnitNo.Tag = "query_a.storeUnitNo"; |
| | | this.gv_storeUnitNo.Tag = "query_f.fname"; |
| | | this.gv_storeUnitNo.Visible = true; |
| | | this.gv_storeUnitNo.VisibleIndex = 15; |
| | | this.gv_storeUnitNo.Width = 94; |
| | |
| | | this.gv_saleUnitNo.MinWidth = 80; |
| | | this.gv_saleUnitNo.Name = "gv_saleUnitNo"; |
| | | this.gv_saleUnitNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_saleUnitNo.Tag = "query_a.saleUnitNo"; |
| | | this.gv_saleUnitNo.Tag = "query_e.fname"; |
| | | this.gv_saleUnitNo.Visible = true; |
| | | this.gv_saleUnitNo.VisibleIndex = 14; |
| | | this.gv_saleUnitNo.Width = 94; |
| | |
| | | this.gv_prdPack.MinWidth = 80; |
| | | this.gv_prdPack.Name = "gv_prdPack"; |
| | | this.gv_prdPack.OptionsColumn.AllowEdit = false; |
| | | this.gv_prdPack.Tag = "query_a.prdPack"; |
| | | this.gv_prdPack.Tag = "query_a.prd_pack"; |
| | | this.gv_prdPack.Visible = true; |
| | | this.gv_prdPack.VisibleIndex = 8; |
| | | this.gv_prdPack.Width = 94; |
| | |
| | | this.gv_lowLimt.MinWidth = 80; |
| | | this.gv_lowLimt.Name = "gv_lowLimt"; |
| | | this.gv_lowLimt.OptionsColumn.AllowEdit = false; |
| | | this.gv_lowLimt.Tag = "query_a.lowLimt"; |
| | | this.gv_lowLimt.Tag = "query_a.lowlimit"; |
| | | this.gv_lowLimt.Visible = true; |
| | | this.gv_lowLimt.VisibleIndex = 6; |
| | | this.gv_lowLimt.Width = 94; |
| | |
| | | this.gv_itemUnitNo.MinWidth = 80; |
| | | this.gv_itemUnitNo.Name = "gv_itemUnitNo"; |
| | | this.gv_itemUnitNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_itemUnitNo.Tag = "query_a.itemUnitNo"; |
| | | this.gv_itemUnitNo.Tag = "query_c.fname"; |
| | | this.gv_itemUnitNo.Visible = true; |
| | | this.gv_itemUnitNo.VisibleIndex = 12; |
| | | this.gv_itemUnitNo.Width = 94; |
| | |
| | | this.gv_itemModel.MinWidth = 360; |
| | | this.gv_itemModel.Name = "gv_itemModel"; |
| | | this.gv_itemModel.OptionsColumn.AllowEdit = false; |
| | | this.gv_itemModel.Tag = "query_a.itemModel"; |
| | | this.gv_itemModel.Tag = "query_a.item_model"; |
| | | this.gv_itemModel.Visible = true; |
| | | this.gv_itemModel.VisibleIndex = 4; |
| | | this.gv_itemModel.Width = 360; |
| | |
| | | this.gv_itemName.Caption = "物料名称"; |
| | | this.gv_itemName.ColumnEdit = this.repositoryItemMemoEdit2; |
| | | this.gv_itemName.FieldName = "itemName"; |
| | | this.gv_itemName.MinWidth = 260; |
| | | this.gv_itemName.MinWidth = 250; |
| | | this.gv_itemName.Name = "gv_itemName"; |
| | | this.gv_itemName.OptionsColumn.AllowEdit = false; |
| | | this.gv_itemName.Tag = "query_a.itemName"; |
| | | this.gv_itemName.Tag = "query_a.item_name"; |
| | | this.gv_itemName.Visible = true; |
| | | this.gv_itemName.VisibleIndex = 3; |
| | | this.gv_itemName.Width = 260; |
| | |
| | | // |
| | | this.gv_itemNo.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.gv_itemNo.AppearanceCell.Options.UseFont = true; |
| | | this.gv_itemNo.Caption = "物料编码||ERP物料编号"; |
| | | this.gv_itemNo.Caption = "物料编码"; |
| | | this.gv_itemNo.FieldName = "itemNo"; |
| | | this.gv_itemNo.MinWidth = 160; |
| | | this.gv_itemNo.MinWidth = 120; |
| | | this.gv_itemNo.Name = "gv_itemNo"; |
| | | this.gv_itemNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_itemNo.Tag = "query_a.itemNo"; |
| | | this.gv_itemNo.Tag = "query_a.item_no"; |
| | | this.gv_itemNo.Visible = true; |
| | | this.gv_itemNo.VisibleIndex = 2; |
| | | this.gv_itemNo.Width = 160; |
| | |
| | | this.gv_id.Name = "gv_id"; |
| | | this.gv_id.OptionsColumn.AllowEdit = false; |
| | | this.gv_id.OptionsColumn.ReadOnly = true; |
| | | this.gv_id.Tag = "query_a.factory"; |
| | | this.gv_id.Tag = "query_a.id"; |
| | | this.gv_id.Visible = true; |
| | | this.gv_id.VisibleIndex = 1; |
| | | this.gv_id.Width = 94; |
| | |
| | | this.gridColumn4.MinWidth = 250; |
| | | this.gridColumn4.Name = "gridColumn4"; |
| | | this.gridColumn4.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn4.Tag = "org.FNumber"; |
| | | this.gridColumn4.Visible = true; |
| | | this.gridColumn4.VisibleIndex = 0; |
| | | this.gridColumn4.Width = 250; |
| | |
| | | this.gridColumn1.Caption = "安全库存"; |
| | | this.gridColumn1.MinWidth = 80; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.Tag = ""; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 5; |
| | | this.gridColumn1.Width = 94; |
| | |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.Entity; |
| | |
| | | toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | } |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | var pgq = new PageQueryModel(curPage, pageSize, "item_no", "asc", |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "item_no", "asc", |
| | | "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", |
| | | _webServiceName + "GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.Entity; |
| | |
| | | toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | |
| | | e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | var pgq = new PageQueryModel(curPage, pageSize, "position_name", |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "position_name", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", |
| | | _webServiceName + "GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.Entity; |
| | |
| | | toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick; |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | |
| | | e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | } |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | var pgq = new PageQueryModel(curPage, pageSize, "fname", "asc", "", |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "fname", "asc", "", |
| | | _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", |
| | | _webServiceName + "GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | this.gridColumn1.MinWidth = 250; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn1.Tag = "org.Fnamber"; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 0; |
| | | this.gridColumn1.Width = 250; |
| | |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | gridView1.CustomDrawRowIndicator += |
| | | GridView1_CustomDrawRowIndicator; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | } |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | private void GridView1_CustomDrawRowIndicator(object sender, |
| | | RowIndicatorCustomDrawEventArgs e) |
| | | { |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | |
| | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | var pgq = new PageQueryModel(curPage, pageSize, "create_date", |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", |
| | | _webServiceName + "GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | |
| | | this.gridColumn2.MinWidth = 250; |
| | | this.gridColumn2.Name = "gridColumn2"; |
| | | this.gridColumn2.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn2.Tag = "org.FNumber"; |
| | | this.gridColumn2.Visible = true; |
| | | this.gridColumn2.VisibleIndex = 0; |
| | | this.gridColumn2.Width = 250; |
| | |
| | | this.gridColumn1.FieldName = "suppSname"; |
| | | this.gridColumn1.MinWidth = 100; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.Tag = "a.supp_sname"; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 4; |
| | | this.gridColumn1.Width = 100; |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | gridView1.CustomDrawRowIndicator += |
| | | GridView1_CustomDrawRowIndicator; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | |
| | | private void GridView1_CustomDrawRowIndicator(object sender, |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | var pgq = new PageQueryModel(curPage, pageSize, "create_date", |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", |
| | | _webServiceName + "GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | |
| | | // |
| | | this.lb_suppNo.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_suppNo.Appearance.Options.UseFont = true; |
| | | this.lb_suppNo.Location = new System.Drawing.Point(4, 89); |
| | | this.lb_suppNo.Location = new System.Drawing.Point(11, 89); |
| | | this.lb_suppNo.Name = "lb_suppNo"; |
| | | this.lb_suppNo.Size = new System.Drawing.Size(90, 21); |
| | | this.lb_suppNo.Size = new System.Drawing.Size(85, 21); |
| | | this.lb_suppNo.TabIndex = 235; |
| | | this.lb_suppNo.Text = "供应商编码 "; |
| | | this.lb_suppNo.Text = "选择供应商"; |
| | | // |
| | | // gv_suppNo |
| | | // |
| | |
| | | // |
| | | this.lb_itemId.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_itemId.Appearance.Options.UseFont = true; |
| | | this.lb_itemId.Location = new System.Drawing.Point(37, 13); |
| | | this.lb_itemId.Location = new System.Drawing.Point(28, 13); |
| | | this.lb_itemId.Name = "lb_itemId"; |
| | | this.lb_itemId.Size = new System.Drawing.Size(57, 21); |
| | | this.lb_itemId.Size = new System.Drawing.Size(68, 21); |
| | | this.lb_itemId.TabIndex = 231; |
| | | this.lb_itemId.Text = "物料ID "; |
| | | this.lb_itemId.Text = "选择物料"; |
| | | // |
| | | // gv_itemId |
| | | // |
| | |
| | | // |
| | | this.lb_status.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_status.Appearance.Options.UseFont = true; |
| | | this.lb_status.Location = new System.Drawing.Point(294, 89); |
| | | this.lb_status.Location = new System.Drawing.Point(348, 89); |
| | | this.lb_status.Name = "lb_status"; |
| | | this.lb_status.Size = new System.Drawing.Size(73, 21); |
| | | this.lb_status.TabIndex = 228; |
| | |
| | | // |
| | | this.lb_checkDate.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_checkDate.Appearance.Options.UseFont = true; |
| | | this.lb_checkDate.Location = new System.Drawing.Point(541, 51); |
| | | this.lb_checkDate.Location = new System.Drawing.Point(595, 51); |
| | | this.lb_checkDate.Name = "lb_checkDate"; |
| | | this.lb_checkDate.Size = new System.Drawing.Size(73, 21); |
| | | this.lb_checkDate.TabIndex = 226; |
| | |
| | | // txt_checkDate |
| | | // |
| | | this.txt_checkDate.Enabled = false; |
| | | this.txt_checkDate.Location = new System.Drawing.Point(619, 47); |
| | | this.txt_checkDate.Location = new System.Drawing.Point(673, 47); |
| | | this.txt_checkDate.Name = "txt_checkDate"; |
| | | this.txt_checkDate.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_checkDate.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_checkUser.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_checkUser.Appearance.Options.UseFont = true; |
| | | this.lb_checkUser.Location = new System.Drawing.Point(558, 13); |
| | | this.lb_checkUser.Location = new System.Drawing.Point(612, 13); |
| | | this.lb_checkUser.Name = "lb_checkUser"; |
| | | this.lb_checkUser.Size = new System.Drawing.Size(56, 21); |
| | | this.lb_checkUser.TabIndex = 222; |
| | |
| | | // txt_checkUser |
| | | // |
| | | this.txt_checkUser.Enabled = false; |
| | | this.txt_checkUser.Location = new System.Drawing.Point(619, 9); |
| | | this.txt_checkUser.Location = new System.Drawing.Point(673, 9); |
| | | this.txt_checkUser.Name = "txt_checkUser"; |
| | | this.txt_checkUser.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_checkUser.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_lastupdateDate.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_lastupdateDate.Appearance.Options.UseFont = true; |
| | | this.lb_lastupdateDate.Location = new System.Drawing.Point(798, 51); |
| | | this.lb_lastupdateDate.Location = new System.Drawing.Point(852, 51); |
| | | this.lb_lastupdateDate.Name = "lb_lastupdateDate"; |
| | | this.lb_lastupdateDate.Size = new System.Drawing.Size(107, 21); |
| | | this.lb_lastupdateDate.TabIndex = 219; |
| | |
| | | // txt_lastupdateDate |
| | | // |
| | | this.txt_lastupdateDate.Enabled = false; |
| | | this.txt_lastupdateDate.Location = new System.Drawing.Point(911, 47); |
| | | this.txt_lastupdateDate.Location = new System.Drawing.Point(965, 47); |
| | | this.txt_lastupdateDate.Name = "txt_lastupdateDate"; |
| | | this.txt_lastupdateDate.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_lastupdateDate.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_lastupdateBy.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_lastupdateBy.Appearance.Options.UseFont = true; |
| | | this.lb_lastupdateBy.Location = new System.Drawing.Point(815, 13); |
| | | this.lb_lastupdateBy.Location = new System.Drawing.Point(869, 13); |
| | | this.lb_lastupdateBy.Name = "lb_lastupdateBy"; |
| | | this.lb_lastupdateBy.Size = new System.Drawing.Size(90, 21); |
| | | this.lb_lastupdateBy.TabIndex = 217; |
| | |
| | | // txt_lastupdateBy |
| | | // |
| | | this.txt_lastupdateBy.Enabled = false; |
| | | this.txt_lastupdateBy.Location = new System.Drawing.Point(911, 9); |
| | | this.txt_lastupdateBy.Location = new System.Drawing.Point(965, 9); |
| | | this.txt_lastupdateBy.Name = "txt_lastupdateBy"; |
| | | this.txt_lastupdateBy.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_lastupdateBy.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_createDate.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_createDate.Appearance.Options.UseFont = true; |
| | | this.lb_createDate.Location = new System.Drawing.Point(294, 51); |
| | | this.lb_createDate.Location = new System.Drawing.Point(348, 51); |
| | | this.lb_createDate.Name = "lb_createDate"; |
| | | this.lb_createDate.Size = new System.Drawing.Size(73, 21); |
| | | this.lb_createDate.TabIndex = 216; |
| | |
| | | // txt_createDate |
| | | // |
| | | this.txt_createDate.Enabled = false; |
| | | this.txt_createDate.Location = new System.Drawing.Point(373, 47); |
| | | this.txt_createDate.Location = new System.Drawing.Point(427, 47); |
| | | this.txt_createDate.Name = "txt_createDate"; |
| | | this.txt_createDate.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_createDate.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_createBy.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_createBy.Appearance.Options.UseFont = true; |
| | | this.lb_createBy.Location = new System.Drawing.Point(311, 13); |
| | | this.lb_createBy.Location = new System.Drawing.Point(365, 13); |
| | | this.lb_createBy.Name = "lb_createBy"; |
| | | this.lb_createBy.Size = new System.Drawing.Size(56, 21); |
| | | this.lb_createBy.TabIndex = 213; |
| | |
| | | // txt_createBy |
| | | // |
| | | this.txt_createBy.Enabled = false; |
| | | this.txt_createBy.Location = new System.Drawing.Point(373, 9); |
| | | this.txt_createBy.Location = new System.Drawing.Point(427, 9); |
| | | this.txt_createBy.Name = "txt_createBy"; |
| | | this.txt_createBy.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_createBy.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_itemNo.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_itemNo.Appearance.Options.UseFont = true; |
| | | this.lb_itemNo.Location = new System.Drawing.Point(21, 51); |
| | | this.lb_itemNo.Location = new System.Drawing.Point(23, 51); |
| | | this.lb_itemNo.Name = "lb_itemNo"; |
| | | this.lb_itemNo.Size = new System.Drawing.Size(73, 21); |
| | | this.lb_itemNo.TabIndex = 211; |
| | |
| | | // txt_itemNo |
| | | // |
| | | this.txt_itemNo.Enabled = false; |
| | | this.txt_itemNo.Location = new System.Drawing.Point(114, 47); |
| | | this.txt_itemNo.Location = new System.Drawing.Point(106, 47); |
| | | this.txt_itemNo.Name = "txt_itemNo"; |
| | | this.txt_itemNo.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_itemNo.Properties.Appearance.Options.UseFont = true; |
| | | this.txt_itemNo.Size = new System.Drawing.Size(174, 28); |
| | | this.txt_itemNo.Size = new System.Drawing.Size(239, 28); |
| | | this.txt_itemNo.TabIndex = 211; |
| | | // |
| | | // gv_itemNo |
| | |
| | | this.toolBarMenu1.Location = new System.Drawing.Point(0, 0); |
| | | this.toolBarMenu1.Name = "toolBarMenu1"; |
| | | this.toolBarMenu1.rptParameter = null; |
| | | this.toolBarMenu1.Size = new System.Drawing.Size(1128, 80); |
| | | this.toolBarMenu1.Size = new System.Drawing.Size(1215, 80); |
| | | this.toolBarMenu1.TabIndex = 0; |
| | | this.toolBarMenu1.xlsInService = null; |
| | | this.toolBarMenu1.xlsOutParameter = null; |
| | |
| | | this.gridColumn1.MinWidth = 250; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn1.Tag = "org.fnamber"; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 0; |
| | | this.gridColumn1.Width = 250; |
| | |
| | | this.gridColumn2.MinWidth = 125; |
| | | this.gridColumn2.Name = "gridColumn2"; |
| | | this.gridColumn2.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn2.Tag = "query_b.item_name"; |
| | | this.gridColumn2.Visible = true; |
| | | this.gridColumn2.VisibleIndex = 2; |
| | | this.gridColumn2.Width = 125; |
| | |
| | | this.gridColumn3.MinWidth = 125; |
| | | this.gridColumn3.Name = "gridColumn3"; |
| | | this.gridColumn3.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn3.Tag = "d.supp_name"; |
| | | this.gridColumn3.Visible = true; |
| | | this.gridColumn3.VisibleIndex = 5; |
| | | this.gridColumn3.Width = 125; |
| | |
| | | this.xtraTabControl1.Location = new System.Drawing.Point(0, 80); |
| | | this.xtraTabControl1.Name = "xtraTabControl1"; |
| | | this.xtraTabControl1.SelectedTabPage = this.xtraTabPage1; |
| | | this.xtraTabControl1.Size = new System.Drawing.Size(1128, 602); |
| | | this.xtraTabControl1.Size = new System.Drawing.Size(1215, 602); |
| | | this.xtraTabControl1.TabIndex = 3; |
| | | this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { |
| | | this.xtraTabPage1, |
| | |
| | | this.xtraTabPage2.Controls.Add(this.panel1); |
| | | this.xtraTabPage2.Name = "xtraTabPage2"; |
| | | this.xtraTabPage2.PageEnabled = false; |
| | | this.xtraTabPage2.Size = new System.Drawing.Size(1126, 570); |
| | | this.xtraTabPage2.Size = new System.Drawing.Size(1213, 570); |
| | | this.xtraTabPage2.Text = "数据编辑"; |
| | | // |
| | | // panel1 |
| | |
| | | this.panel1.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.panel1.Location = new System.Drawing.Point(23, 20); |
| | | this.panel1.Name = "panel1"; |
| | | this.panel1.Size = new System.Drawing.Size(1092, 196); |
| | | this.panel1.Size = new System.Drawing.Size(1163, 196); |
| | | this.panel1.TabIndex = 1; |
| | | // |
| | | // txt_suppId |
| | | // |
| | | this.txt_suppId.IsReadly = false; |
| | | this.txt_suppId.KeyFile = ""; |
| | | this.txt_suppId.Location = new System.Drawing.Point(114, 90); |
| | | this.txt_suppId.Location = new System.Drawing.Point(106, 90); |
| | | this.txt_suppId.Margin = new System.Windows.Forms.Padding(0); |
| | | this.txt_suppId.Name = "txt_suppId"; |
| | | this.txt_suppId.Size = new System.Drawing.Size(174, 30); |
| | | this.txt_suppId.Size = new System.Drawing.Size(239, 30); |
| | | this.txt_suppId.TabIndex = 238; |
| | | // |
| | | // txt_itemId |
| | | // |
| | | this.txt_itemId.IsReadly = false; |
| | | this.txt_itemId.KeyFile = ""; |
| | | this.txt_itemId.Location = new System.Drawing.Point(114, 12); |
| | | this.txt_itemId.Location = new System.Drawing.Point(106, 12); |
| | | this.txt_itemId.Name = "txt_itemId"; |
| | | this.txt_itemId.Size = new System.Drawing.Size(174, 33); |
| | | this.txt_itemId.Size = new System.Drawing.Size(239, 33); |
| | | this.txt_itemId.TabIndex = 237; |
| | | this.txt_itemId.Tag = "no"; |
| | | // |
| | | // txt_status |
| | | // |
| | | this.txt_status.Enabled = false; |
| | | this.txt_status.Location = new System.Drawing.Point(372, 87); |
| | | this.txt_status.Location = new System.Drawing.Point(426, 87); |
| | | this.txt_status.Name = "txt_status"; |
| | | this.txt_status.Properties.Caption = ""; |
| | | this.txt_status.Size = new System.Drawing.Size(94, 24); |
| | |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); |
| | | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| | | this.ClientSize = new System.Drawing.Size(1128, 682); |
| | | this.ClientSize = new System.Drawing.Size(1215, 682); |
| | | this.Controls.Add(this.picCheckBox); |
| | | this.Controls.Add(this.xtraTabControl1); |
| | | this.Controls.Add(this.toolBarMenu1); |
| | |
| | | using DevExpress.RichEdit.Export; |
| | | using Gs.DevApp.DevFrm.QC.Models; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm.QC |
| | |
| | | { |
| | | UtilityHelper.SetCheckIco(s, picCheckBox, this, "status", ""); |
| | | }; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | _setIno(); |
| | | } |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | private void _setIno() |
| | | { |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | /// <summary> |
| | | /// 查询事件 |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | Gs.DevApp.UserControl.ShowFilter frm = new Gs.DevApp.UserControl.ShowFilter(gridView1.Columns, _filterList); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 修改事件 |
| | |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true); |
| | | |
| | | txt_createBy.Enabled = false; |
| | | txt_createDate.Enabled = false; |
| | | txt_lastupdateBy.Enabled = false; |
| | |
| | | txt_checkUser.Enabled = false; |
| | | txt_checkDate.Enabled = false; |
| | | txt_status.Enabled = false; |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 保存事件 |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); |
| | | foreach (FilterEntity itm in _filterList) |
| | | { |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + itm.fileValue + "'"); |
| | | } |
| | | PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | /// <summary> |
| | | /// |
| | |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions3 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject9 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject10 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject11 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject12 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | this.gvMx1pid = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gvMx1facLevel = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.rptJSSP = new DevExpress.XtraEditors.Repository.RepositoryItemComboBox(); |
| | |
| | | // repositoryItemButtonEdit1 |
| | | // |
| | | this.repositoryItemButtonEdit1.AutoHeight = false; |
| | | editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; |
| | | editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | editorButtonImageOptions3.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; |
| | | editorButtonImageOptions3.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "移除", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "移除", -1, true, true, false, editorButtonImageOptions3, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject9, serializableAppearanceObject10, serializableAppearanceObject11, serializableAppearanceObject12, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; |
| | | this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; |
| | | this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick); |
| | |
| | | this.gv_itemNo.MinWidth = 150; |
| | | this.gv_itemNo.Name = "gv_itemNo"; |
| | | this.gv_itemNo.OptionsColumn.AllowEdit = false; |
| | | this.gv_itemNo.Tag = "query_a.ITEM_NO"; |
| | | this.gv_itemNo.Tag = "query_b.item_no"; |
| | | this.gv_itemNo.Visible = true; |
| | | this.gv_itemNo.VisibleIndex = 5; |
| | | this.gv_itemNo.Width = 150; |
| | |
| | | this.gridColumn8.MinWidth = 250; |
| | | this.gridColumn8.Name = "gridColumn8"; |
| | | this.gridColumn8.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn8.Tag = "org.fnumber"; |
| | | this.gridColumn8.Visible = true; |
| | | this.gridColumn8.VisibleIndex = 0; |
| | | this.gridColumn8.Width = 250; |
| | |
| | | this.gridColumn7.MinWidth = 80; |
| | | this.gridColumn7.Name = "gridColumn7"; |
| | | this.gridColumn7.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn7.Tag = "query_a.ITEM_ID"; |
| | | this.gridColumn7.Visible = true; |
| | | this.gridColumn7.VisibleIndex = 4; |
| | | this.gridColumn7.Width = 94; |
| | |
| | | this.gridColumn3.MinWidth = 250; |
| | | this.gridColumn3.Name = "gridColumn3"; |
| | | this.gridColumn3.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn3.Tag = "query_b.item_name"; |
| | | this.gridColumn3.Visible = true; |
| | | this.gridColumn3.VisibleIndex = 6; |
| | | this.gridColumn3.Width = 250; |
| | |
| | | this.gridColumn2.MinWidth = 100; |
| | | this.gridColumn2.Name = "gridColumn2"; |
| | | this.gridColumn2.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn2.Tag = "query_b.item_model"; |
| | | this.gridColumn2.Visible = true; |
| | | this.gridColumn2.VisibleIndex = 7; |
| | | this.gridColumn2.Width = 100; |
| | |
| | | this.gridColumn1.MinWidth = 50; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn1.Tag = "query_a.CREATE_BY"; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 12; |
| | | this.gridColumn1.Width = 94; |
| | |
| | | this.gridColumn4.MinWidth = 180; |
| | | this.gridColumn4.Name = "gridColumn4"; |
| | | this.gridColumn4.OptionsColumn.AllowEdit = false; |
| | | this.gridColumn4.Tag = "query_a.CREATE_DATE"; |
| | | this.gridColumn4.Visible = true; |
| | | this.gridColumn4.VisibleIndex = 13; |
| | | this.gridColumn4.Width = 180; |
| | |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.RichEdit.Export; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using Gs.DevApp.Entity; |
| | |
| | | { |
| | | UtilityHelper.SetCheckIco(s, picCheckBox, this, "foneChecked", ""); |
| | | }; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | |
| | | //初始化物料选择和各种下拉 |
| | | _setIno(); |
| | | } |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | var frm = |
| | | new ShowFilter(gridView1.Columns, |
| | | _filterList); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 批准 |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | } |
| | | ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | } |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | | } |
| | |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = |
| | | new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | |
| | | var pgq = new PageQueryModel(curPage, pageSize, |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, |
| | | "a.create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | // _webServiceName + "GetListPageIQC", json); |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", |
| | | _webServiceName + "GetListPage", json); |
| | | var dd = |
| | | UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | var dt = dd.rtnData.list; |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | var dddd = dd.rtnData.pages; //总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Close(); |
| | | } |
| | | |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | |
| | | ctrl.Enabled = !isEdt; |
| | | continue; |
| | | } |
| | | |
| | | // |
| | | if (ctrl is CheckEdit) |
| | | { |
| | | var txt = ctrl as CheckEdit; |
| | | txt.ReadOnly = isEdt; |
| | | continue; |
| | | } |
| | | //自定义仓库 |
| | | if (ctrl is UcLookCk) |
| | | { |
| | | var txt = ctrl as UcLookCk; |
| | | if (txt.IsReadly == false) |
| | | txt.Enabled = !isEdt; |
| | | else |
| | | txt.Enabled = false; |
| | | continue; |
| | | } |
| | | //自定义供应商 |
| | | if (ctrl is UcLookSupplier) |
| | | { |
| | | var txt = ctrl as UcLookSupplier; |
| | | if (txt.IsReadly == false) |
| | | txt.Enabled = !isEdt; |
| | | else |
| | | txt.Enabled = false; |
| | | continue; |
| | | } |
| | | //自定义物料 |
| | | if (ctrl is UcLookItems) |
| | | { |
| | | var txt = ctrl as UcLookItems; |
| | | if (txt.IsReadly == false) |
| | | txt.Enabled = !isEdt; |
| | | else |
| | | txt.Enabled = false; |
| | | continue; |
| | | } |
| | | } |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | #region 设置搜索 |
| | | public static string getQueryWord(string str) |
| | | { |
| | | return str.ToUpper().Replace("query_".ToUpper(), ""); |
| | | } |
| | | public static FilterEntity getFilterEntityWord(string id, string idDec, string val) |
| | | { |
| | | return new FilterEntity(getQueryWord(id), idDec + ")", " like ", "包含)", "%" + val + "%"); |
| | | } |
| | | public static List<FilterEntity> GetDilter(GridColumnCollection Columns) |
| | | { |
| | | List<FilterEntity> fiList = new List<FilterEntity>(); |
| | | foreach (DevExpress.XtraGrid.Columns.GridColumn col in Columns) |
| | | { |
| | | ColumnFilterInfo filter = col.FilterInfo; |
| | | if (string.IsNullOrEmpty(filter.FilterString)) |
| | | continue; |
| | | // fiList.Add(new FilterEntity("b.FNumber", "使用组织", " like ", "包含", "%" + filter.Value + "%")); |
| | | string[] ddd = filter.FilterString.Replace("Contains","").Replace("(","").Replace(")","").Replace("'", "").Replace("'", "").Split(','); |
| | | //Contains([fSubsidiary], '005') |
| | | fiList.Add(getFilterEntityWord(col.Tag.ToString(), col.Caption.Trim(), ddd[1].Trim())); |
| | | } |
| | | return fiList; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 根据过滤器,读取查询条件,org表为组织 |
| | | /// </summary> |
| | | /// <param name="_filterList"></param> |
| | | /// <returns></returns> |
| | | public static string GetSearchWhere(List<FilterEntity> _filterList) |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | { |
| | | if (itm.fileId.ToUpper().Contains("org".ToUpper())) |
| | | { |
| | | if (IsNumeric(itm.fileValue.Replace("%", ""))) |
| | | _sbSqlWhere.Append(" and org.FNumber " + itm.fileOper + "'" + itm.fileValue + "'"); |
| | | else |
| | | { |
| | | _sbSqlWhere.Append(" and org.NAME " + itm.fileOper + "'" + itm.fileValue.Trim() + "'"); |
| | | } |
| | | } |
| | | else |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | } |
| | | return _sbSqlWhere.ToString(); |
| | | } |
| | | /// <summary> |
| | | /// 初始化gridview |
| | | /// </summary> |
| | | /// <param name="gridView1"></param> |
| | | public static void SetGridSear(GridView gridView1) |
| | | { |
| | | foreach (GridColumn column in gridView1.Columns) |
| | | { |
| | | column.OptionsFilter.AutoFilterCondition = AutoFilterCondition.Contains; |
| | | column.OptionsFilter.ImmediateUpdateAutoFilter = false; |
| | | column.OptionsColumn.AllowEdit = false; |
| | | if (column.Tag==null || column.Tag.ToString().Length <= 0) |
| | | column.OptionsFilter.AllowAutoFilter = false; |
| | | } |
| | | gridView1.OptionsFilter.AllowAutoFilterConditionChange = DevExpress.Utils.DefaultBoolean.False; |
| | | gridView1.OptionsFilter.AllowFilterEditor = false; |
| | | gridView1.OptionsFilter.ShowCustomFunctions = DevExpress.Utils.DefaultBoolean.False; |
| | | } |
| | | #endregion |
| | | |
| | | |
| | | public static bool IsNumeric(string str) |
| | | { |
| | | Regex regex = new Regex("^[0-9]+$"); |
| | | return regex.IsMatch(str); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | return Text.ToString(); |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (col.Tag != null && col.Tag.ToString().StartsWith("query")) |
| | | { |
| | | var item = new CboItemEntity(); |
| | | item.Text = col.Tag.ToString().Replace("query_a.", "") + |
| | | item.Text = col.Tag.ToString().Replace("query_", "") + |
| | | "(" + col.Caption + ")"; |
| | | //item.Value = col.FieldName; |
| | | item.Value = col.Tag.ToString().Replace("query_a.", ""); |
| | | item.Value = col.Tag.ToString().Replace("query_", ""); |
| | | repositoryItemComboBox1.Items.Add(item); |
| | | } |
| | | |
| | |
| | | this.cbxRowCount.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) |
| | | | System.Windows.Forms.AnchorStyles.Left) |
| | | | System.Windows.Forms.AnchorStyles.Right))); |
| | | this.cbxRowCount.EditValue = "20"; |
| | | this.cbxRowCount.EditValue = "0"; |
| | | this.cbxRowCount.Location = new System.Drawing.Point(846, 2); |
| | | this.cbxRowCount.Margin = new System.Windows.Forms.Padding(3, 6, 3, 0); |
| | | this.cbxRowCount.Name = "cbxRowCount"; |
| | |
| | | "20", |
| | | "50", |
| | | "100", |
| | | "200"}); |
| | | "200", |
| | | "250", |
| | | "500", |
| | | "800", |
| | | "1000"}); |
| | | this.cbxRowCount.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; |
| | | this.cbxRowCount.Size = new System.Drawing.Size(62, 28); |
| | | this.cbxRowCount.StyleController = this.layoutControl1; |
| | | this.cbxRowCount.TabIndex = 5; |
| | | this.cbxRowCount.Tag = "rowcount"; |
| | | this.cbxRowCount.SelectedIndexChanged += new System.EventHandler(this.cbxRowCount_SelectedIndexChanged); |
| | | // |
| | | // labelControl1 |
| | | // |
| | |
| | | this.tbxCurrentPage.Name = "tbxCurrentPage"; |
| | | this.tbxCurrentPage.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.tbxCurrentPage.Properties.Appearance.Options.UseFont = true; |
| | | this.tbxCurrentPage.Properties.DisplayFormat.FormatType = DevExpress.Utils.FormatType.Numeric; |
| | | this.tbxCurrentPage.Properties.EditFormat.FormatType = DevExpress.Utils.FormatType.Numeric; |
| | | this.tbxCurrentPage.Size = new System.Drawing.Size(66, 28); |
| | | this.tbxCurrentPage.StyleController = this.layoutControl1; |
| | | this.tbxCurrentPage.TabIndex = 2; |
| | |
| | | this.emptySpaceItem1.SizeConstraintsType = DevExpress.XtraLayout.SizeConstraintsType.Custom; |
| | | this.emptySpaceItem1.TextSize = new System.Drawing.Size(0, 0); |
| | | // |
| | | // PageBar |
| | | // UcPageBar |
| | | // |
| | | this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 15F); |
| | | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; |
| | | this.Controls.Add(this.layoutControl1); |
| | | this.Name = "PageBar"; |
| | | this.Name = "UcPageBar"; |
| | | this.Size = new System.Drawing.Size(954, 40); |
| | | ((System.ComponentModel.ISupportInitialize)(this.layoutControl1)).EndInit(); |
| | | this.layoutControl1.ResumeLayout(false); |
| | |
| | | using System; |
| | | using Gs.DevApp.ToolBox; |
| | | using System; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace UserControls.Data |
| | |
| | | public UcPageBar() |
| | | { |
| | | InitializeComponent(); |
| | | // UtilityHelper.SetFont(layoutControl1); |
| | | this.cbxRowCount.Text = "50"; |
| | | this.cbxRowCount.SelectedIndexChanged += new System.EventHandler(this.cbxRowCount_SelectedIndexChanged); |
| | | } |
| | | |
| | | public event GetPageDataEvents PagerEvent; //定义事件 |
| | |
| | | RowsCount = Convert.ToInt32(cbxRowCount.Text); |
| | | CurrentPage = 1; |
| | | if (PagerEvent != null) |
| | | BtnEvents(sender, e); |
| | | if (RecordCount > 0 && RowsCount>0) |
| | | BtnEvents(sender, e); |
| | | } |
| | | |
| | | //手动输入显示页面编号 |
| | |
| | | |
| | | private void BtnEvents(object sender, EventArgs e) |
| | | { |
| | | //setTxt(); |
| | | PagerEvent(CurrentPage, RowsCount); |
| | | } |
| | | |
| | |
| | | tbxCurrentPage.Text = CurrentPage.ToString(); |
| | | lbTotalPages.Text = "共 " + TotalPages + "页"; |
| | | lbTotalRows.Text = "共 " + RecordCount + " 条记录"; |
| | | cbxRowCount.Text = RowsCount.ToString(); |
| | | if (RowsCount > 0) |
| | | cbxRowCount.Text = RowsCount.ToString(); |
| | | if (CurrentPage == 1) |
| | | lbFirstPage.Enabled = false; |
| | | else |
| | |
| | | /// </summary> |
| | | public int RowsCount { get; set; } |
| | | |
| | | |
| | | int _RecordCount; |
| | | /// <summary> |
| | | /// 总记录数 |
| | | /// </summary> |
| | | public int RecordCount { get; set; } |
| | | public int RecordCount |
| | | { |
| | | get { return _RecordCount; } |
| | | set |
| | | { |
| | | _RecordCount = value; |
| | | setTxt(); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | |
| | | <?xml version="1.0" encoding="utf-8"?> |
| | | <root> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | | The primary goals of this format is to allow a simple XML format |
| | | that is mostly human readable. The generation and parsing of the |
| | | various data types are done through the TypeConverter classes |
| | | associated with the data types. |
| | | |
| | | Example: |
| | | |
| | | ... ado.net/XML headers & schema ... |
| | | <resheader name="resmimetype">text/microsoft-resx</resheader> |
| | | <resheader name="version">2.0</resheader> |
| | | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
| | | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
| | | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
| | | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
| | | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
| | | <value>[base64 mime encoded serialized .NET Framework object]</value> |
| | | </data> |
| | | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
| | | <comment>This is a comment</comment> |
| | | </data> |
| | | |
| | | There are any number of "resheader" rows that contain simple |
| | | name/value pairs. |
| | | |
| | | Each data row contains a name, and value. The row also contains a |
| | | type or mimetype. Type corresponds to a .NET class that support |
| | | text/value conversion through the TypeConverter architecture. |
| | | Classes that don't support this are serialized and stored with the |
| | | mimetype set. |
| | | |
| | | The mimetype is used for serialized objects, and tells the |
| | | ResXResourceReader how to depersist the object. This is currently not |
| | | extensible. For a given mimetype the value must be set accordingly: |
| | | |
| | | Note - application/x-microsoft.net.object.binary.base64 is the format |
| | | that the ResXResourceWriter will generate, however the reader can |
| | | read any of the formats listed below. |
| | | |
| | | mimetype: application/x-microsoft.net.object.binary.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.bytearray.base64 |
| | | value : The object must be serialized into a byte array |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root" |
| | | xmlns=""> |
| | | <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <!-- |
| | | Microsoft ResX Schema |
| | | |
| | | Version 2.0 |
| | | |
| | | The primary goals of this format is to allow a simple XML format |
| | | that is mostly human readable. The generation and parsing of the |
| | | various data types are done through the TypeConverter classes |
| | | associated with the data types. |
| | | |
| | | Example: |
| | | |
| | | ... ado.net/XML headers & schema ... |
| | | <resheader name="resmimetype">text/microsoft-resx</resheader> |
| | | <resheader name="version">2.0</resheader> |
| | | <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> |
| | | <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> |
| | | <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> |
| | | <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> |
| | | <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> |
| | | <value>[base64 mime encoded serialized .NET Framework object]</value> |
| | | </data> |
| | | <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> |
| | | <comment>This is a comment</comment> |
| | | </data> |
| | | |
| | | There are any number of "resheader" rows that contain simple |
| | | name/value pairs. |
| | | |
| | | Each data row contains a name, and value. The row also contains a |
| | | type or mimetype. Type corresponds to a .NET class that support |
| | | text/value conversion through the TypeConverter architecture. |
| | | Classes that don't support this are serialized and stored with the |
| | | mimetype set. |
| | | |
| | | The mimetype is used for serialized objects, and tells the |
| | | ResXResourceReader how to depersist the object. This is currently not |
| | | extensible. For a given mimetype the value must be set accordingly: |
| | | |
| | | Note - application/x-microsoft.net.object.binary.base64 is the format |
| | | that the ResXResourceWriter will generate, however the reader can |
| | | read any of the formats listed below. |
| | | |
| | | mimetype: application/x-microsoft.net.object.binary.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.soap.base64 |
| | | value : The object must be serialized with |
| | | : System.Runtime.Serialization.Formatters.Soap.SoapFormatter |
| | | : and then encoded with base64 encoding. |
| | | |
| | | mimetype: application/x-microsoft.net.object.bytearray.base64 |
| | | value : The object must be serialized into a byte array |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
| | | <xsd:import namespace="http://www.w3.org/XML/1998/namespace" /> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <xsd:complexType> |
| | | <xsd:choice maxOccurs="unbounded"> |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:choice maxOccurs="unbounded"> |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" |
| | | minOccurs="0"/> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" use="required" |
| | | type="xsd:string"/> |
| | | <xsd:attribute name="type" type="xsd:string"/> |
| | | <xsd:attribute name="mimetype" type="xsd:string"/> |
| | | <xsd:attribute ref="xml:space"/> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="assembly"> |
| | | <xsd:complexType> |
| | | <xsd:attribute name="alias" type="xsd:string"/> |
| | | <xsd:attribute name="name" type="xsd:string"/> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" |
| | | minOccurs="0" msdata:Ordinal="1"/> |
| | | <xsd:element name="comment" type="xsd:string" |
| | | minOccurs="0" msdata:Ordinal="2"/> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" |
| | | use="required" msdata:Ordinal="1"/> |
| | | <xsd:attribute name="type" type="xsd:string" |
| | | msdata:Ordinal="3"/> |
| | | <xsd:attribute name="mimetype" type="xsd:string" |
| | | msdata:Ordinal="4"/> |
| | | <xsd:attribute ref="xml:space"/> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" |
| | | minOccurs="0" msdata:Ordinal="1"/> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" |
| | | use="required"/> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" use="required" type="xsd:string" /> |
| | | <xsd:attribute name="type" type="xsd:string" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:schema> |
| | | <resheader name="resmimetype"> |
| | | <value>text/microsoft-resx</value> |
| | | </resheader> |
| | | <resheader name="version"> |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, |
| | | Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 |
| | | </value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, |
| | | Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 |
| | | </value> |
| | | </resheader> |
| | | </xsd:element> |
| | | <xsd:element name="assembly"> |
| | | <xsd:complexType> |
| | | <xsd:attribute name="alias" type="xsd:string" /> |
| | | <xsd:attribute name="name" type="xsd:string" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
| | | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
| | | <xsd:attribute ref="xml:space" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:schema> |
| | | <resheader name="resmimetype"> |
| | | <value>text/microsoft-resx</value> |
| | | </resheader> |
| | | <resheader name="version"> |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | </root> |
| | |
| | | this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | } |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | /// <summary> |
| | | /// 查询事件 |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | Gs.DevApp.UserControl.ShowFilter frm = new Gs.DevApp.UserControl.ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | | /// <summary> |
| | | /// 查询回调 |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 修改事件 |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); |
| | | foreach (FilterEntity itm in _filterList) |
| | | { |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + itm.fileValue + "'"); |
| | | } |
| | | PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.create_date", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", |
| | | _webServiceName + "GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | /// <summary> |
| | | /// |
| | |
| | | this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | } |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | /// <summary> |
| | | /// 查询事件 |
| | |
| | | /// <param name="e"></param> |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | /// <summary> |
| | | /// 修改事件 |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | { |
| | | System.Text.StringBuilder _sbSqlWhere = new System.Text.StringBuilder(); |
| | | foreach (FilterEntity itm in _filterList) |
| | | { |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + itm.fileValue + "'"); |
| | | } |
| | | PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | int dddd = dd.rtnData.pages;//总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | /// |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private async void getPageList(int curPage) |
| | | { |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = await UtilityHelper.HttpPostAsync("", _webServiceName + "GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + ex.Message); |
| | | } |
| | | _loading.Stop(); |
| | | } |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | | { |
| | | if (string.IsNullOrEmpty(strGuid)) |