| DevApp/Gs.DevApp/TestForm/XtraForm1.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/TestForm/XtraForm1.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/TestForm/XtraForm1.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/SelectCgMx.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/SelectCgMx.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/UcComBox.resx | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/UcLookCk.Designer.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/UcLookCk.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
| DevApp/Gs.DevApp/UserControl/UcLookSupplier.cs | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
DevApp/Gs.DevApp/TestForm/XtraForm1.Designer.cs
@@ -28,162 +28,78 @@ /// </summary> private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(XtraForm1)); this.button1 = new System.Windows.Forms.Button(); this.textBox1 = new System.Windows.Forms.TextBox(); this.label1 = new System.Windows.Forms.Label(); this.lbMsg2 = new System.Windows.Forms.Label(); this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); this.label2 = new System.Windows.Forms.Label(); 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.ucLookCk1 = new Gs.DevApp.UserControl.UcLookCk(); this.ucLookSupplier1 = new Gs.DevApp.UserControl.UcLookSupplier(); this.simpleButton2 = new DevExpress.XtraEditors.SimpleButton(); this.SuspendLayout(); // // button1 // label2 // this.button1.Location = new System.Drawing.Point(92, 141); this.button1.Name = "button1"; this.button1.Size = new System.Drawing.Size(75, 23); this.button1.TabIndex = 0; this.button1.Text = "button1"; this.button1.UseVisualStyleBackColor = true; this.button1.Click += new System.EventHandler(this.button1_Click); // // textBox1 // this.textBox1.Location = new System.Drawing.Point(92, 52); this.textBox1.Name = "textBox1"; this.textBox1.Size = new System.Drawing.Size(194, 26); this.textBox1.TabIndex = 1; // // label1 // this.label1.AutoSize = true; this.label1.Location = new System.Drawing.Point(92, 102); this.label1.Name = "label1"; this.label1.Size = new System.Drawing.Size(44, 18); this.label1.TabIndex = 2; this.label1.Text = "label1"; // // lbMsg2 // this.lbMsg2.AutoSize = true; this.lbMsg2.Location = new System.Drawing.Point(92, 208); this.lbMsg2.Name = "lbMsg2"; this.lbMsg2.Size = new System.Drawing.Size(44, 18); this.lbMsg2.TabIndex = 3; this.lbMsg2.Text = "label2"; // // simpleButton2 // this.simpleButton2.ImageOptions.Image = ((System.Drawing.Image)(resources.GetObject("simpleButton2.ImageOptions.Image"))); 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; this.simpleButton2.Text = "simpleButton2"; this.label2.AutoSize = true; this.label2.Location = new System.Drawing.Point(179, 134); this.label2.Name = "label2"; this.label2.Size = new System.Drawing.Size(38, 18); this.label2.TabIndex = 8; this.label2.Text = "仓库"; // // simpleButton1 // this.simpleButton1.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.group2_32x32; this.simpleButton1.Location = new System.Drawing.Point(521, 12); this.simpleButton1.Location = new System.Drawing.Point(169, 184); this.simpleButton1.Name = "simpleButton1"; this.simpleButton1.Size = new System.Drawing.Size(170, 85); this.simpleButton1.TabIndex = 4; this.simpleButton1.Size = new System.Drawing.Size(94, 29); this.simpleButton1.TabIndex = 9; this.simpleButton1.Text = "simpleButton1"; this.simpleButton1.Click += new System.EventHandler(this.simpleButton1_Click); // // lookSearchSupplier // ucLookCk1 // 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; this.ucLookCk1.Location = new System.Drawing.Point(182, 87); this.ucLookCk1.Margin = new System.Windows.Forms.Padding(0); this.ucLookCk1.Name = "ucLookCk1"; this.ucLookCk1.Size = new System.Drawing.Size(219, 30); this.ucLookCk1.TabIndex = 7; // // searchLookUpEdit1View // ucLookSupplier1 // 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; this.ucLookSupplier1.Location = new System.Drawing.Point(604, 114); this.ucLookSupplier1.Margin = new System.Windows.Forms.Padding(0); this.ucLookSupplier1.Name = "ucLookSupplier1"; this.ucLookSupplier1.Size = new System.Drawing.Size(228, 30); this.ucLookSupplier1.TabIndex = 10; // // gridColumn2 // simpleButton2 // 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"; this.simpleButton2.Location = new System.Drawing.Point(661, 183); this.simpleButton2.Name = "simpleButton2"; this.simpleButton2.Size = new System.Drawing.Size(94, 29); this.simpleButton2.TabIndex = 11; this.simpleButton2.Text = "simpleButton2"; this.simpleButton2.Click += new System.EventHandler(this.simpleButton2_Click); // // 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.ucLookSupplier1); this.Controls.Add(this.simpleButton1); this.Controls.Add(this.lbMsg2); this.Controls.Add(this.label1); this.Controls.Add(this.textBox1); this.Controls.Add(this.button1); this.Controls.Add(this.label2); this.Controls.Add(this.ucLookCk1); this.Name = "XtraForm1"; this.Text = "XtraForm1"; ((System.ComponentModel.ISupportInitialize)(this.lookSearchSupplier.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit(); this.ResumeLayout(false); this.PerformLayout(); } #endregion private System.Windows.Forms.Button button1; private System.Windows.Forms.TextBox textBox1; private System.Windows.Forms.Label label1; private System.Windows.Forms.Label lbMsg2; private UserControl.UcLookCk ucLookCk1; private System.Windows.Forms.Label label2; private DevExpress.XtraEditors.SimpleButton simpleButton1; private UserControl.UcLookSupplier ucLookSupplier1; 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; } } DevApp/Gs.DevApp/TestForm/XtraForm1.cs
@@ -13,74 +13,28 @@ public XtraForm1() { InitializeComponent(); textBox1.Text = "THIS_IS_AN_EXAMPLE"; getSuppler(); lookSearchSupplier.EditValueChanged += LookSearchSupplier_EditValueChanged; // this.ucLookCk1.KeyFile = "depotId"; this.ucLookCk1.KeyFile = "depotCode"; ucLookCk1.EditChanged += UcLookCk1_EditChanged; } private void LookSearchSupplier_EditValueChanged(object sender, EventArgs e) private void UcLookCk1_EditChanged(object sender, EventArgs e) { //使用属性 var daID = lookSearchSupplier.EditValue.ToString(); var xm = lookSearchSupplier.Text.Trim(); //使用方法 var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; if (row != null) xm = row["guid"].ToString(); string id = ucLookCk1.GetId(); string code = ucLookCk1.GetCode(); string name = ucLookCk1.GetName(); label2.Text = "id:" + id + ",code:" + code + ",name:" + name; } private void getSuppler() private void simpleButton1_Click(object sender, EventArgs e) { var pgq = new PageQueryModel(1, 999999, "supp_no", "asc", "", " and fforbidstatus='A'"); var json = JsonConvert.SerializeObject(pgq); try { var strReturn = UtilityHelper.HttpPost("", "MesSupplierManager/GetListPage", json); var rtn = UtilityHelper.ReturnToTablePage(strReturn); var dt = rtn.rtnData.list; lookSearchSupplier.Properties.DataSource = dt; lookSearchSupplier.Properties.DisplayMember = "suppNo"; lookSearchSupplier.Properties.ValueMember = "id"; } catch (Exception ex) { MsgHelper.Warning("提示:" + ex.Message); } //ucLookCk1.SetCode("101087"); ucLookCk1.SetIdOrCode("1.04.001"); } private void button1_Click(object sender, EventArgs e) private void simpleButton2_Click(object sender, EventArgs e) { var input = textBox1.Text; label1.Text = ToCamelCase(input); lbMsg2.Text = UtilityHelper.ToCamelCase(input); } public static string ToCamelCase(string strItem) { var hasLowercase = Regex.IsMatch(strItem, @"[a-z]"); if (hasLowercase) { var chars = strItem.ToCharArray(); chars[0] = char.ToLower(chars[0]); return new string(chars); } var strItems = strItem.ToLower().Split('_'); var strItemTarget = strItems[0]; for (var j = 1; j < strItems.Length; j++) { var temp = strItems[j]; var temp1 = temp[0].ToString().ToUpper(); var temp2 = ""; temp2 = temp1 + temp.Remove(0, 1); strItemTarget += temp2; } return strItemTarget; ucLookSupplier1.SetIdOrCode("VEN00063"); } } } DevApp/Gs.DevApp/TestForm/XtraForm1.resx
@@ -1,157 +1,120 @@ <?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"> <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: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> <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/9hAAAABGdBTUEAALGPC/xhBQAAABB0RVh0VGl0 bGUARHJhZnRWaWV3O9Vg5KIAAALtSURBVDhPbZPLTxNRGMVn68q1bgw7/wA2xoQNJhox7pQ/QNxpjEtD lIcIlEeBtlCGAgVbkAhWHiUoWNRoUCLIw1IQ0NYifU6HTtvpdDptj/deHtHESc7y951vvnMu1zvidFme TcEyPIWe4UnwQxPg7RPoto3DbHOga/AFOgfGYLKOwtD/HIa+EXRYRtDWM4w2fsjFUVjNalBVDZkjKRmq LNJKFrKiIpXOICmrSMgKpJSCeFLBQTINvdkOjjpT+KtXwjuPyPR2Q8T8RgwudwxvvgmYW49idi2CV6sR LGzFGCwm0mgxPwVH16auFKRfoVBAjkjLF5DV8lCyeciZHBJpDZKsYXo5hAMCiwkZzZ2DdMAEMmRlOoBw yBFQy+WhagUC5xicJHBczkJMZeFcCiImyRCkFHSmAXD80Dj7X7r2IVxApW35vxISKia/BMiAFIR4Co2G fnBm20so5FjzZACF1b/WTirUWUVUSiMYS8IfljD24Sf2QgJCgoSGjj46wMGuPe8WDmE194/rg4FFuPkG LJYVnWiu5Cy8/iDq2y3gaM40Khe5tqIeHYw4S8Q5ciBj2VCHz1eL4Ck/zzR78QycNy5ha9eHJ2094GhJ UmmVRXUMHzsbnBu4ZlrFTfsvpuL7Dgb3nTsFz44XdXoeHG1YUs6QnKMsKnrtqKTAOO3GddMKyu2+E/jK HQuDx+7dxq4/gMet3eCMpJ4JMuA1KYlEo0qq7GBlnVu4bPSgtNWNksY1Bp8uqcTo3Qp4tr34HRFR22wG R7tN6/npu8BKQnN2LPhgW4xicCEC68cQet8HGXzrYT82d3wM3icp1DR3gmsnD4N2O87qKUMkJQmEYyjV E2fdOi7UrqC4agkVVVby3z7shUUEonHsE1Xr6ADyqmi3aT1Zw0hBIqIEfyCMbd8eNsm1Pbte/PDvM+cA cabw4QAjOD1vn9F329nDoN1uMllZw2hJ6tt7WVR1rTw7WG2LGTVNXcy5WmfCo0bjzB8xYUcabMztQwAA AABJRU5ErkJggg== </value> <!-- 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: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: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> DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -252,6 +252,13 @@ if (gridViews != null) foreach (var gv in gridViews) gv.OptionsBehavior.Editable = !isEdt; var _btnAry= controls.Find("btnSelect", false); if (_btnAry.Length > 0) { var _btnType = _btnAry[0]; _btnType.Enabled = !isEdt; } foreach (JProperty property in dynamicObject.Properties()) { var strName = property.Name; @@ -407,12 +414,11 @@ txt.Text = strVal; } } //自定义仓库 if (colType is UcLookCk) { var txt = colType as UcLookCk; txt.SetCode( strVal); txt.SetIdOrCode( strVal); txt.Enabled = !isEdt; continue; } @@ -420,18 +426,16 @@ if (colType is UcLookSupplier) { var txt = colType as UcLookSupplier; txt.SetCode(strVal); txt.SetIdOrCode(strVal); txt.Enabled = !isEdt; continue; } if (colType is SimpleButton) { var txt = colType as UcLookCk; txt.SetCode(strVal); txt.Enabled = !isEdt; continue; } } } catch (Exception ex) DevApp/Gs.DevApp/UserControl/SelectCgMx.Designer.cs
@@ -169,7 +169,7 @@ // // gv_chk // this.gv_chk.Caption = "gridColumn1"; this.gv_chk.Caption = "选择"; this.gv_chk.FieldName = "gvChk"; this.gv_chk.MinWidth = 60; this.gv_chk.Name = "gv_chk"; DevApp/Gs.DevApp/UserControl/SelectCgMx.resx
@@ -1,134 +1,120 @@ <?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> DevApp/Gs.DevApp/UserControl/UcComBox.resx
@@ -1,134 +1,120 @@ <?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> DevApp/Gs.DevApp/UserControl/UcLookCk.Designer.cs
@@ -41,6 +41,7 @@ // lookSearchSupplier // this.lookSearchSupplier.Dock = System.Windows.Forms.DockStyle.Fill; this.lookSearchSupplier.EditValue = "请选择"; this.lookSearchSupplier.Location = new System.Drawing.Point(0, 0); this.lookSearchSupplier.Name = "lookSearchSupplier"; this.lookSearchSupplier.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); @@ -68,12 +69,13 @@ this.gridColumn2.Caption = "仓库编号"; this.gridColumn2.FieldName = "depotCode"; this.gridColumn2.Name = "gridColumn2"; this.gridColumn2.UnboundDataType = typeof(string); this.gridColumn2.Visible = true; this.gridColumn2.VisibleIndex = 1; // // gridColumn3 // this.gridColumn3.Caption = "供应商名称"; this.gridColumn3.Caption = "仓库名称"; this.gridColumn3.FieldName = "depotName"; this.gridColumn3.Name = "gridColumn3"; this.gridColumn3.Visible = true; DevApp/Gs.DevApp/UserControl/UcLookCk.cs
@@ -14,9 +14,19 @@ InitializeComponent(); lookSearchSupplier.EditValueChanged += LookSearchSupplier_EditValueChanged; getSuppler(); } private string _KeyFile = ""; public string KeyFile { get { return _KeyFile; } set { _KeyFile = value; getSuppler(); } } /// <summary> /// 改变事件 /// </summary> @@ -41,7 +51,8 @@ var dt = rtn.rtnData.list; lookSearchSupplier.Properties.DataSource = dt; lookSearchSupplier.Properties.DisplayMember = "depotName"; lookSearchSupplier.Properties.ValueMember = "depotsCode"; // lookSearchSupplier.Properties.ValueMember = "depotId"; lookSearchSupplier.Properties.ValueMember = KeyFile; } catch (Exception ex) { @@ -49,21 +60,38 @@ } } /// <summary> /// 取控件的值 /// </summary> /// <return>Object</return> public string[] GetValue() public string GetId() { var code = lookSearchSupplier.EditValue.ToString(); var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; if (row != null) { string id = row["DepotId"].ToString(); return id; } return ""; } public string GetCode() { var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; if (row != null) { string id = row["DepotCode"].ToString(); return id; } return ""; } public string GetName() { var name = lookSearchSupplier.Text.Trim(); string[] _ary = { code, name }; return _ary; return name; } public void SetCode(string Code) public void SetIdOrCode(string Code) { lookSearchSupplier.EditValue = Code; if (KeyFile == "depotId") lookSearchSupplier.EditValue = Int64.Parse((Code.ToString().Trim())); else lookSearchSupplier.EditValue = ((Code.ToString().Trim())); } } } DevApp/Gs.DevApp/UserControl/UcLookSupplier.cs
@@ -1,5 +1,6 @@ using System; using System.Data; using System.Windows.Media.Animation; using DevExpress.XtraEditors; using Gs.DevApp.Entity; using Gs.DevApp.ToolBox; @@ -17,6 +18,16 @@ getSuppler(); } private string _KeyFile = ""; public string KeyFile { get { return _KeyFile; } set { _KeyFile = value; getSuppler(); } } /// <summary> /// 改变事件 /// </summary> @@ -25,15 +36,6 @@ 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(); //} if (EditChanged != null) EditChanged(this, e); } @@ -50,7 +52,8 @@ var dt = rtn.rtnData.list; lookSearchSupplier.Properties.DataSource = dt; lookSearchSupplier.Properties.DisplayMember = "suppName"; lookSearchSupplier.Properties.ValueMember = "suppno"; // lookSearchSupplier.Properties.ValueMember = "suppNo"; lookSearchSupplier.Properties.ValueMember = KeyFile; } catch (Exception ex) { @@ -58,29 +61,38 @@ } } /// <summary> /// 取控件的值 /// </summary> /// <return>Object</return> public string[] GetValue() public string GetId() { ////https://www.cnblogs.com/lhyqzx/p/6928817.html //var id = lookSearchSupplier.EditValue.ToString(); //var name = lookSearchSupplier.Text.Trim(); //var code = ""; //var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; //if (row != null) code = row["suppNo"].ToString(); //string[] _ary = { id, name, code }; //return _ary; var code = lookSearchSupplier.EditValue.ToString(); var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; if (row != null) { string id = row["Id"].ToString(); return id; } return ""; } public string GetCode() { var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView; if (row != null) { string id = row["SuppNo"].ToString(); return id; } return ""; } public string GetName() { var name = lookSearchSupplier.Text.Trim(); string[] _ary = { code, name }; return _ary; return name; } public void SetCode(string Code) public void SetIdOrCode(string Code) { lookSearchSupplier.EditValue = Code; if (KeyFile == "id") lookSearchSupplier.EditValue = Int64.Parse((Code.ToString().Trim())); else lookSearchSupplier.EditValue = ((Code.ToString().Trim())); } } }