| | |
| | | /// </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 |
| | |
| | | }; |
| | | 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) |
| | |
| | | /// <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 |
| | | { |
| | |
| | | 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"); |
| | |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | string _FieldName = "";//字段名 |
| | | string _FieldText = "";// |
| | | string _FieldText = "";//字段文本 |
| | | string _prefix = "txt_"; |
| | | string _Lbfix = "lb_"; |
| | | string _gvFix = "gv_"; |
| | |
| | | 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; |
| | | } |
| | |
| | | + "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 |
| | |
| | | + "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 |
| | |
| | | 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(); |
| | |
| | | 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(); |
| | |
| | | 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); |
| | |
| | | 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[] { |
| | | "-请选择-", |
| | | "正常", |
| | | "禁用"}); |
| | | 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 |
| | | // |
| | |
| | | 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(); |
| | |
| | | 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; |
| | |
| | | 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() : ""; |
| | |
| | | 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 |
| | |
| | | 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)); |
| | |
| | | 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(); |
| | |
| | | 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(); |
| | | // |
| | |
| | | // 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; |
| | |
| | | // 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; |
| | |
| | | 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"; |
| | |
| | | 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[] { |
| | | "-请选择-", |
| | | "正常", |
| | | "禁用"}); |
| | | 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 |
| | | // |
| | |
| | | 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); |
| | | |
| | |
| | | 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; |
| | | } |
| | |
| | | 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 |
| | |
| | | guid = lbGuid.Text.Trim(), |
| | | roleName = txt_roleName.Text.Trim(), |
| | | rolRemark = txt_rolRemark.Text.Trim(), |
| | | status = txt_status.SelectedIndex,//状态 |
| | | isStatus = txt_isStatus.SelectedIndex,//状态 |
| | | }; |
| | | try |
| | | { |
| | |
| | | /// <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 |
| | | { |
| | |
| | | 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(); |
| | |
| | | ((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(); |
| | |
| | | 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 |
| | |
| | | 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, |
| | |
| | | // |
| | | 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 |
| | |
| | | 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; |
| | | // |
| | |
| | | // tlcParentMenuName |
| | | // |
| | | this.tlcParentMenuName.Caption = "状态"; |
| | | this.tlcParentMenuName.FieldName = "statusTxt"; |
| | | this.tlcParentMenuName.FieldName = "isStatusTxt"; |
| | | this.tlcParentMenuName.MinWidth = 23; |
| | | this.tlcParentMenuName.Name = "tlcParentMenuName"; |
| | | this.tlcParentMenuName.Visible = true; |
| | |
| | | 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 |
| | |
| | | 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); |
| | |
| | | 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; |
| | | // |
| | |
| | | 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[] { |
| | | "-请选择-", |
| | | "正常", |
| | | "禁用"}); |
| | | 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 |
| | | // |
| | |
| | | // |
| | | 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"; |
| | |
| | | ((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(); |
| | |
| | | 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; |
| | |
| | | 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 |
| | |
| | | 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,//类型 |
| | |
| | | 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(); |
| | |
| | | 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(); |
| | |
| | | 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(); |
| | |
| | | ((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 |
| | | // |
| | |
| | | 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; |
| | |
| | | // |
| | | 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; |
| | |
| | | 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 |
| | | // |
| | |
| | | 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); |
| | |
| | | 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[] { |
| | | "-请选择-", |
| | | "正常", |
| | | "锁定"}); |
| | | 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 |
| | | // |
| | |
| | | ((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); |
| | |
| | | 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; |
| | |
| | | |
| | | private void ToolBarMenu1_btnReportClick(object sender, EventArgs e) |
| | | { |
| | | Rpt.RptUser frm = new Rpt.RptUser(); |
| | | Rpt.RptPreview frm = new Rpt.RptPreview("001"); |
| | | frm.Show(); |
| | | } |
| | | |
| | |
| | | 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 |
| | |
| | | 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, |
| | |
| | | /// <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 |
| | | { |