From a9c9f13461dbe9ab88677d94f9033db30a6558b0 Mon Sep 17 00:00:00 2001 From: lu <99954486@qq.com> Date: 星期三, 23 十月 2024 16:40:09 +0800 Subject: [PATCH] 增加了一个测试窗体 --- DevApp/Gs.DevApp/TestForm/XtraForm1.cs | 39 ++++++++++++ DevApp/Gs.DevApp/TestForm/XtraForm1.resx | 30 +++++----- DevApp/Gs.DevApp/TestForm/XtraForm1.Designer.cs | 73 +++++++++++++++++++++++ 3 files changed, 123 insertions(+), 19 deletions(-) diff --git a/DevApp/Gs.DevApp/TestForm/XtraForm1.Designer.cs b/DevApp/Gs.DevApp/TestForm/XtraForm1.Designer.cs index ea0e9ba..527b7c1 100644 --- a/DevApp/Gs.DevApp/TestForm/XtraForm1.Designer.cs +++ b/DevApp/Gs.DevApp/TestForm/XtraForm1.Designer.cs @@ -35,6 +35,14 @@ this.lbMsg2 = new System.Windows.Forms.Label(); this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); this.simpleButton1 = new DevExpress.XtraEditors.SimpleButton(); + this.lookSearchSupplier = new DevExpress.XtraEditors.SearchLookUpEdit(); + this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView(); + this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); + this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); + ((System.ComponentModel.ISupportInitialize)(this.lookSearchSupplier.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit(); this.SuspendLayout(); // // button1 @@ -75,7 +83,7 @@ // simpleButton2 // this.simpleButton2.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("simpleButton2.ImageOptions.Image"))); - this.simpleButton2.Location = new System.Drawing.Point(533, 222); + this.simpleButton2.Location = new System.Drawing.Point(392, 31); this.simpleButton2.Name = "simpleButton2"; this.simpleButton2.Size = new System.Drawing.Size(94, 66); this.simpleButton2.TabIndex = 5; @@ -84,17 +92,70 @@ // simpleButton1 // this.simpleButton1.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.group2_32x32; - this.simpleButton1.Location = new System.Drawing.Point(533, 79); + this.simpleButton1.Location = new System.Drawing.Point(521, 12); this.simpleButton1.Name = "simpleButton1"; this.simpleButton1.Size = new System.Drawing.Size(170, 85); this.simpleButton1.TabIndex = 4; this.simpleButton1.Text = "simpleButton1"; + // + // lookSearchSupplier + // + this.lookSearchSupplier.Location = new System.Drawing.Point(418, 171); + this.lookSearchSupplier.Name = "lookSearchSupplier"; + this.lookSearchSupplier.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); + this.lookSearchSupplier.Properties.Appearance.Options.UseFont = true; + this.lookSearchSupplier.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.lookSearchSupplier.Properties.PopupView = this.searchLookUpEdit1View; + this.lookSearchSupplier.Size = new System.Drawing.Size(309, 28); + this.lookSearchSupplier.TabIndex = 6; + // + // searchLookUpEdit1View + // + this.searchLookUpEdit1View.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { + this.gridColumn2, + this.gridColumn3, + this.gridColumn1, + this.gridColumn4}); + this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus; + this.searchLookUpEdit1View.Name = "searchLookUpEdit1View"; + this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false; + this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false; + // + // gridColumn2 + // + this.gridColumn2.Caption = "渚涘簲鍟嗙紪鍙�"; + this.gridColumn2.FieldName = "suppNo"; + this.gridColumn2.Name = "gridColumn2"; + this.gridColumn2.Visible = true; + this.gridColumn2.VisibleIndex = 0; + // + // gridColumn3 + // + this.gridColumn3.Caption = "渚涘簲鍟嗗悕绉�"; + this.gridColumn3.FieldName = "suppName"; + this.gridColumn3.Name = "gridColumn3"; + this.gridColumn3.Visible = true; + this.gridColumn3.VisibleIndex = 1; + // + // gridColumn1 + // + this.gridColumn1.Caption = "id"; + this.gridColumn1.FieldName = "id"; + this.gridColumn1.Name = "gridColumn1"; + // + // gridColumn4 + // + this.gridColumn4.Caption = "guid"; + this.gridColumn4.FieldName = "guid"; + this.gridColumn4.Name = "gridColumn4"; // // XtraForm1 // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(890, 396); + this.Controls.Add(this.lookSearchSupplier); this.Controls.Add(this.simpleButton2); this.Controls.Add(this.simpleButton1); this.Controls.Add(this.lbMsg2); @@ -103,6 +164,8 @@ this.Controls.Add(this.button1); this.Name = "XtraForm1"; this.Text = "XtraForm1"; + ((System.ComponentModel.ISupportInitialize)(this.lookSearchSupplier.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); @@ -116,5 +179,11 @@ private System.Windows.Forms.Label lbMsg2; private DevExpress.XtraEditors.SimpleButton simpleButton1; private DevExpress.XtraEditors.SimpleButton simpleButton2; + private DevExpress.XtraEditors.SearchLookUpEdit lookSearchSupplier; + private DevExpress.XtraGrid.Views.Grid.GridView searchLookUpEdit1View; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; + private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; } } \ No newline at end of file diff --git a/DevApp/Gs.DevApp/TestForm/XtraForm1.cs b/DevApp/Gs.DevApp/TestForm/XtraForm1.cs index 20d278c..ae6a048 100644 --- a/DevApp/Gs.DevApp/TestForm/XtraForm1.cs +++ b/DevApp/Gs.DevApp/TestForm/XtraForm1.cs @@ -12,6 +12,8 @@ using System.Threading.Tasks; using System.Windows.Forms; using System.Dynamic; +using Gs.DevApp.Entity; +using Gs.DevApp.ToolBox; namespace Gs.DevApp.TestForm { @@ -21,15 +23,48 @@ { InitializeComponent(); textBox1.Text = "THIS_IS_AN_EXAMPLE"; + getSuppler(); + this.lookSearchSupplier.EditValueChanged += LookSearchSupplier_EditValueChanged; } + private void LookSearchSupplier_EditValueChanged(object sender, EventArgs e) + { + //浣跨敤灞炴�� + string daID = this.lookSearchSupplier.EditValue.ToString(); + string xm = this.lookSearchSupplier.Text.Trim(); + //浣跨敤鏂规硶 + DataRowView row = this.lookSearchSupplier.GetSelectedDataRow() as DataRowView; + if (row != null) + { + xm = row["guid"].ToString(); + } + } + + private void getSuppler() + { + PageQueryModel pgq = new PageQueryModel(1, 999999, "supp_no", "asc", "", " and fforbidstatus='A'"); + string json = JsonConvert.SerializeObject(pgq); + try + { + string strReturn = UtilityHelper.HttpPost("", "MesSupplierManager/GetListPage", json); + ReturnModel<PageListModel> rtn = UtilityHelper.ReturnToTablePage(strReturn); + DataTable dt = rtn.rtnData.list; + lookSearchSupplier.Properties.DataSource = dt; + lookSearchSupplier.Properties.DisplayMember = "suppNo"; + lookSearchSupplier.Properties.ValueMember = "id"; + } + catch (Exception ex) + { + ToolBox.MsgHelper.Warning("鎻愮ず锛�" + ex.Message); + } + } private void button1_Click(object sender, EventArgs e) { string input = textBox1.Text; label1.Text = ToCamelCase(input); - lbMsg2.Text =Gs.DevApp.ToolBox.UtilityHelper.ToCamelCase(input); - + lbMsg2.Text = Gs.DevApp.ToolBox.UtilityHelper.ToCamelCase(input); + } public static string ToCamelCase(string strItem) { diff --git a/DevApp/Gs.DevApp/TestForm/XtraForm1.resx b/DevApp/Gs.DevApp/TestForm/XtraForm1.resx index 60671c7..f212210 100644 --- a/DevApp/Gs.DevApp/TestForm/XtraForm1.resx +++ b/DevApp/Gs.DevApp/TestForm/XtraForm1.resx @@ -120,21 +120,21 @@ <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <data name="simpleButton2.ImageOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <value> - iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 - YQUAAAAQdEVYdFRpdGxlAERyYWZ0VmlldzvVYOSiAAAC7UlEQVQ4T22Ty08TURjFZ+vKtW4MO/8ANsaE - DSYaMe6UP0DcaYxLQ5SHCJRHgbZQhgIFW5AIVh4lKFjUaFAiyMNSENDWIn1Oh07b6XQ6bY/3Xh7RxEnO - 8vedb75zLtc74nRZnk3BMjyFnuFJ8EMT4O0T6LaNw2xzoGvwBToHxmCyjsLQ/xyGvhF0WEbQ1jOMNn7I - xVFYzWpQVQ2ZIykZqizSShayoiKVziApq0jICqSUgnhSwUEyDb3ZDo46U/irV8I7j8j0dkPE/EYMLncM - b74JmFuPYnYtglerESxsxRgsJtJoMT8FR9emrhSkX6FQQI5IyxeQ1fJQsnnImRwSaQ2SrGF6OYQDAosJ - Gc2dg3TABDJkZTqAcMgRUMvloWoFAucYnCRwXM5CTGXhXAoiJskQpBR0pgFw/NA4+1+69iFcQKVt+b8S - EiomvwTIgBSEeAqNhn5wZttLKORY82QAhdW/1k4q1FlFVEojGEvCH5Yw9uEn9kICQoKEho4+OsDBrj3v - Fg5hNfeP64OBRbj5BiyWFZ1oruQsvP4g6tst4GjONCoXubaiHh2MOEvEOXIgY9lQh89Xi+ApP880e/EM - nDcuYWvXhydtPeBoSVJplUV1DB87G5wbuGZaxU37L6bi+w4G9507Bc+OF3V6HhxtWFLOkJyjLCp67aik - wDjtxnXTCsrtvhP4yh0Lg8fu3cauP4DHrd3gjKSeCTLgNSmJRKNKquxgZZ1buGz0oLTVjZLGNQafLqnE - 6N0KeLa9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+ HQuDx+7dxq4/gMet3eCMpJ4JMuA1KYlEo0qq7GBlnVu4bPSgtNWNksY1Bp8uqcTo3Qp4tr34HRFR22wG + R7tN6/npu8BKQnN2LPhgW4xicCEC68cQet8HGXzrYT82d3wM3icp1DR3gmsnD4N2O87qKUMkJQmEYyjV + E2fdOi7UrqC4agkVVVby3z7shUUEonHsE1Xr6ADyqmi3aT1Zw0hBIqIEfyCMbd8eNsm1Pbte/PDvM+cA + cabw4QAjOD1vn9F329nDoN1uMllZw2hJ6tt7WVR1rTw7WG2LGTVNXcy5WmfCo0bjzB8xYUcabMztQwAA + AABJRU5ErkJggg== </value> </data> </root> \ No newline at end of file -- Gitblit v1.9.3