| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "Customer/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Customer/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "DepartMent/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "DepartMent/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "Dictionary/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Dictionary/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | this.toolBarMenu1 = new Gs.DevApp.UserControl.ToolBarMenu(); |
| | | this.gcMain = new DevExpress.XtraGrid.GridControl(); |
| | | this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView(); |
| | | this.weekdayName = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl(); |
| | | this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage(); |
| | | this.pageBar1 = new UserControls.Data.PageBar(); |
| | |
| | | this.txt_time1 = new System.Windows.Forms.DateTimePicker(); |
| | | this.labelControl11 = new DevExpress.XtraEditors.LabelControl(); |
| | | this.lbGuid = new System.Windows.Forms.Label(); |
| | | this.weekdayName = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit(); |
| | |
| | | this.gv_time2.Name = "gv_time2"; |
| | | this.gv_time2.OptionsColumn.AllowEdit = false; |
| | | this.gv_time2.Visible = true; |
| | | this.gv_time2.VisibleIndex = 3; |
| | | this.gv_time2.VisibleIndex = 2; |
| | | this.gv_time2.Width = 94; |
| | | // |
| | | // lb_time1 |
| | |
| | | this.gv_time1.Name = "gv_time1"; |
| | | this.gv_time1.OptionsColumn.AllowEdit = false; |
| | | this.gv_time1.Visible = true; |
| | | this.gv_time1.VisibleIndex = 2; |
| | | this.gv_time1.VisibleIndex = 1; |
| | | this.gv_time1.Width = 94; |
| | | // |
| | | // lb_name |
| | |
| | | this.gv_name.Name = "gv_name"; |
| | | this.gv_name.OptionsColumn.AllowEdit = false; |
| | | this.gv_name.Visible = true; |
| | | this.gv_name.VisibleIndex = 1; |
| | | this.gv_name.VisibleIndex = 0; |
| | | this.gv_name.Width = 94; |
| | | // |
| | | // toolBarMenu1 |
| | |
| | | this.gridView1.OptionsFind.ShowSearchNavButtons = false; |
| | | this.gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | this.gridView1.OptionsView.ShowGroupPanel = false; |
| | | // |
| | | // weekdayName |
| | | // |
| | | this.weekdayName.Caption = "ææ"; |
| | | this.weekdayName.FieldName = "weekdayName"; |
| | | this.weekdayName.MinWidth = 25; |
| | | this.weekdayName.Name = "weekdayName"; |
| | | this.weekdayName.Visible = true; |
| | | this.weekdayName.VisibleIndex = 3; |
| | | this.weekdayName.Width = 94; |
| | | // |
| | | // xtraTabControl1 |
| | | // |
| | |
| | | // |
| | | // txt_time2 |
| | | // |
| | | this.txt_time2.CustomFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | this.txt_time2.CustomFormat = "yyyy-MM-dd"; |
| | | this.txt_time2.Format = System.Windows.Forms.DateTimePickerFormat.Custom; |
| | | this.txt_time2.Location = new System.Drawing.Point(136, 131); |
| | | this.txt_time2.MinDate = new System.DateTime(2024, 10, 1, 0, 0, 0, 0); |
| | |
| | | // |
| | | // txt_time1 |
| | | // |
| | | this.txt_time1.CustomFormat = "yyyy-MM-dd HH:mm:ss"; |
| | | this.txt_time1.CustomFormat = "yyyy-MM-dd"; |
| | | this.txt_time1.Format = System.Windows.Forms.DateTimePickerFormat.Custom; |
| | | this.txt_time1.Location = new System.Drawing.Point(136, 74); |
| | | this.txt_time1.MinDate = new System.DateTime(2024, 10, 1, 0, 0, 0, 0); |
| | |
| | | this.lbGuid.Name = "lbGuid"; |
| | | this.lbGuid.Size = new System.Drawing.Size(0, 21); |
| | | this.lbGuid.TabIndex = 1; |
| | | // |
| | | // weekdayName |
| | | // |
| | | this.weekdayName.Caption = "ææ"; |
| | | this.weekdayName.FieldName = "weekdayName"; |
| | | this.weekdayName.MinWidth = 25; |
| | | this.weekdayName.Name = "weekdayName"; |
| | | this.weekdayName.Visible = true; |
| | | this.weekdayName.VisibleIndex = 3; |
| | | this.weekdayName.Width = 94; |
| | | // |
| | | // FrmHolidy |
| | | // |
| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Base; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm.BasicData |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | } |
| | | /// <summary> |
| | | /// å é¤äºä»¶ |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_name, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + dr["name"].ToString() + "ãï¼ç¡®å®å é¤åï¼")) |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + rowName + "ãï¼ç¡®å®å é¤åï¼")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | guidList = dr["guid"].ToString(),//主建 |
| | | guidList = rowGuid,//主建 |
| | | }; |
| | | string strJson = ""; |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "Holiday/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_name, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | getModel(dr["guid"].ToString(), true, 1); |
| | | getModel(rowGuid, true, 1); |
| | | } |
| | | /// <summary> |
| | | /// æ°å¢äºä»¶ |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 1); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | UtilityHelper.CleanValue(this.panel1.Controls, true); |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true); |
| | | } |
| | | /// <summary> |
| | | /// ä¿åäºä»¶ |
| | |
| | | txt_name.Focus(); |
| | | return; |
| | | } |
| | | if (txt_time1.Value>=txt_time2.Value) |
| | | if (txt_time1.Value.Date > txt_time2.Value.Date) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("å¼å§æ¶é´ä¸è½å¤§äºç»ææ¶é´ï¼"); |
| | | txt_time1.Focus(); |
| | |
| | | { |
| | | guid = lbGuid.Text.Trim(),//主建 |
| | | name = txt_name.Text.Trim(), |
| | | time1=txt_time1.Value, |
| | | time2 = txt_time2.Value, |
| | | time1 = txt_time1.Value.Date, |
| | | time2 = txt_time2.Value.Date, |
| | | }; |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Holiday/EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnable(this.panel1.Controls, false); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "Holiday/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Holiday/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "Dictionary/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Dictionary/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "Dictionary/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Dictionary/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | } |
| | | /// <summary> |
| | | /// å é¤äºä»¶ |
| | |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "User/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 1); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | UtilityHelper.CleanValue(this.panel1.Controls, true); |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true); |
| | | } |
| | | /// <summary> |
| | | /// ä¿åäºä»¶ |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "User/EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnable(this.panel1.Controls, false); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "Staff/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Staff/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "Supplier/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Supplier/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | try |
| | | { |
| | | strReturn = UtilityHelper.HttpPost("", "Organization/GetListPage", json); |
| | | ReturnModel<PageListModel> rtn = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> rtn = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = rtn.rtnData.list; |
| | | comOrg.DataSource = dt; |
| | | comOrg.DisplayMember = "name"; |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "User/UserLogin", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | JObject _login = _rtn.rtnData; |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | |
| | | this.Text = System.Configuration.ConfigurationSettings.AppSettings.Get("ProductName").ToString(); |
| | | tab.CloseButtonClick += Tab_CloseButtonClick; |
| | | tooLoading.Click += TooLoading_Click; |
| | | getTree(); |
| | | barPwd.ItemClick += BarPwd_ItemClick; |
| | | barExit.ItemClick += BarExit_ItemClick; |
| | | this.FormClosing += FrmMain_FormClosing; |
| | | getTree(); |
| | | } |
| | | |
| | | private void FrmMain_FormClosing(object sender, FormClosingEventArgs e) |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "User/UserOut", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | return _rtn.rtnCode; |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnData.outMsg); |
| | |
| | | this.gv_flagIncludeDocCode.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.gv_flagIncludeDocCode.AppearanceCell.Options.UseFont = true; |
| | | this.gv_flagIncludeDocCode.Caption = "å
å«åæ®ç±»å"; |
| | | this.gv_flagIncludeDocCode.FieldName = "flagIncludeDocCode"; |
| | | this.gv_flagIncludeDocCode.FieldName = "flagIncludeDocCodeTxt"; |
| | | this.gv_flagIncludeDocCode.MinWidth = 25; |
| | | this.gv_flagIncludeDocCode.Name = "gv_flagIncludeDocCode"; |
| | | this.gv_flagIncludeDocCode.OptionsColumn.AllowEdit = false; |
| | |
| | | this.gv_flagSpilitNo.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.gv_flagSpilitNo.AppearanceCell.Options.UseFont = true; |
| | | this.gv_flagSpilitNo.Caption = "åºå·ååé符"; |
| | | this.gv_flagSpilitNo.FieldName = "flagSpilitNo"; |
| | | this.gv_flagSpilitNo.FieldName = "flagSpilitNoTxt"; |
| | | this.gv_flagSpilitNo.MinWidth = 25; |
| | | this.gv_flagSpilitNo.Name = "gv_flagSpilitNo"; |
| | | this.gv_flagSpilitNo.OptionsColumn.AllowEdit = false; |
| | |
| | | this.gv_resetZero.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.gv_resetZero.AppearanceCell.Options.UseFont = true; |
| | | this.gv_resetZero.Caption = "æ¯å¤©å½é¶"; |
| | | this.gv_resetZero.FieldName = "resetZero"; |
| | | this.gv_resetZero.FieldName = "resetZeroTxt"; |
| | | this.gv_resetZero.MinWidth = 25; |
| | | this.gv_resetZero.Name = "gv_resetZero"; |
| | | this.gv_resetZero.OptionsColumn.AllowEdit = false; |
| | |
| | | // |
| | | // toolBarMenu1 |
| | | // |
| | | |
| | | this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top; |
| | | this.toolBarMenu1.isSetBtn = false; |
| | | this.toolBarMenu1.Location = new System.Drawing.Point(0, 0); |
| | |
| | | public DocNoRule() |
| | | { |
| | | InitializeComponent(); |
| | | txt_docCode.Properties.TextEditStyle = TextEditStyles.DisableTextEditor; |
| | | this.toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick; |
| | | this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick; |
| | | this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick; |
| | |
| | | { |
| | | string rowGuid = (row["guid"].ToString()); |
| | | getModel(rowGuid, false, 999); |
| | | txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled = txxtItem4.Enabled = false; |
| | | } |
| | | } |
| | | } |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | } |
| | | /// <summary> |
| | | /// å é¤äºä»¶ |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_docCode, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + dr["docCode"].ToString() + "ãï¼ç¡®å®å é¤åï¼")) |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + rowName + "ãï¼ç¡®å®å é¤åï¼")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | guidList = dr["guid"].ToString(),//主建 |
| | | guidList = rowGuid,//主建 |
| | | }; |
| | | string strJson = ""; |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "DocNoRule/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | string strJson = UtilityHelper.HttpPost("", "DocNoRule/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_docCode, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled = txxtItem4.Enabled = false; |
| | | getModel(dr["guid"].ToString(), true, 1); |
| | | txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled = txxtItem4.Enabled = true; |
| | | getModel(rowGuid, true, 1); |
| | | txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled = txxtItem4.Enabled= panelControl1.Enabled = true; |
| | | } |
| | | /// <summary> |
| | | /// æ°å¢äºä»¶ |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 1); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | UtilityHelper.CleanValue(this.panel1.Controls, true); |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true); |
| | | txxtItem1.SelectedIndex = txxtItem2.SelectedIndex = txxtItem3.SelectedIndex = txxtItem4.SelectedIndex = 0; |
| | | |
| | | txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled = txxtItem4.Enabled= panelControl1.Enabled = true; |
| | | } |
| | | /// <summary> |
| | | /// ä¿åäºä»¶ |
| | |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©åæ®ç±»åï¼"); |
| | | txt_docCode.Focus(); |
| | | return; |
| | | } |
| | | if ((txxtItem1.SelectedIndex+ txxtItem2.SelectedIndex+ txxtItem3.SelectedIndex+ txxtItem4.SelectedIndex)<=0) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请è³å°éæ©ä¸ä¸ªåæ°ï¼"); |
| | | txxtItem1.Focus(); |
| | | return; |
| | | } |
| | | if (txt_ruleFormat.Text.Length <= 0) |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "DocNoRule/EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnable(this.panel1.Controls, false); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "DocNoRule/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "DocNoRule/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | | lbGuid.Text = strGuid; |
| | | UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit); |
| | | txt_docCode.EditValue = dy.docCode.ToString(); |
| | | txxtItem1.Enabled = txxtItem2.Enabled = txxtItem3.Enabled = txxtItem4.Enabled = false; |
| | | |
| | | string _rule = dy.ruleFormat.ToString(); |
| | | string[] _ary = _rule.Split(new char[] { '<' }, StringSplitOptions.RemoveEmptyEntries); |
| | | if (_ary.Length > 0) |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Report/GetTemplate", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Report/EdtTemplate", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnData.outMsg); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "SysLog/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | |
| | | namespace Gs.DevApp.DevFrm.User |
| | | { |
| | | //https://www.cnblogs.com/mkmkbj/p/16771297.html |
| | | //https://blog.csdn.net/m0_54035969/article/details/140716675 |
| | | public partial class Role : DevExpress.XtraEditors.XtraForm |
| | | { |
| | | System.Text.StringBuilder actionLst = new System.Text.StringBuilder(); |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | } |
| | | /// <summary> |
| | | /// å é¤äºä»¶ |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_roleName, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + dr["roleName"].ToString() + "ãï¼ç¡®å®å é¤åï¼\n该æä½å°ä¼æ¸
空ç¸åºçç¨æ·æé")) |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + rowName + "ãï¼ç¡®å®å é¤åï¼\n该æä½å°ä¼æ¸
空ç¸åºçç¨æ·æé")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | guid = dr["guid"].ToString(),//主建 |
| | | guid = rowGuid,//主建 |
| | | }; |
| | | string strJson = ""; |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "Role/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | string strJson = UtilityHelper.HttpPost("", "Role/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_roleName, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | getModel(dr["guid"].ToString(), true, 1); |
| | | |
| | | getModel(rowGuid, true, 1); |
| | | } |
| | | /// <summary> |
| | | /// æ°å¢äºä»¶ |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 1); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | UtilityHelper.CleanValue(this.panel1.Controls, true); |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true); |
| | | } |
| | | /// <summary> |
| | | /// ä¿åäºä»¶ |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Role/EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnable(this.panel1.Controls, false); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnRoleClick(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_roleName, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + dr["roleName"].ToString() + "ãï¼ç¡®å®è®¾ç½®æéåï¼")) |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + rowName + "ãï¼ç¡®å®è®¾ç½®æéåï¼")) |
| | | return; |
| | | actionLst = new System.Text.StringBuilder(); |
| | | TraverseTreeViewNodes(trv.Nodes); |
| | | var _obj = new |
| | | { |
| | | roleGuid = dr["guid"].ToString(), |
| | | roleGuid = rowGuid, |
| | | actionLst = actionLst.ToString(), |
| | | }; |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "MenuAction/SetMenuActionByRole", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | string strJson = UtilityHelper.HttpPost("", "Role/SetRoleMenuAction", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnData.outMsg); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "Role/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "Role/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | { |
| | | roleGuid = roleGuid,//主建 |
| | | }; |
| | | string strReturn = ""; |
| | | try |
| | | { |
| | | strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListByRole", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | string strReturn = UtilityHelper.HttpPost("", "Role/GetListByRole", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | DataRow[] drGrp = dt.Select("upGuid='' or upGuid is null"); |
| | | foreach (DataRow _dy in drGrp) |
| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Base; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | | using System; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm.User |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_userName, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + dr["userName"].ToString() + "ãï¼ç¡®å®å é¤åï¼")) |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + rowName + "ãï¼ç¡®å®å é¤åï¼")) |
| | | return; |
| | | var _obj = new |
| | | { |
| | | guidList = dr["guid"].ToString(),//主建 |
| | | guidList = rowGuid,//主建 |
| | | }; |
| | | string strJson = ""; |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "User/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | string strJson = UtilityHelper.HttpPost("", "User/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_userName, gridView1); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | getModel(dr["guid"].ToString(), true, 1); |
| | | getModel(rowGuid, true, 1); |
| | | } |
| | | /// <summary> |
| | | /// æ°å¢äºä»¶ |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 1); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | UtilityHelper.CleanValue(this.panel1.Controls, true); |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true); |
| | | txt_password.Visible = lbPwd.Visible = true; |
| | | } |
| | | /// <summary> |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "User/EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | lbGuid.Text = _rtn.rtnData; |
| | | toolBarMenu1.isSetBtn = true; |
| | | UtilityHelper.ChangeEnable(this.panel1.Controls, false); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "User/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain.DataSource = dt; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "User/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | string strJson = ""; |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "MenuAction/SetRoleByUser", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | strJson = UtilityHelper.HttpPost("", "Role/SetUserRole", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnData.outMsg); |
| | | this.Close(); |
| | | } |
| | |
| | | string strReturn = ""; |
| | | try |
| | | { |
| | | strReturn = UtilityHelper.HttpPost("", "MenuAction/GetRoleByUser", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<DataTable> dd = UtilityHelper.GetNoPageTableByJson(strReturn); |
| | | strReturn = UtilityHelper.HttpPost("", "Role/GetUserRole", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<DataTable> dd = UtilityHelper.ReturnToList(strReturn); |
| | | DataTable dt = dd.rtnData; |
| | | this.ckList.DataSource = dt; |
| | | this.ckList.ValueMember = "guid"; |
| | |
| | | string strReturn = ""; |
| | | try |
| | | { |
| | | strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListByUser", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | strReturn = UtilityHelper.HttpPost("", "Role/GetUserMenuAction", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | DataRow[] drGrp = dt.Select("upGuid='' or upGuid is null"); |
| | | foreach (DataRow _dy in drGrp) |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "User/SetUserPass", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnData.outMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | |
| | | this.groupBox1 = new System.Windows.Forms.GroupBox(); |
| | | this.gridControl1 = new DevExpress.XtraGrid.GridControl(); |
| | | this.gvMx1 = new DevExpress.XtraGrid.Views.Grid.GridView(); |
| | | this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.colSectionCode = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.colSectionName = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.colRemark = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gridColumn6 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.colIsStatus = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.colGuid = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.panel1 = new System.Windows.Forms.Panel(); |
| | | this.txt_itemNo = new DevExpress.XtraEditors.TextEdit(); |
| | | this.lb_itemNo = new DevExpress.XtraEditors.LabelControl(); |
| | |
| | | // |
| | | // tlcMenuName |
| | | // |
| | | this.tlcMenuName.Caption = "ä»åºåç§°"; |
| | | this.tlcMenuName.Caption = "ä»åº(åºä½)åç§°"; |
| | | this.tlcMenuName.FieldName = "name"; |
| | | this.tlcMenuName.MinWidth = 38; |
| | | this.tlcMenuName.Name = "tlcMenuName"; |
| | |
| | | // |
| | | // tlcMenuCaption |
| | | // |
| | | this.tlcMenuCaption.Caption = "ä»åºç¼å·"; |
| | | this.tlcMenuCaption.Caption = "ä»åº(åºä½)ç¼å·"; |
| | | this.tlcMenuCaption.FieldName = "itemNo"; |
| | | this.tlcMenuCaption.MinWidth = 23; |
| | | this.tlcMenuCaption.Name = "tlcMenuCaption"; |
| | |
| | | // |
| | | this.groupBox1.Controls.Add(this.gridControl1); |
| | | this.groupBox1.Dock = System.Windows.Forms.DockStyle.Fill; |
| | | this.groupBox1.Location = new System.Drawing.Point(0, 166); |
| | | this.groupBox1.Location = new System.Drawing.Point(0, 160); |
| | | this.groupBox1.Name = "groupBox1"; |
| | | this.groupBox1.Size = new System.Drawing.Size(1126, 429); |
| | | this.groupBox1.Size = new System.Drawing.Size(1126, 435); |
| | | this.groupBox1.TabIndex = 235; |
| | | this.groupBox1.TabStop = false; |
| | | this.groupBox1.Text = "ä»ä½ä¿¡æ¯"; |
| | |
| | | this.gridControl1.Location = new System.Drawing.Point(3, 22); |
| | | this.gridControl1.MainView = this.gvMx1; |
| | | this.gridControl1.Name = "gridControl1"; |
| | | this.gridControl1.Size = new System.Drawing.Size(1120, 404); |
| | | this.gridControl1.Size = new System.Drawing.Size(1120, 410); |
| | | this.gridControl1.TabIndex = 2; |
| | | this.gridControl1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] { |
| | | this.gvMx1}); |
| | |
| | | // gvMx1 |
| | | // |
| | | this.gvMx1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] { |
| | | this.gridColumn1, |
| | | this.gridColumn2, |
| | | this.gridColumn3, |
| | | this.colSectionCode, |
| | | this.colSectionName, |
| | | this.colRemark, |
| | | this.gridColumn4, |
| | | this.gridColumn5, |
| | | this.gridColumn6}); |
| | | this.colIsStatus, |
| | | this.colGuid}); |
| | | this.gvMx1.GridControl = this.gridControl1; |
| | | this.gvMx1.Name = "gvMx1"; |
| | | this.gvMx1.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.True; |
| | |
| | | this.gvMx1.OptionsView.NewItemRowPosition = DevExpress.XtraGrid.Views.Grid.NewItemRowPosition.Bottom; |
| | | this.gvMx1.OptionsView.ShowGroupPanel = false; |
| | | // |
| | | // gridColumn1 |
| | | // colSectionCode |
| | | // |
| | | this.gridColumn1.Caption = "ä»ä½ç¼å·"; |
| | | this.gridColumn1.FieldName = "sectionCode"; |
| | | this.gridColumn1.MinWidth = 25; |
| | | this.gridColumn1.Name = "gridColumn1"; |
| | | this.gridColumn1.Visible = true; |
| | | this.gridColumn1.VisibleIndex = 0; |
| | | this.gridColumn1.Width = 94; |
| | | this.colSectionCode.Caption = "ä»ä½ç¼å·"; |
| | | this.colSectionCode.FieldName = "sectionCode"; |
| | | this.colSectionCode.MinWidth = 25; |
| | | this.colSectionCode.Name = "colSectionCode"; |
| | | this.colSectionCode.Visible = true; |
| | | this.colSectionCode.VisibleIndex = 0; |
| | | this.colSectionCode.Width = 94; |
| | | // |
| | | // gridColumn2 |
| | | // colSectionName |
| | | // |
| | | this.gridColumn2.Caption = "ä»ä½åç§°"; |
| | | this.gridColumn2.FieldName = "sectionName"; |
| | | this.gridColumn2.MinWidth = 25; |
| | | this.gridColumn2.Name = "gridColumn2"; |
| | | this.gridColumn2.Visible = true; |
| | | this.gridColumn2.VisibleIndex = 1; |
| | | this.gridColumn2.Width = 94; |
| | | this.colSectionName.Caption = "ä»ä½åç§°"; |
| | | this.colSectionName.FieldName = "sectionName"; |
| | | this.colSectionName.MinWidth = 25; |
| | | this.colSectionName.Name = "colSectionName"; |
| | | this.colSectionName.Visible = true; |
| | | this.colSectionName.VisibleIndex = 1; |
| | | this.colSectionName.Width = 94; |
| | | // |
| | | // gridColumn3 |
| | | // colRemark |
| | | // |
| | | this.gridColumn3.Caption = "夿³¨"; |
| | | this.gridColumn3.FieldName = "remark"; |
| | | this.gridColumn3.MinWidth = 25; |
| | | this.gridColumn3.Name = "gridColumn3"; |
| | | this.gridColumn3.Visible = true; |
| | | this.gridColumn3.VisibleIndex = 2; |
| | | this.gridColumn3.Width = 94; |
| | | this.colRemark.Caption = "夿³¨"; |
| | | this.colRemark.FieldName = "remark"; |
| | | this.colRemark.MinWidth = 25; |
| | | this.colRemark.Name = "colRemark"; |
| | | this.colRemark.Visible = true; |
| | | this.colRemark.VisibleIndex = 2; |
| | | this.colRemark.Width = 94; |
| | | // |
| | | // gridColumn4 |
| | | // |
| | |
| | | this.gridColumn4.FieldName = "createBy"; |
| | | this.gridColumn4.MinWidth = 25; |
| | | this.gridColumn4.Name = "gridColumn4"; |
| | | this.gridColumn4.OptionsColumn.ReadOnly = true; |
| | | this.gridColumn4.Visible = true; |
| | | this.gridColumn4.VisibleIndex = 3; |
| | | this.gridColumn4.VisibleIndex = 4; |
| | | this.gridColumn4.Width = 94; |
| | | // |
| | | // gridColumn5 |
| | |
| | | this.gridColumn5.FieldName = "createTime"; |
| | | this.gridColumn5.MinWidth = 25; |
| | | this.gridColumn5.Name = "gridColumn5"; |
| | | this.gridColumn5.OptionsColumn.ReadOnly = true; |
| | | this.gridColumn5.Visible = true; |
| | | this.gridColumn5.VisibleIndex = 4; |
| | | this.gridColumn5.VisibleIndex = 5; |
| | | this.gridColumn5.Width = 94; |
| | | // |
| | | // gridColumn6 |
| | | // colIsStatus |
| | | // |
| | | this.gridColumn6.Caption = "ç¶æ"; |
| | | this.gridColumn6.FieldName = "isStatusTxt"; |
| | | this.gridColumn6.MinWidth = 25; |
| | | this.gridColumn6.Name = "gridColumn6"; |
| | | this.gridColumn6.Visible = true; |
| | | this.gridColumn6.VisibleIndex = 5; |
| | | this.gridColumn6.Width = 94; |
| | | this.colIsStatus.Caption = "ç¶æ"; |
| | | this.colIsStatus.FieldName = "isStatusTxt"; |
| | | this.colIsStatus.MinWidth = 25; |
| | | this.colIsStatus.Name = "colIsStatus"; |
| | | this.colIsStatus.Visible = true; |
| | | this.colIsStatus.VisibleIndex = 3; |
| | | this.colIsStatus.Width = 94; |
| | | // |
| | | // colGuid |
| | | // |
| | | this.colGuid.Caption = "gridColumn1"; |
| | | this.colGuid.FieldName = "guid"; |
| | | this.colGuid.MinWidth = 25; |
| | | this.colGuid.Name = "colGuid"; |
| | | this.colGuid.OptionsColumn.ReadOnly = true; |
| | | this.colGuid.Width = 94; |
| | | // |
| | | // panel1 |
| | | // |
| | |
| | | this.panel1.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.panel1.Location = new System.Drawing.Point(0, 0); |
| | | this.panel1.Name = "panel1"; |
| | | this.panel1.Size = new System.Drawing.Size(1126, 166); |
| | | this.panel1.Size = new System.Drawing.Size(1126, 160); |
| | | this.panel1.TabIndex = 1; |
| | | // |
| | | // txt_itemNo |
| | | // |
| | | this.txt_itemNo.Location = new System.Drawing.Point(105, 35); |
| | | this.txt_itemNo.Location = new System.Drawing.Point(105, 30); |
| | | this.txt_itemNo.Name = "txt_itemNo"; |
| | | this.txt_itemNo.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_itemNo.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_itemNo.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_itemNo.Appearance.Options.UseFont = true; |
| | | this.lb_itemNo.Location = new System.Drawing.Point(14, 39); |
| | | this.lb_itemNo.Location = new System.Drawing.Point(14, 34); |
| | | this.lb_itemNo.Name = "lb_itemNo"; |
| | | this.lb_itemNo.Size = new System.Drawing.Size(85, 21); |
| | | this.lb_itemNo.TabIndex = 211; |
| | |
| | | // txt_category |
| | | // |
| | | this.txt_category.EditValue = "-è¯·éæ©-"; |
| | | this.txt_category.Location = new System.Drawing.Point(105, 115); |
| | | this.txt_category.Location = new System.Drawing.Point(105, 110); |
| | | this.txt_category.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); |
| | | this.txt_category.Name = "txt_category"; |
| | | this.txt_category.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | |
| | | // txt_isStatus |
| | | // |
| | | this.txt_isStatus.EditValue = "-è¯·éæ©-"; |
| | | this.txt_isStatus.Location = new System.Drawing.Point(389, 77); |
| | | this.txt_isStatus.Location = new System.Drawing.Point(389, 72); |
| | | 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.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; |
| | | this.txt_isStatus.Size = new System.Drawing.Size(127, 28); |
| | | this.txt_isStatus.Size = new System.Drawing.Size(150, 28); |
| | | this.txt_isStatus.TabIndex = 232; |
| | | // |
| | | // txt_name |
| | | // |
| | | this.txt_name.Location = new System.Drawing.Point(105, 77); |
| | | this.txt_name.Location = new System.Drawing.Point(105, 72); |
| | | this.txt_name.Name = "txt_name"; |
| | | this.txt_name.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_name.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_isWy.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_isWy.Appearance.Options.UseFont = true; |
| | | this.lb_isWy.Location = new System.Drawing.Point(298, 39); |
| | | this.lb_isWy.Location = new System.Drawing.Point(298, 34); |
| | | this.lb_isWy.Name = "lb_isWy"; |
| | | this.lb_isWy.Size = new System.Drawing.Size(85, 21); |
| | | this.lb_isWy.TabIndex = 220; |
| | |
| | | // txt_isWy |
| | | // |
| | | this.txt_isWy.EditValue = "-è¯·éæ©-"; |
| | | this.txt_isWy.Location = new System.Drawing.Point(389, 35); |
| | | this.txt_isWy.Location = new System.Drawing.Point(389, 30); |
| | | this.txt_isWy.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); |
| | | this.txt_isWy.Name = "txt_isWy"; |
| | | this.txt_isWy.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | |
| | | "æ¯å§å¤ä»", |
| | | "䏿¯å§å¤ä»"}); |
| | | this.txt_isWy.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor; |
| | | this.txt_isWy.Size = new System.Drawing.Size(127, 28); |
| | | this.txt_isWy.Size = new System.Drawing.Size(150, 28); |
| | | this.txt_isWy.TabIndex = 233; |
| | | // |
| | | // lb_isStatus |
| | | // |
| | | this.lb_isStatus.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_isStatus.Appearance.Options.UseFont = true; |
| | | this.lb_isStatus.Location = new System.Drawing.Point(332, 81); |
| | | this.lb_isStatus.Location = new System.Drawing.Point(332, 76); |
| | | this.lb_isStatus.Name = "lb_isStatus"; |
| | | this.lb_isStatus.Size = new System.Drawing.Size(51, 21); |
| | | this.lb_isStatus.TabIndex = 231; |
| | |
| | | // |
| | | this.lb_name.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_name.Appearance.Options.UseFont = true; |
| | | this.lb_name.Location = new System.Drawing.Point(14, 81); |
| | | this.lb_name.Location = new System.Drawing.Point(14, 76); |
| | | this.lb_name.Name = "lb_name"; |
| | | this.lb_name.Size = new System.Drawing.Size(85, 21); |
| | | this.lb_name.TabIndex = 216; |
| | |
| | | // |
| | | this.lb_category.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_category.Appearance.Options.UseFont = true; |
| | | this.lb_category.Location = new System.Drawing.Point(48, 118); |
| | | this.lb_category.Location = new System.Drawing.Point(48, 113); |
| | | this.lb_category.Name = "lb_category"; |
| | | this.lb_category.Size = new System.Drawing.Size(51, 21); |
| | | this.lb_category.TabIndex = 226; |
| | |
| | | // lbGuid |
| | | // |
| | | this.lbGuid.AutoSize = true; |
| | | this.lbGuid.Location = new System.Drawing.Point(708, 35); |
| | | this.lbGuid.Location = new System.Drawing.Point(708, 30); |
| | | this.lbGuid.Name = "lbGuid"; |
| | | this.lbGuid.Size = new System.Drawing.Size(0, 21); |
| | | this.lbGuid.TabIndex = 1; |
| | | // |
| | | // txt_remark |
| | | // |
| | | this.txt_remark.Location = new System.Drawing.Point(389, 115); |
| | | this.txt_remark.Location = new System.Drawing.Point(389, 110); |
| | | this.txt_remark.Name = "txt_remark"; |
| | | this.txt_remark.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.txt_remark.Properties.Appearance.Options.UseFont = true; |
| | |
| | | // |
| | | this.lb_remark.Appearance.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | this.lb_remark.Appearance.Options.UseFont = true; |
| | | this.lb_remark.Location = new System.Drawing.Point(332, 119); |
| | | this.lb_remark.Location = new System.Drawing.Point(332, 114); |
| | | this.lb_remark.Name = "lb_remark"; |
| | | this.lb_remark.Size = new System.Drawing.Size(51, 21); |
| | | this.lb_remark.TabIndex = 217; |
| | |
| | | // |
| | | // labelControl11 |
| | | // |
| | | this.labelControl11.Location = new System.Drawing.Point(657, 38); |
| | | this.labelControl11.Location = new System.Drawing.Point(657, 33); |
| | | this.labelControl11.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); |
| | | this.labelControl11.Name = "labelControl11"; |
| | | this.labelControl11.Size = new System.Drawing.Size(45, 18); |
| | |
| | | private DevExpress.XtraEditors.LabelControl lb_isWy; |
| | | private DevExpress.XtraGrid.GridControl gridControl1; |
| | | private DevExpress.XtraGrid.Views.Grid.GridView gvMx1; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn1; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn2; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn3; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colSectionCode; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colSectionName; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colRemark; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn4; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn5; |
| | | private DevExpress.XtraGrid.Columns.GridColumn gridColumn6; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colIsStatus; |
| | | private DevExpress.XtraGrid.Columns.GridColumn colGuid; |
| | | } |
| | | } |
| | |
| | | using DevExpress.XtraGrid.Columns; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using DevExpress.XtraTreeList; |
| | | using DevExpress.XtraTreeList.Nodes; |
| | | using Gs.DevApp.Entity; |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Windows.Controls; |
| | | using System.Windows.Forms; |
| | | |
| | | namespace Gs.DevApp.DevFrm.Warehouse |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEscClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | } |
| | | /// <summary> |
| | | /// å é¤äºä»¶ |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e) |
| | | { |
| | | String rowGuid = Convert.ToString(tlMenu.FocusedNode.GetValue("guid")); |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_name, tlMenu); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦å é¤çè¡ï¼"); |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + tlMenu.FocusedNode.GetValue("name") + "ãï¼ç¡®å®å é¤åï¼")) |
| | | if (!MsgHelper.AskQuestion("ä½ éæ©äºã" + rowName + "ãï¼ç¡®å®å é¤åï¼")) |
| | | { |
| | | return; |
| | | } |
| | |
| | | { |
| | | guidList = rowGuid,//主建 |
| | | }; |
| | | string strJson = ""; |
| | | try |
| | | { |
| | | strJson = UtilityHelper.HttpPost("", "Depot/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | string strJson = UtilityHelper.HttpPost("", "Depot/DeleteModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 0); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e) |
| | | { |
| | | String rowGuid = Convert.ToString(tlMenu.FocusedNode.GetValue("guid")); |
| | | string depotGuid = Convert.ToString(tlMenu.FocusedNode.GetValue("upGuid")); |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_name, tlMenu); |
| | | string depotGuid = ""; |
| | | if (tlMenu.FocusedNode != null) |
| | | depotGuid = Convert.ToString(tlMenu.FocusedNode.GetValue("upGuid")); |
| | | if (!string.IsNullOrEmpty(depotGuid)) |
| | | rowGuid = depotGuid; |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnAddClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.ChangeTab(xtraTabControl1, 1); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 1); |
| | | lbGuid.Text = ""; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | UtilityHelper.CleanValue(this.panel1.Controls, true, gridViews); |
| | | DataTable dt = new DataTable(); |
| | | foreach (GridColumn col in gvMx1.Columns) |
| | | { |
| | | dt.Columns.Add(col.FieldName, typeof(string)); |
| | | } |
| | | gridControl1.BindingContext = new BindingContext(); |
| | | gridControl1.DataSource = dt; |
| | | gridControl1.ForceInitialize(); |
| | | UtilityHelper.CleanValueByControl(this.panel1.Controls, true, gridViews); |
| | | _setTable(); |
| | | } |
| | | /// <summary> |
| | | /// ä¿åäºä»¶ |
| | |
| | | toolBarMenu1.isSetBtn = false; |
| | | if (string.IsNullOrEmpty(txt_itemNo.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("ç¼å·å·ä¸è½ä¸ºç©ºï¼"); |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("ç¼å·ä¸è½ä¸ºç©ºï¼"); |
| | | txt_itemNo.Focus(); |
| | | return; |
| | | } |
| | |
| | | txt_isStatus.Focus(); |
| | | return; |
| | | } |
| | | gvMx1.UpdateCurrentRow(); |
| | | List<dynamic> lst = new List<dynamic>(); |
| | | for (int i = 0; i < gvMx1.DataRowCount; i++) |
| | | { |
| | | DataRow row = gvMx1.GetDataRow(i); |
| | | if (row != null) |
| | | { |
| | | lst.Add(new |
| | | { |
| | | guid = row["guid"].ToString(), |
| | | sectionCode = row["sectionCode"].ToString(), |
| | | sectionName = row["sectionName"].ToString(), |
| | | remark = row["remark"].ToString(), |
| | | isStatus = row["isStatusTxt"].ToString(), |
| | | }); |
| | | } |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = lbGuid.Text.Trim(),//主建 |
| | |
| | | category = txt_category.SelectedIndex, |
| | | isWy = txt_isWy.SelectedIndex, |
| | | isStatus = txt_isStatus.SelectedIndex, |
| | | list = lst |
| | | }; |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Depot/EditModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | |
| | | toolBarMenu1.isSetBtn = true; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gridViews.Add(gvMx1); |
| | | UtilityHelper.ChangeEnable(this.panel1.Controls, false, gridViews); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gridViews); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | try |
| | | { |
| | | string strReturn = UtilityHelper.HttpPost("", "Depot/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | DataTable dt = dd.rtnData.list; |
| | | this.tlMenu.DataSource = dt; |
| | | this.tlMenu.KeyFieldName = "guid"; |
| | |
| | | ToolBox.MsgHelper.Warning("请å
éæ©ä½ è¦æä½çè¡ï¼"); |
| | | return; |
| | | } |
| | | UtilityHelper.ChangeTab(xtraTabControl1, tabIdx); |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | | guid = strGuid,//主建 |
| | |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", "Depot/GetModel", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson); |
| | | ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | dynamic dy = _rtn.rtnData; |
| | |
| | | array.Add(a); |
| | | } |
| | | DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); |
| | | gridControl1.BindingContext = new BindingContext(); |
| | | gridControl1.DataSource = dt; |
| | | gridControl1.ForceInitialize(); |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gridControl1.BindingContext = new BindingContext(); |
| | | gridControl1.DataSource = dt; |
| | | gridControl1.ForceInitialize(); |
| | | } |
| | | else |
| | | { |
| | | _setTable(); |
| | | } |
| | | } |
| | | else |
| | | ToolBox.MsgHelper.Warning("æç¤ºï¼" + _rtn.rtnMsg); |
| | |
| | | } |
| | | } |
| | | |
| | | private void _setTable() |
| | | { |
| | | DataTable dt = new DataTable(); |
| | | foreach (GridColumn col in gvMx1.Columns) |
| | | { |
| | | dt.Columns.Add(col.FieldName, typeof(string)); |
| | | } |
| | | gridControl1.BindingContext = new BindingContext(); |
| | | gridControl1.DataSource = dt; |
| | | gridControl1.ForceInitialize(); |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | <Compile Include="DevFrm\Sys\SysLog.Designer.cs"> |
| | | <DependentUpon>SysLog.cs</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="DevFrm\User\Organization.cs"> |
| | | <Compile Include="DevFrm\Sys\Organization.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | | <Compile Include="DevFrm\User\Organization.Designer.cs"> |
| | | <Compile Include="DevFrm\Sys\Organization.Designer.cs"> |
| | | <DependentUpon>Organization.cs</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="DevFrm\User\Role.cs"> |
| | |
| | | <Compile Include="DevFrm\User\Role.Designer.cs"> |
| | | <DependentUpon>Role.cs</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="DevFrm\User\SysMenu.cs"> |
| | | <Compile Include="DevFrm\Sys\SysMenu.cs"> |
| | | <SubType>Form</SubType> |
| | | </Compile> |
| | | <Compile Include="DevFrm\User\SysMenu.Designer.cs"> |
| | | <Compile Include="DevFrm\Sys\SysMenu.Designer.cs"> |
| | | <DependentUpon>SysMenu.cs</DependentUpon> |
| | | </Compile> |
| | | <Compile Include="DevFrm\User\User.cs"> |
| | |
| | | <EmbeddedResource Include="DevFrm\Sys\SysLog.resx"> |
| | | <DependentUpon>SysLog.cs</DependentUpon> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="DevFrm\User\Organization.resx"> |
| | | <EmbeddedResource Include="DevFrm\Sys\Organization.resx"> |
| | | <DependentUpon>Organization.cs</DependentUpon> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="DevFrm\User\Role.resx"> |
| | | <DependentUpon>Role.cs</DependentUpon> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="DevFrm\User\SysMenu.resx"> |
| | | <EmbeddedResource Include="DevFrm\Sys\SysMenu.resx"> |
| | | <DependentUpon>SysMenu.cs</DependentUpon> |
| | | </EmbeddedResource> |
| | | <EmbeddedResource Include="DevFrm\User\User.resx"> |
| | |
| | | <None Include="Resources\doubleprev_16x16.png" /> |
| | | <None Include="Resources\doublenext_16x16.png" /> |
| | | <None Include="Resources\last_16x16.png" /> |
| | | <None Include="Resources\login_bg2.png" /> |
| | | <None Include="Resources\login_bg1.png" /> |
| | | <None Include="Resources\login_bg222.png" /> |
| | | <None Include="Resources\login_bg6.png" /> |
| | | <None Include="Resources\publicfix_32x32.png" /> |
| | | <None Include="Resources\groupbyresource_32x32.png" /> |
| | |
| | | <None Include="Resources\formatnumbertime_16x16.png" /> |
| | | <None Include="Resources\find_32x32.png" /> |
| | | <None Include="Resources\find_16x16.png" /> |
| | | <None Include="Resources\enablesearch.svg" /> |
| | | <None Include="Resources\employee_32x32.png" /> |
| | | <None Include="Resources\boposition2_16x16.png" /> |
| | | <None Include="Resources\newitem_16x16.png" /> |
| | |
| | | try |
| | | { |
| | | strReturn = UtilityHelper.HttpPost("", "MesItemsManager/GetListPage", json); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn); |
| | | ReturnModel<PageListModel> dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | return dd; |
| | | } |
| | | catch (Exception ex) |
| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraTab; |
| | | using System.Text.RegularExpressions; |
| | | using System.Xml; |
| | | using System.Collections.Generic; |
| | | |
| | | namespace Gs.DevApp.ToolBox |
| | |
| | | } |
| | | return responseStr; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 读åé»è®¤é¡µå¤§å° |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static int GetPageSize() |
| | | { |
| | | return 50; |
| | | // return int.Parse(System.Configuration.ConfigurationSettings.AppSettings.Get("PageSize").ToString()); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ ¹æ®å¾çå读åèµæºæä»¶,ä¸å¸¦åç¼å |
| | | /// </summary> |
| | |
| | | return token; |
| | | } |
| | | /// <summary> |
| | | /// æ åjson串è¿åReturnModel-->tableï¼ |
| | | /// æ åjsonè¿åReturnModel-->å
å«TablePageåé¡µï¼ |
| | | /// </summary> |
| | | /// <param name="strReturn"></param> |
| | | /// <returns></returns> |
| | | public static ReturnModel<PageListModel> GetTableByJson(string strReturn) |
| | | public static ReturnModel<PageListModel> ReturnToTablePage(string strReturn) |
| | | { |
| | | ReturnModel<PageListModel> rto = new ReturnModel<PageListModel>(); |
| | | JObject json = JObject.Parse(strReturn); |
| | |
| | | return rto; |
| | | } |
| | | /// <summary> |
| | | /// æ åjson串è¿åReturnModel->åç¬¦ä¸²ï¼ |
| | | /// æ åjsonè¿åReturnModelï¼ |
| | | /// </summary> |
| | | /// <param name="strReturn"></param> |
| | | /// <returns></returns> |
| | | public static ReturnModel<dynamic> GetDataByJson(string strReturn) |
| | | public static ReturnModel<dynamic> ReturnToDynamic(string strReturn) |
| | | { |
| | | ReturnModel<dynamic> rto = new ReturnModel<dynamic>(); |
| | | JObject json = JObject.Parse(strReturn); |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// æ åjson串è¿åReturnModel-->tableï¼ |
| | | /// æ åjson串è¿åReturnModel-->ä»
ä»
ælist,ä¸åé¡µï¼ |
| | | /// </summary> |
| | | /// <param name="strReturn"></param> |
| | | /// <returns></returns> |
| | | public static ReturnModel<DataTable> GetNoPageTableByJson(string strReturn) |
| | | public static ReturnModel<DataTable> ReturnToList(string strReturn) |
| | | { |
| | | ReturnModel<DataTable> rto = new ReturnModel<DataTable>(); |
| | | JObject json = JObject.Parse(strReturn); |
| | |
| | | DataTable dt = JsonConvert.DeserializeObject<DataTable>(array.ToString()); |
| | | rto.rtnData = dt; |
| | | return rto; |
| | | } |
| | | |
| | | |
| | | /// <summary> |
| | | /// 读åé»è®¤é¡µå¤§å° |
| | | /// </summary> |
| | | /// <returns></returns> |
| | | public static int GetPageSize() |
| | | { |
| | | return 50; |
| | | // return int.Parse(System.Configuration.ConfigurationSettings.AppSettings.Get("PageSize").ToString()); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="controls">controls:为groupBox1.Controls/panel1.Controls</param> |
| | | /// <param name="isEdt">æ¯å¦å¯ç¼è¾</param> |
| | | public static void CleanValue(ControlCollection controls, Boolean isEdt, List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = null) |
| | | public static void CleanValueByControl(ControlCollection controls, Boolean isEdt, List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = null) |
| | | { |
| | | if (gridViews != null) |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="controls">controls:为groupBox1.Controls/panel1.Controls</param> |
| | | /// <param name="isEdt">æ¯å¦å¯ç¼è¾</param> |
| | | public static void ChangeEnable(ControlCollection controls, Boolean isEdt, List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = null) |
| | | public static void ChangeEnableByControl(ControlCollection controls, Boolean isEdt, List<DevExpress.XtraGrid.Views.Grid.GridView> gridViews = null) |
| | | { |
| | | if (gridViews != null) |
| | | { |
| | |
| | | gv.OptionsBehavior.Editable = isEdt; |
| | | } |
| | | } |
| | | |
| | | foreach (Control ctrl in controls) |
| | | { |
| | | ctrl.Enabled = isEdt; |
| | | //ææ¬ |
| | | if (ctrl is TextEdit) |
| | | { |
| | |
| | | /// </summary> |
| | | /// <param name="tabControl">é项å¡å®¹å¨</param> |
| | | /// <param name="idx">ä»0å¼å§ï¼å¦ææ¯999ï¼åå
¨é¨å¯ç¨</param> |
| | | public static void ChangeTab(XtraTabControl tabControl, int idx) |
| | | public static void JumpToTab(XtraTabControl tabControl, int idx) |
| | | { |
| | | if (idx == 999) |
| | | { |
| | |
| | | tabControl.TabPages[idx].PageEnabled = true; |
| | | tabControl.SelectedTabPageIndex = idx; |
| | | } |
| | | |
| | | |
| | | public static void TreeViewCheck(TreeViewEventArgs e) |
| | | { |
| | |
| | | string dd = Regex.Replace(propertyName, @"_([a-z])", m => m.Groups[1].Value.ToUpper()); |
| | | return dd; |
| | | } |
| | | public static void UpdateAppConfig(string key, string newValue) |
| | | { |
| | | string configFile = AppDomain.CurrentDomain.SetupInformation.ConfigurationFile; |
| | | XmlDocument xmlDoc = new XmlDocument(); |
| | | xmlDoc.Load(configFile); |
| | | |
| | | XmlNode node = xmlDoc.SelectSingleNode($"//appSettings//add[@key='{key}']"); |
| | | if (node != null) |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="xtraTabControl1"></param> |
| | | /// <param name="lbGuid">ç¼è¾æ¡ä¸ç主é®å</param> |
| | | /// <param name="txtName">ç¼è¾æ¡ä¸çææ¬æ¡å</param> |
| | | /// <param name="gridView1"></param> |
| | | /// <param name="gridRowName">å表ä¸çææ¬åå</param> |
| | | /// <param name="SelectedTabPageIndex"></param> |
| | | /// <returns></returns> |
| | | public static (string, string) GetCurrentRow(XtraTabControl xtraTabControl1 |
| | | , System.Windows.Forms.Label lbGuid |
| | | , DevExpress.XtraEditors.TextEdit txtName |
| | | , DevExpress.XtraGrid.Views.Grid.GridView gridView1 |
| | | , int SelectedTabPageIndex = 1) |
| | | { |
| | | string _strGuid = ""; |
| | | string _strName = ""; |
| | | if (xtraTabControl1.SelectedTabPageIndex == SelectedTabPageIndex && lbGuid.Text.Length > 10) |
| | | { |
| | | XmlAttribute attribute = node as XmlAttribute; |
| | | attribute.Value = newValue; |
| | | xmlDoc.Save(configFile); |
| | | _strGuid = lbGuid.Text.Trim(); |
| | | _strName = txtName.Text.Trim(); |
| | | } |
| | | else |
| | | { |
| | | DataRow dr = gridView1.GetFocusedDataRow(); |
| | | if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString())) |
| | | { |
| | | |
| | | } |
| | | else { |
| | | _strGuid = dr["guid"].ToString(); |
| | | _strName = dr[1].ToString(); |
| | | } |
| | | } |
| | | return (_strGuid, _strName); |
| | | } |
| | | public class CboItemEntity |
| | | public static (string, string) GetCurrentRow(XtraTabControl xtraTabControl1 |
| | | , System.Windows.Forms.Label lbGuid |
| | | , DevExpress.XtraEditors.TextEdit txtName |
| | | , System.Windows.Forms.TreeView tlMenu |
| | | , int SelectedTabPageIndex = 1) |
| | | { |
| | | private object _text = 0; |
| | | private object _Value = ""; |
| | | /// <summary> |
| | | /// æ¾ç¤ºå¼ |
| | | /// </summary> |
| | | public object Text |
| | | string _strGuid = ""; |
| | | string _strName = ""; |
| | | if (xtraTabControl1.SelectedTabPageIndex == SelectedTabPageIndex && lbGuid.Text.Length > 10) |
| | | { |
| | | get { return this._text; } |
| | | set { this._text = value; } |
| | | _strGuid = lbGuid.Text.Trim(); |
| | | _strName = txtName.Text.Trim(); |
| | | } |
| | | /// <summary> |
| | | /// å¯¹è±¡å¼ |
| | | /// </summary> |
| | | public object Value |
| | | else |
| | | { |
| | | get { return this._Value; } |
| | | set { this._Value = value; } |
| | | TreeNode clickedNode = tlMenu.SelectedNode; |
| | | if (clickedNode != null) |
| | | { |
| | | _strGuid = clickedNode.Name.ToString(); |
| | | _strName = clickedNode.Text.Trim(); |
| | | } |
| | | } |
| | | return (_strGuid, _strName); |
| | | } |
| | | public static (string, string) GetCurrentRow(XtraTabControl xtraTabControl1 |
| | | , System.Windows.Forms.Label lbGuid |
| | | , DevExpress.XtraEditors.TextEdit txtName |
| | | , DevExpress.XtraTreeList.TreeList tlMenu |
| | | , int SelectedTabPageIndex = 1) |
| | | { |
| | | string _strGuid = ""; |
| | | string _strName = ""; |
| | | if (xtraTabControl1.SelectedTabPageIndex == SelectedTabPageIndex && lbGuid.Text.Length > 10) |
| | | { |
| | | _strGuid = lbGuid.Text.Trim(); |
| | | _strName = txtName.Text.Trim(); |
| | | } |
| | | else |
| | | { |
| | | _strGuid = tlMenu.FocusedNode.GetValue("guid").ToString(); |
| | | _strName = tlMenu.FocusedNode.GetValue(0).ToString(); |
| | | } |
| | | return (_strGuid, _strName); |
| | | } |
| | | } |
| | | |
| | | public override string ToString() |
| | | { |
| | | return this.Text.ToString(); |
| | | } |
| | | public class CboItemEntity |
| | | { |
| | | private object _text = 0; |
| | | private object _Value = ""; |
| | | /// <summary> |
| | | /// æ¾ç¤ºå¼ |
| | | /// </summary> |
| | | public object Text |
| | | { |
| | | get { return this._text; } |
| | | set { this._text = value; } |
| | | } |
| | | /// <summary> |
| | | /// å¯¹è±¡å¼ |
| | | /// </summary> |
| | | public object Value |
| | | { |
| | | get { return this._Value; } |
| | | set { this._Value = value; } |
| | | } |
| | | |
| | | public override string ToString() |
| | | { |
| | | return this.Text.ToString(); |
| | | } |
| | | } |
| | | } |
| | |
| | | using DevExpress.XtraBars; |
| | | using DevExpress.XtraEditors; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Newtonsoft.Json; |
| | |
| | | getNamespace(); |
| | | } |
| | | } |
| | | //private void initialization() |
| | | //{ |
| | | // List<string> lst = new List<string>(); |
| | | // //lst.Add(btnAdd.Name); |
| | | // //lst.Add(btnEdit.Name); |
| | | // //lst.Add(btnLoad.Name); |
| | | // //lst.Add(btnDel.Name); |
| | | // //lst.Add(btnRole.Name); |
| | | // //lst.Add(btnReport.Name); |
| | | // //lst.Add(btnQuery.Name); |
| | | // setBtn(lst); |
| | | //} |
| | | |
| | | private void BtnEsc_ItemClick(object sender, ItemClickEventArgs e) |
| | | { |
| | |
| | | string strReturn = ""; |
| | | try |
| | | { |
| | | strReturn = UtilityHelper.HttpPost("", "MenuAction/GetListByUserOrgSpace", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<DataTable> dd = UtilityHelper.GetNoPageTableByJson(strReturn); |
| | | strReturn = UtilityHelper.HttpPost("", "Role/GetListByUserOrgSpace", JsonConvert.SerializeObject(_obj)); |
| | | ReturnModel<DataTable> dd = UtilityHelper.ReturnToList(strReturn); |
| | | DataTable dt = dd.rtnData; |
| | | List<string> _enabledList = new List<string>(); |
| | | foreach (BarItem item in barManager1.Items) |