From c685ae1bcb234616e8930621a4b087f4e8fd98bb Mon Sep 17 00:00:00 2001 From: lg <999544862qq.com> Date: 星期五, 13 九月 2024 12:00:43 +0800 Subject: [PATCH] 基础资料 --- DevApp/Gs.DevApp/DevFrm/FrmLogin.cs | 2 DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.cs | 21 +++- DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs | 2 DevApp/Gs.DevApp/DevFrm/User/Role.Designer.cs | 36 +++--- DevApp/Gs.DevApp/DevFrm/User/Organization.Designer.cs | 32 +++--- DevApp/Gs.DevApp/DevFrm/Rpt/RptPreview.cs | 2 DevApp/Gs.DevApp/DevFrm/User/Role.cs | 8 DevApp/Gs.DevApp/DevFrm/User/User.Designer.cs | 76 ++++++++------ DevApp/Gs.DevApp/DevFrm/User/Organization.cs | 8 DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs | 8 DevApp/Gs.DevApp/DevFrm/User/User.cs | 10 +- DevApp/Gs.DevApp/DevFrm/User/SysMenu.Designer.cs | 47 ++++---- 12 files changed, 136 insertions(+), 116 deletions(-) diff --git a/DevApp/Gs.DevApp/DevFrm/FrmLogin.cs b/DevApp/Gs.DevApp/DevFrm/FrmLogin.cs index 274ef24..ff926b4 100644 --- a/DevApp/Gs.DevApp/DevFrm/FrmLogin.cs +++ b/DevApp/Gs.DevApp/DevFrm/FrmLogin.cs @@ -24,7 +24,7 @@ /// </summary> private void getTree() { - PageQueryModel pgq = new PageQueryModel(1, 999999, "factory", "asc", "", "and status=1"); + PageQueryModel pgq = new PageQueryModel(1, 999999, "factory", "asc", "", "and isStatus=1"); string json = JsonConvert.SerializeObject(pgq); string strReturn = ""; try diff --git a/DevApp/Gs.DevApp/DevFrm/Rpt/RptPreview.cs b/DevApp/Gs.DevApp/DevFrm/Rpt/RptPreview.cs index 5beb15b..e9e66fc 100644 --- a/DevApp/Gs.DevApp/DevFrm/Rpt/RptPreview.cs +++ b/DevApp/Gs.DevApp/DevFrm/Rpt/RptPreview.cs @@ -52,7 +52,7 @@ }; try { - string strJson = UtilityHelper.HttpPost("", "Report/GetReportList", JsonConvert.SerializeObject(_obj)); + string strJson = UtilityHelper.HttpPost("", "Report/GetUserRoleReport", JsonConvert.SerializeObject(_obj)); JObject _job = JObject.Parse(strJson); string rtnCode = _job["rtnCode"].ToString(); if (int.Parse(rtnCode) > 0) diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs b/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs index a2c41f8..27d62c3 100644 --- a/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs +++ b/DevApp/Gs.DevApp/DevFrm/Sys/DocNoRule.cs @@ -224,7 +224,7 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage, int pageSize) { - PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "createTime", "asc", "", ""); + PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "docCode", "asc", "", ""); string json = JsonConvert.SerializeObject(pgq); try { diff --git a/DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.cs b/DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.cs index d75c1fb..ae9b595 100644 --- a/DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.cs +++ b/DevApp/Gs.DevApp/DevFrm/Sys/EasyCode.cs @@ -95,13 +95,21 @@ private DataTable _getCol() { string strConn = txt_sqlconn.Text.Trim(); + System.Text.StringBuilder sb = new StringBuilder(); + sb.Append("SELECT COLUMN_NAME = a.name, DATA_TYPE = b.name, REMARK = isnull(g.[value],a.name) "); + sb.Append(" FROM syscolumns a left join systypes b on a.xusertype = b.xusertype inner join sysobjects d on a.id = d.id and d.xtype = 'U' and d.name<>'dtproperties' "); + sb.Append(" left join syscomments e on a.cdefault = e.id "); + sb.Append(" left join sys.extended_properties g on a.id = G.major_id and a.colid = g.minor_id "); + sb.Append(" left join sys.extended_properties f on d.id = f.major_id and f.minor_id = 0 "); + sb.Append(" where d.name = '" + txt_table.SelectedValue.ToString() + "'"); + sb.Append(" order by a.id, a.colorder"); DataSet dset = new DataSet(); using (SqlConnection connection = new SqlConnection(strConn)) { connection.Open(); SqlCommand cmd = new SqlCommand(); cmd.Connection = connection; - cmd.CommandText = "SELECT COLUMN_NAME,DATA_TYPE FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = N'" + txt_table.SelectedValue.ToString() + "'"; + cmd.CommandText = sb.ToString(); using (SqlDataAdapter dt = new SqlDataAdapter(cmd)) { dt.Fill(dset, "0"); @@ -168,7 +176,7 @@ if (dt.Rows.Count > 0) { string _FieldName = "";//瀛楁鍚� - string _FieldText = "";// + string _FieldText = "";//瀛楁鏂囨湰 string _prefix = "txt_"; string _Lbfix = "lb_"; string _gvFix = "gv_"; @@ -190,8 +198,9 @@ case "1111": break; default: - _FieldName = ToolBox.UtilityHelper.ToCamelCase(dt.Rows[c]["COLUMN_NAME"].ToString()); - _FieldText = ToolBox.UtilityHelper.ToCamelCase(dt.Rows[c]["COLUMN_NAME"].ToString()); + string _tf = ToolBox.UtilityHelper.ToCamelCase(dt.Rows[c]["COLUMN_NAME"].ToString()); + _FieldName = _tf; + _FieldText = dt.Rows[c]["REMARK"].ToString(); _ControlType = "TextEdit"; break; } @@ -222,7 +231,7 @@ + "this." + _labName + ".TabIndex = " + _Tabindex + ";" + line + "this." + _labName + ".Tag = " + _FieldName02 + ";" + line//Tag鍊� + "this." + _labName + ".Appearance.Font = new System.Drawing.Font(\"Tahoma\", 10F);" + line - + "this." + _labName + ".Text = " + _FieldText02 + ";" + line + + "this." + _labName + ".Text = " + (_FieldText02) + ";" + line //鏂囨湰 + "//" + line + "//" + _ControlName + line @@ -237,7 +246,7 @@ + "this." + _gvName + ".AppearanceCell.Font = new System.Drawing.Font(\"Tahoma\", 10F);" + line + "this." + _gvName + ".AppearanceCell.Options.UseFont = true;" + line + "this." + _gvName + ".FieldName = " + _FieldName02 + ";" + line - + "this." + _gvName + ".Caption = " + _FieldName02 + ";" + line + + "this." + _gvName + ".Caption = " + _FieldText02 .Replace("锛�","")+ ";" + line + "this." + _gvName + ".MinWidth = 25;" + line + "this." + _gvName + ".Visible = true;" + line + "this." + _gvName + ".Width =94;" + line diff --git a/DevApp/Gs.DevApp/DevFrm/User/Organization.Designer.cs b/DevApp/Gs.DevApp/DevFrm/User/Organization.Designer.cs index 8832c2f..ce74d42 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/Organization.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/Organization.Designer.cs @@ -44,7 +44,7 @@ this.txt_upGuid = new System.Windows.Forms.ComboBox(); this.labelControl6 = new DevExpress.XtraEditors.LabelControl(); this.labelControl7 = new DevExpress.XtraEditors.LabelControl(); - this.txt_status = new DevExpress.XtraEditors.ComboBoxEdit(); + this.txt_isStatus = new DevExpress.XtraEditors.ComboBoxEdit(); this.lbGuid = new System.Windows.Forms.Label(); this.labelControl5 = new DevExpress.XtraEditors.LabelControl(); this.labelControl1 = new DevExpress.XtraEditors.LabelControl(); @@ -61,7 +61,7 @@ this.xtraTabPage2.SuspendLayout(); this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txt_factory.Properties)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_conTel.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_conPeople.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).BeginInit(); @@ -123,7 +123,7 @@ this.panel1.Controls.Add(this.txt_upGuid); this.panel1.Controls.Add(this.labelControl6); this.panel1.Controls.Add(this.labelControl7); - this.panel1.Controls.Add(this.txt_status); + this.panel1.Controls.Add(this.txt_isStatus); this.panel1.Controls.Add(this.lbGuid); this.panel1.Controls.Add(this.labelControl5); this.panel1.Controls.Add(this.labelControl1); @@ -216,22 +216,22 @@ this.labelControl7.TabIndex = 117; this.labelControl7.Text = "缁勭粐鐘舵�侊細"; // - // txt_status + // txt_isStatus // - this.txt_status.Location = new System.Drawing.Point(138, 244); - this.txt_status.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.txt_status.Name = "txt_status"; - this.txt_status.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); - this.txt_status.Properties.Appearance.Options.UseFont = true; - this.txt_status.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + this.txt_isStatus.Location = new System.Drawing.Point(138, 244); + this.txt_isStatus.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txt_isStatus.Name = "txt_isStatus"; + this.txt_isStatus.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); + this.txt_isStatus.Properties.Appearance.Options.UseFont = true; + this.txt_isStatus.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); - this.txt_status.Properties.Items.AddRange(new object[] { + this.txt_isStatus.Properties.Items.AddRange(new object[] { "-璇烽�夋嫨-", "姝e父", "绂佺敤"}); - this.txt_status.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - this.txt_status.Size = new System.Drawing.Size(156, 28); - this.txt_status.TabIndex = 116; + this.txt_isStatus.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; + this.txt_isStatus.Size = new System.Drawing.Size(156, 28); + this.txt_isStatus.TabIndex = 116; // // lbGuid // @@ -347,7 +347,7 @@ this.panel1.ResumeLayout(false); this.panel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.txt_factory.Properties)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_conTel.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_conPeople.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).EndInit(); @@ -366,7 +366,7 @@ private System.Windows.Forms.ComboBox txt_upGuid; private DevExpress.XtraEditors.LabelControl labelControl6; private DevExpress.XtraEditors.LabelControl labelControl7; - private DevExpress.XtraEditors.ComboBoxEdit txt_status; + private DevExpress.XtraEditors.ComboBoxEdit txt_isStatus; private System.Windows.Forms.Label lbGuid; private DevExpress.XtraEditors.LabelControl labelControl5; private DevExpress.XtraEditors.LabelControl labelControl1; diff --git a/DevApp/Gs.DevApp/DevFrm/User/Organization.cs b/DevApp/Gs.DevApp/DevFrm/User/Organization.cs index e582010..ec5df29 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/Organization.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/Organization.cs @@ -152,10 +152,10 @@ txt_conTel.Focus(); return; } - if (txt_status.SelectedIndex <= 0) + if (txt_isStatus.SelectedIndex <= 0) { Gs.DevApp.ToolBox.MsgHelper.Warning("鐘舵�佷笉鑳戒负绌猴紒"); - txt_status.Focus(); + txt_isStatus.Focus(); return; } string _upGuid = txt_upGuid.Text.Trim().Length > 0 ? txt_upGuid.SelectedValue.ToString() : ""; @@ -166,7 +166,7 @@ name = txt_name.Text.Trim(),//鍚嶇О conPeople = txt_conPeople.Text,//鑱旂郴浜� conTel = txt_conPeople.Text,//鑱旂郴鐢佃瘽 - status = txt_status.SelectedIndex,//鐘舵�� + isStatus = txt_isStatus.SelectedIndex,//鐘舵�� factory = txt_factory.Text,//缁勭粐缂栧彿 }; try @@ -201,7 +201,7 @@ string strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json); ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); DataTable dt = dd.rtnData.list; - DataRow[] drGrp = dt.Select("upGuid=''"); + DataRow[] drGrp = dt.Select("upGuid='' or upguid is null"); DataTable dtComList = new DataTable(); dtComList.Columns.Add("guid", typeof(string)); dtComList.Columns.Add("name", typeof(string)); diff --git a/DevApp/Gs.DevApp/DevFrm/User/Role.Designer.cs b/DevApp/Gs.DevApp/DevFrm/User/Role.Designer.cs index a9e09d1..7d1024c 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/Role.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/Role.Designer.cs @@ -51,7 +51,7 @@ this.lbGuid = new System.Windows.Forms.Label(); this.labelControl9 = new DevExpress.XtraEditors.LabelControl(); this.labelControl5 = new DevExpress.XtraEditors.LabelControl(); - this.txt_status = new DevExpress.XtraEditors.ComboBoxEdit(); + this.txt_isStatus = new DevExpress.XtraEditors.ComboBoxEdit(); this.groupBox1 = new System.Windows.Forms.GroupBox(); this.trv = new System.Windows.Forms.TreeView(); ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit(); @@ -63,7 +63,7 @@ this.panel1.SuspendLayout(); ((System.ComponentModel.ISupportInitialize)(this.txt_roleName.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_rolRemark.Properties)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).BeginInit(); this.groupBox1.SuspendLayout(); this.SuspendLayout(); // @@ -148,7 +148,7 @@ // status // this.status.Caption = "鐘舵��"; - this.status.FieldName = "statusTxt"; + this.status.FieldName = "isStatusTxt"; this.status.MinWidth = 25; this.status.Name = "status"; this.status.OptionsColumn.AllowEdit = false; @@ -159,7 +159,7 @@ // createDate // this.createDate.Caption = "寤虹珛鏃堕棿"; - this.createDate.FieldName = "createDate"; + this.createDate.FieldName = "edtTime"; this.createDate.MinWidth = 25; this.createDate.Name = "createDate"; this.createDate.OptionsColumn.AllowEdit = false; @@ -199,7 +199,7 @@ this.panel1.Controls.Add(this.lbGuid); this.panel1.Controls.Add(this.labelControl9); this.panel1.Controls.Add(this.labelControl5); - this.panel1.Controls.Add(this.txt_status); + this.panel1.Controls.Add(this.txt_isStatus); this.panel1.Font = new System.Drawing.Font("Tahoma", 10F); this.panel1.Location = new System.Drawing.Point(62, 49); this.panel1.Name = "panel1"; @@ -299,22 +299,22 @@ this.labelControl5.TabIndex = 101; this.labelControl5.Text = "瑙掕壊鐘舵�侊細"; // - // txt_status + // txt_isStatus // - this.txt_status.Location = new System.Drawing.Point(123, 152); - this.txt_status.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.txt_status.Name = "txt_status"; - this.txt_status.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); - this.txt_status.Properties.Appearance.Options.UseFont = true; - this.txt_status.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + this.txt_isStatus.Location = new System.Drawing.Point(123, 152); + this.txt_isStatus.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txt_isStatus.Name = "txt_isStatus"; + this.txt_isStatus.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); + this.txt_isStatus.Properties.Appearance.Options.UseFont = true; + this.txt_isStatus.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); - this.txt_status.Properties.Items.AddRange(new object[] { + this.txt_isStatus.Properties.Items.AddRange(new object[] { "-璇烽�夋嫨-", "姝e父", "绂佺敤"}); - this.txt_status.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - this.txt_status.Size = new System.Drawing.Size(297, 28); - this.txt_status.TabIndex = 100; + this.txt_isStatus.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; + this.txt_isStatus.Size = new System.Drawing.Size(297, 28); + this.txt_isStatus.TabIndex = 100; // // groupBox1 // @@ -357,7 +357,7 @@ this.panel1.PerformLayout(); ((System.ComponentModel.ISupportInitialize)(this.txt_roleName.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_rolRemark.Properties)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).EndInit(); this.groupBox1.ResumeLayout(false); this.ResumeLayout(false); @@ -385,7 +385,7 @@ private System.Windows.Forms.Label lbGuid; private DevExpress.XtraEditors.LabelControl labelControl9; private DevExpress.XtraEditors.LabelControl labelControl5; - private DevExpress.XtraEditors.ComboBoxEdit txt_status; + private DevExpress.XtraEditors.ComboBoxEdit txt_isStatus; private DevExpress.XtraEditors.LabelControl labelControl1; private DevExpress.XtraGrid.Columns.GridColumn createDate; } diff --git a/DevApp/Gs.DevApp/DevFrm/User/Role.cs b/DevApp/Gs.DevApp/DevFrm/User/Role.cs index 72eddd5..81ffd27 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/Role.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/Role.cs @@ -177,10 +177,10 @@ txt_rolRemark.Focus(); return; } - if (txt_status.SelectedIndex <= 0) + if (txt_isStatus.SelectedIndex <= 0) { Gs.DevApp.ToolBox.MsgHelper.Warning("瑙掕壊鐘舵�佷笉鑳戒负绌猴紒"); - txt_status.Focus(); + txt_isStatus.Focus(); return; } var _obj = new @@ -188,7 +188,7 @@ guid = lbGuid.Text.Trim(), roleName = txt_roleName.Text.Trim(), rolRemark = txt_rolRemark.Text.Trim(), - status = txt_status.SelectedIndex,//鐘舵�� + isStatus = txt_isStatus.SelectedIndex,//鐘舵�� }; try { @@ -249,7 +249,7 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage, int pageSize) { - PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "createDate", "asc", "", ""); + PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "edtTime", "desc", "", ""); string json = JsonConvert.SerializeObject(pgq); try { diff --git a/DevApp/Gs.DevApp/DevFrm/User/SysMenu.Designer.cs b/DevApp/Gs.DevApp/DevFrm/User/SysMenu.Designer.cs index 84a5994..7f0b28e 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/SysMenu.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/SysMenu.Designer.cs @@ -54,7 +54,7 @@ this.treeListLookUpEdit1TreeList = new DevExpress.XtraTreeList.TreeList(); this.treeListColumn2 = new DevExpress.XtraTreeList.Columns.TreeListColumn(); this.labelControl7 = new DevExpress.XtraEditors.LabelControl(); - this.txt_status = new DevExpress.XtraEditors.ComboBoxEdit(); + this.txt_isStatus = new DevExpress.XtraEditors.ComboBoxEdit(); this.txt_idx = new System.Windows.Forms.NumericUpDown(); this.labelControl1 = new DevExpress.XtraEditors.LabelControl(); this.labelControl12 = new DevExpress.XtraEditors.LabelControl(); @@ -76,7 +76,7 @@ ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_upGuid.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_idx)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_formPath.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_category.Properties)).BeginInit(); @@ -90,7 +90,7 @@ this.toolBarMenu1.isSetBtn = false; this.toolBarMenu1.Location = new System.Drawing.Point(0, 0); this.toolBarMenu1.Name = "toolBarMenu1"; - this.toolBarMenu1.Size = new System.Drawing.Size(1075, 80); + this.toolBarMenu1.Size = new System.Drawing.Size(1107, 80); this.toolBarMenu1.TabIndex = 0; // // xtraTabControl1 @@ -99,7 +99,7 @@ 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(1075, 507); + this.xtraTabControl1.Size = new System.Drawing.Size(1107, 507); this.xtraTabControl1.TabIndex = 4; this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] { this.xtraTabPage1, @@ -109,7 +109,7 @@ // this.xtraTabPage1.Controls.Add(this.tlMenu); this.xtraTabPage1.Name = "xtraTabPage1"; - this.xtraTabPage1.Size = new System.Drawing.Size(1073, 475); + this.xtraTabPage1.Size = new System.Drawing.Size(1105, 475); this.xtraTabPage1.Text = "鏁版嵁鏌ヨ"; // // tlMenu @@ -132,7 +132,7 @@ this.tlMenu.MinWidth = 23; this.tlMenu.Name = "tlMenu"; this.tlMenu.OptionsBehavior.Editable = false; - this.tlMenu.Size = new System.Drawing.Size(1073, 475); + this.tlMenu.Size = new System.Drawing.Size(1105, 475); this.tlMenu.TabIndex = 3; this.tlMenu.TreeLevelWidth = 21; // @@ -188,7 +188,7 @@ // tlcParentMenuName // this.tlcParentMenuName.Caption = "鐘舵��"; - this.tlcParentMenuName.FieldName = "statusTxt"; + this.tlcParentMenuName.FieldName = "isStatusTxt"; this.tlcParentMenuName.MinWidth = 23; this.tlcParentMenuName.Name = "tlcParentMenuName"; this.tlcParentMenuName.Visible = true; @@ -210,7 +210,7 @@ this.xtraTabPage2.Controls.Add(this.panel1); this.xtraTabPage2.Name = "xtraTabPage2"; this.xtraTabPage2.PageEnabled = false; - this.xtraTabPage2.Size = new System.Drawing.Size(1073, 475); + this.xtraTabPage2.Size = new System.Drawing.Size(1105, 475); this.xtraTabPage2.Text = "鏁版嵁缂栬緫"; // // panel1 @@ -225,7 +225,7 @@ this.panel1.Controls.Add(this.labelControl8); this.panel1.Controls.Add(this.txt_upGuid); this.panel1.Controls.Add(this.labelControl7); - this.panel1.Controls.Add(this.txt_status); + this.panel1.Controls.Add(this.txt_isStatus); this.panel1.Controls.Add(this.txt_idx); this.panel1.Controls.Add(this.labelControl1); this.panel1.Controls.Add(this.labelControl12); @@ -261,6 +261,7 @@ this.txt_name.Properties.Appearance.Options.UseFont = true; this.txt_name.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); + this.txt_name.Properties.DropDownRows = 100; this.txt_name.Size = new System.Drawing.Size(297, 28); this.txt_name.TabIndex = 3; // @@ -355,22 +356,22 @@ this.labelControl7.TabIndex = 115; this.labelControl7.Text = "鑿滃崟鐘舵�侊細"; // - // txt_status + // txt_isStatus // - this.txt_status.Location = new System.Drawing.Point(111, 231); - this.txt_status.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.txt_status.Name = "txt_status"; - this.txt_status.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); - this.txt_status.Properties.Appearance.Options.UseFont = true; - this.txt_status.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + this.txt_isStatus.Location = new System.Drawing.Point(111, 231); + this.txt_isStatus.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txt_isStatus.Name = "txt_isStatus"; + this.txt_isStatus.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); + this.txt_isStatus.Properties.Appearance.Options.UseFont = true; + this.txt_isStatus.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); - this.txt_status.Properties.Items.AddRange(new object[] { + this.txt_isStatus.Properties.Items.AddRange(new object[] { "-璇烽�夋嫨-", "姝e父", "绂佺敤"}); - this.txt_status.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - this.txt_status.Size = new System.Drawing.Size(297, 28); - this.txt_status.TabIndex = 114; + this.txt_isStatus.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; + this.txt_isStatus.Size = new System.Drawing.Size(297, 28); + this.txt_isStatus.TabIndex = 114; // // txt_idx // @@ -515,7 +516,7 @@ // this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; - this.ClientSize = new System.Drawing.Size(1075, 587); + this.ClientSize = new System.Drawing.Size(1107, 587); this.Controls.Add(this.xtraTabControl1); this.Controls.Add(this.toolBarMenu1); this.Name = "SysMenu"; @@ -530,7 +531,7 @@ ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_upGuid.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.treeListLookUpEdit1TreeList)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_status.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_idx)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_formPath.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_category.Properties)).EndInit(); @@ -563,7 +564,7 @@ private DevExpress.XtraTreeList.TreeList treeListLookUpEdit1TreeList; private DevExpress.XtraTreeList.Columns.TreeListColumn treeListColumn2; private DevExpress.XtraEditors.LabelControl labelControl7; - private DevExpress.XtraEditors.ComboBoxEdit txt_status; + private DevExpress.XtraEditors.ComboBoxEdit txt_isStatus; private System.Windows.Forms.NumericUpDown txt_idx; private DevExpress.XtraEditors.LabelControl labelControl1; private DevExpress.XtraEditors.LabelControl labelControl12; diff --git a/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs b/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs index 7696f4c..c6c5a7a 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/SysMenu.cs @@ -166,17 +166,17 @@ txt_name.Focus(); return; } - if (string.IsNullOrEmpty(txt_status.Text.Trim()) || txt_status.SelectedIndex == 0) + if (string.IsNullOrEmpty(txt_isStatus.Text.Trim()) || txt_isStatus.SelectedIndex == 0) { Gs.DevApp.ToolBox.MsgHelper.Warning("鑿滃崟鐘舵�佷笉鑳戒负绌猴紒"); - txt_status.Focus(); + txt_isStatus.Focus(); return; } string _upGuid = txt_upGuid.EditValue.ToString(); if (txt_category.SelectedIndex == 2 && string.IsNullOrEmpty(_upGuid)) { Gs.DevApp.ToolBox.MsgHelper.Warning("鎸夐挳绫诲瀷蹇呴』閫夋嫨鐖剁骇鑿滃崟锛�"); - txt_status.Focus(); + txt_isStatus.Focus(); return; } var _obj = new @@ -185,7 +185,7 @@ upGuid = _upGuid,//涓婄骇鐨勪富寤� name = txt_name.Text.Trim(),//鍚嶇О icon = txt_icon.Text,//鑿滃崟鍥炬爣 - status = txt_status.SelectedIndex,//鐘舵�� + isStatus = txt_isStatus.SelectedIndex,//鐘舵�� formPath = txt_formPath.Text.Trim(),//绐椾綋璺緞 idx = int.Parse(txt_idx.Value.ToString()),//鎺掑簭 category = txt_category.SelectedIndex,//绫诲瀷 diff --git a/DevApp/Gs.DevApp/DevFrm/User/User.Designer.cs b/DevApp/Gs.DevApp/DevFrm/User/User.Designer.cs index 2b11f21..d0e8b20 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/User.Designer.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/User.Designer.cs @@ -30,11 +30,14 @@ private void InitializeComponent() { System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(User)); + DevExpress.XtraGrid.GridFormatRule gridFormatRule1 = new DevExpress.XtraGrid.GridFormatRule(); + DevExpress.XtraEditors.FormatConditionRuleExpression formatConditionRuleExpression1 = new DevExpress.XtraEditors.FormatConditionRuleExpression(); 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(); + this.isLocked = new DevExpress.XtraGrid.Columns.GridColumn(); this.toolBarMenu1 = new Gs.DevApp.UserControl.ToolBarMenu(); this.gcMain = new DevExpress.XtraGrid.GridControl(); this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); @@ -44,7 +47,6 @@ this.email = new DevExpress.XtraGrid.Columns.GridColumn(); this.createTime = new DevExpress.XtraGrid.Columns.GridColumn(); this.lastLoginTime = new DevExpress.XtraGrid.Columns.GridColumn(); - this.isLocked = new DevExpress.XtraGrid.Columns.GridColumn(); this.loginCounter = new DevExpress.XtraGrid.Columns.GridColumn(); this.colRole = new DevExpress.XtraGrid.Columns.GridColumn(); this.repositoryItemButtonEdit1 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit(); @@ -69,7 +71,7 @@ this.labelControl9 = new DevExpress.XtraEditors.LabelControl(); this.labelControl6 = new DevExpress.XtraEditors.LabelControl(); this.labelControl5 = new DevExpress.XtraEditors.LabelControl(); - this.txt_isLocked = new DevExpress.XtraEditors.ComboBoxEdit(); + this.txt_isStatus = new DevExpress.XtraEditors.ComboBoxEdit(); this.txt_password = new DevExpress.XtraEditors.TextEdit(); this.lbPwd = new DevExpress.XtraEditors.LabelControl(); this.txt_userName = new DevExpress.XtraEditors.TextEdit(); @@ -87,10 +89,23 @@ ((System.ComponentModel.ISupportInitialize)(this.txt_address.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_tel.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_email.Properties)).BeginInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_isLocked.Properties)).BeginInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_password.Properties)).BeginInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_userName.Properties)).BeginInit(); this.SuspendLayout(); + // + // isLocked + // + this.isLocked.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); + this.isLocked.AppearanceCell.Options.UseFont = true; + this.isLocked.Caption = "鐘舵��"; + this.isLocked.FieldName = "isStatusTxt"; + this.isLocked.MinWidth = 25; + this.isLocked.Name = "isLocked"; + this.isLocked.OptionsColumn.AllowEdit = false; + this.isLocked.Visible = true; + this.isLocked.VisibleIndex = 6; + this.isLocked.Width = 94; // // toolBarMenu1 // @@ -130,6 +145,14 @@ this.isLocked, this.loginCounter, this.colRole}); + gridFormatRule1.Column = this.isLocked; + gridFormatRule1.Name = "Format0"; + formatConditionRuleExpression1.Appearance.ForeColor = System.Drawing.Color.Red; + formatConditionRuleExpression1.Appearance.Options.UseForeColor = true; + formatConditionRuleExpression1.Expression = "[isStatusTxt] = [绂佺敤]"; + formatConditionRuleExpression1.PredefinedName = "Red Text"; + gridFormatRule1.Rule = formatConditionRuleExpression1; + this.gridView1.FormatRules.Add(gridFormatRule1); this.gridView1.GridControl = this.gcMain; this.gridView1.Name = "gridView1"; this.gridView1.OptionsFind.ShowSearchNavButtons = false; @@ -192,8 +215,8 @@ // this.createTime.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); this.createTime.AppearanceCell.Options.UseFont = true; - this.createTime.Caption = "寤虹珛鏃堕棿"; - this.createTime.FieldName = "createTime"; + this.createTime.Caption = "鏈�鍚庣紪杈戞椂闂�"; + this.createTime.FieldName = "edtTime"; this.createTime.MinWidth = 25; this.createTime.Name = "createTime"; this.createTime.OptionsColumn.AllowEdit = false; @@ -213,19 +236,6 @@ this.lastLoginTime.Visible = true; this.lastLoginTime.VisibleIndex = 5; this.lastLoginTime.Width = 94; - // - // isLocked - // - this.isLocked.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); - this.isLocked.AppearanceCell.Options.UseFont = true; - this.isLocked.Caption = "鐘舵��"; - this.isLocked.FieldName = "isLockedTxt"; - this.isLocked.MinWidth = 25; - this.isLocked.Name = "isLocked"; - this.isLocked.OptionsColumn.AllowEdit = false; - this.isLocked.Visible = true; - this.isLocked.VisibleIndex = 6; - this.isLocked.Width = 94; // // loginCounter // @@ -326,7 +336,7 @@ this.panel1.Controls.Add(this.labelControl9); this.panel1.Controls.Add(this.labelControl6); this.panel1.Controls.Add(this.labelControl5); - this.panel1.Controls.Add(this.txt_isLocked); + this.panel1.Controls.Add(this.txt_isStatus); this.panel1.Controls.Add(this.txt_password); this.panel1.Controls.Add(this.lbPwd); this.panel1.Controls.Add(this.txt_userName); @@ -504,23 +514,23 @@ this.labelControl5.TabIndex = 101; this.labelControl5.Text = "閿佸畾鐘舵�侊細"; // - // txt_isLocked + // txt_isStatus // - this.txt_isLocked.EditValue = "-璇烽�夋嫨-"; - this.txt_isLocked.Location = new System.Drawing.Point(125, 336); - this.txt_isLocked.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); - this.txt_isLocked.Name = "txt_isLocked"; - this.txt_isLocked.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); - this.txt_isLocked.Properties.Appearance.Options.UseFont = true; - this.txt_isLocked.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { + this.txt_isStatus.EditValue = "-璇烽�夋嫨-"; + this.txt_isStatus.Location = new System.Drawing.Point(125, 336); + this.txt_isStatus.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); + this.txt_isStatus.Name = "txt_isStatus"; + this.txt_isStatus.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); + this.txt_isStatus.Properties.Appearance.Options.UseFont = true; + this.txt_isStatus.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}); - this.txt_isLocked.Properties.Items.AddRange(new object[] { + this.txt_isStatus.Properties.Items.AddRange(new object[] { "-璇烽�夋嫨-", "姝e父", "閿佸畾"}); - this.txt_isLocked.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; - this.txt_isLocked.Size = new System.Drawing.Size(297, 28); - this.txt_isLocked.TabIndex = 100; + this.txt_isStatus.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; + this.txt_isStatus.Size = new System.Drawing.Size(297, 28); + this.txt_isStatus.TabIndex = 100; // // txt_password // @@ -587,7 +597,7 @@ ((System.ComponentModel.ISupportInitialize)(this.txt_address.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_tel.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_email.Properties)).EndInit(); - ((System.ComponentModel.ISupportInitialize)(this.txt_isLocked.Properties)).EndInit(); + ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_password.Properties)).EndInit(); ((System.ComponentModel.ISupportInitialize)(this.txt_userName.Properties)).EndInit(); this.ResumeLayout(false); @@ -627,7 +637,7 @@ private DevExpress.XtraEditors.LabelControl labelControl9; private DevExpress.XtraEditors.LabelControl labelControl6; private DevExpress.XtraEditors.LabelControl labelControl5; - private DevExpress.XtraEditors.ComboBoxEdit txt_isLocked; + private DevExpress.XtraEditors.ComboBoxEdit txt_isStatus; private DevExpress.XtraEditors.TextEdit txt_password; private DevExpress.XtraEditors.LabelControl lbPwd; private DevExpress.XtraEditors.TextEdit txt_userName; diff --git a/DevApp/Gs.DevApp/DevFrm/User/User.cs b/DevApp/Gs.DevApp/DevFrm/User/User.cs index 75a4ae6..aab6cec 100644 --- a/DevApp/Gs.DevApp/DevFrm/User/User.cs +++ b/DevApp/Gs.DevApp/DevFrm/User/User.cs @@ -32,7 +32,7 @@ private void ToolBarMenu1_btnReportClick(object sender, EventArgs e) { - Rpt.RptUser frm = new Rpt.RptUser(); + Rpt.RptPreview frm = new Rpt.RptPreview("001"); frm.Show(); } @@ -190,10 +190,10 @@ txt_userName.Focus(); return; } - if (txt_isLocked.SelectedIndex <= 0) + if (txt_isStatus.SelectedIndex <= 0) { Gs.DevApp.ToolBox.MsgHelper.Warning("鐘舵�佷笉鑳戒负绌猴紒"); - txt_isLocked.Focus(); + txt_isStatus.Focus(); return; } var _obj = new @@ -205,7 +205,7 @@ address = txt_address.Text.Trim(), tel = txt_tel.Text.Trim(), email = txt_email.Text.Trim(), - isLocked = txt_isLocked.SelectedIndex, + isStatus = txt_isStatus.SelectedIndex, flagAdmin = 0, flagOnline = 0, loginCounter = 0, @@ -239,7 +239,7 @@ /// <param name="pageSize">姣忛〉鍑犳潯</param> private void getPageList(int curPage, int pageSize) { - PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "createTime", "asc", "", ""); + PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "edtTime", "asc", "", ""); string json = JsonConvert.SerializeObject(pgq); try { -- Gitblit v1.9.3