lg
2024-09-18 beefa10327cacb21d3f434ec5a537ef4a6cd79de
增加假日
已添加3个文件
已修改5个文件
843 ■■■■■ 文件已修改
DevApp/Gs.DevApp/App.config 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/BasicData/FrmHolidy.Designer.cs 398 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/BasicData/FrmHolidy.cs 290 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/BasicData/FrmHolidy.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/FrmLogin.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/User/SysMenu.Designer.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Gs.DevApp.csproj 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/App.config
@@ -22,11 +22,12 @@
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
  </startup>
  <appSettings>
    <add key="WebApiUrl" value="http://localhost:5000/" />
        <add key="WebApiUrl" value="http://localhost:5263/" />
    <add key="LogPath" value="logs" />
    <add key="ProductName" value="广深科技 G-MES V2.0" />
    <add key="PageSize" value="50" />
    <add key="Version" value="3.0" />
        <add key="IsAutoUpdater" value="0" />
    <add key="AutoUpdaterXml" value="https://dianbei.top/AutoUpdater/AutoUpdater.xml" />
  </appSettings>
  <userSettings>
DevApp/Gs.DevApp/DevFrm/BasicData/FrmHolidy.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,398 @@

namespace Gs.DevApp.DevFrm.BasicData
{
    partial class FrmHolidy
    {
        /// <summary>
        /// Required designer variable.
        /// </summary>
        private System.ComponentModel.IContainer components = null;
        /// <summary>
        /// Clean up any resources being used.
        /// </summary>
        /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
        protected override void Dispose(bool disposing)
        {
            if (disposing && (components != null))
            {
                components.Dispose();
            }
            base.Dispose(disposing);
        }
        #region Windows Form Designer generated code
        /// <summary>
        /// Required method for Designer support - do not modify
        /// the contents of this method with the code editor.
        /// </summary>
        private void InitializeComponent()
        {
            this.gv_createTime = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_createBy = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_isStatus = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_interval = new DevExpress.XtraGrid.Columns.GridColumn();
            this.lb_time2 = new DevExpress.XtraEditors.LabelControl();
            this.gv_time2 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.lb_time1 = new DevExpress.XtraEditors.LabelControl();
            this.gv_time1 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.lb_name = new DevExpress.XtraEditors.LabelControl();
            this.txt_name = new DevExpress.XtraEditors.TextEdit();
            this.gv_name = 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.xtraTabControl1 = new DevExpress.XtraTab.XtraTabControl();
            this.xtraTabPage1 = new DevExpress.XtraTab.XtraTabPage();
            this.pageBar1 = new UserControls.Data.PageBar();
            this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
            this.panel1 = new System.Windows.Forms.Panel();
            this.txt_time2 = new System.Windows.Forms.DateTimePicker();
            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();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.xtraTabPage1.SuspendLayout();
            this.xtraTabPage2.SuspendLayout();
            this.panel1.SuspendLayout();
            this.SuspendLayout();
            //
            // gv_createTime
            //
            this.gv_createTime.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_createTime.AppearanceCell.Options.UseFont = true;
            this.gv_createTime.Caption = "建立时间";
            this.gv_createTime.FieldName = "createTime";
            this.gv_createTime.MinWidth = 25;
            this.gv_createTime.Name = "gv_createTime";
            this.gv_createTime.OptionsColumn.AllowEdit = false;
            this.gv_createTime.Visible = true;
            this.gv_createTime.VisibleIndex = 7;
            this.gv_createTime.Width = 94;
            //
            // gv_createBy
            //
            this.gv_createBy.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_createBy.AppearanceCell.Options.UseFont = true;
            this.gv_createBy.Caption = "建立者";
            this.gv_createBy.FieldName = "createBy";
            this.gv_createBy.MinWidth = 25;
            this.gv_createBy.Name = "gv_createBy";
            this.gv_createBy.OptionsColumn.AllowEdit = false;
            this.gv_createBy.Visible = true;
            this.gv_createBy.VisibleIndex = 6;
            this.gv_createBy.Width = 94;
            //
            // gv_isStatus
            //
            this.gv_isStatus.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_isStatus.AppearanceCell.Options.UseFont = true;
            this.gv_isStatus.Caption = "状态";
            this.gv_isStatus.FieldName = "isStatusTxt";
            this.gv_isStatus.MinWidth = 25;
            this.gv_isStatus.Name = "gv_isStatus";
            this.gv_isStatus.OptionsColumn.AllowEdit = false;
            this.gv_isStatus.Visible = true;
            this.gv_isStatus.VisibleIndex = 5;
            this.gv_isStatus.Width = 94;
            //
            // gv_interval
            //
            this.gv_interval.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_interval.AppearanceCell.Options.UseFont = true;
            this.gv_interval.Caption = "总分钟";
            this.gv_interval.FieldName = "interval";
            this.gv_interval.MinWidth = 25;
            this.gv_interval.Name = "gv_interval";
            this.gv_interval.OptionsColumn.AllowEdit = false;
            this.gv_interval.Visible = true;
            this.gv_interval.VisibleIndex = 4;
            this.gv_interval.Width = 94;
            //
            // lb_time2
            //
            this.lb_time2.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lb_time2.Appearance.Options.UseFont = true;
            this.lb_time2.Location = new System.Drawing.Point(23, 135);
            this.lb_time2.Name = "lb_time2";
            this.lb_time2.Size = new System.Drawing.Size(85, 21);
            this.lb_time2.TabIndex = 216;
            this.lb_time2.Tag = "time2";
            this.lb_time2.Text = "结束时间:";
            //
            // gv_time2
            //
            this.gv_time2.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_time2.AppearanceCell.Options.UseFont = true;
            this.gv_time2.Caption = "结束时间";
            this.gv_time2.FieldName = "time2";
            this.gv_time2.MinWidth = 25;
            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.Width = 94;
            //
            // lb_time1
            //
            this.lb_time1.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lb_time1.Appearance.Options.UseFont = true;
            this.lb_time1.Location = new System.Drawing.Point(23, 78);
            this.lb_time1.Name = "lb_time1";
            this.lb_time1.Size = new System.Drawing.Size(85, 21);
            this.lb_time1.TabIndex = 213;
            this.lb_time1.Tag = "time1";
            this.lb_time1.Text = "开始时间:";
            //
            // gv_time1
            //
            this.gv_time1.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_time1.AppearanceCell.Options.UseFont = true;
            this.gv_time1.Caption = "开始时间";
            this.gv_time1.FieldName = "time1";
            this.gv_time1.MinWidth = 25;
            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.Width = 94;
            //
            // lb_name
            //
            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(23, 27);
            this.lb_name.Name = "lb_name";
            this.lb_name.Size = new System.Drawing.Size(85, 21);
            this.lb_name.TabIndex = 211;
            this.lb_name.Tag = "name";
            this.lb_name.Text = "假日名称:";
            //
            // txt_name
            //
            this.txt_name.Location = new System.Drawing.Point(136, 23);
            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.txt_name.Size = new System.Drawing.Size(150, 28);
            this.txt_name.TabIndex = 211;
            this.txt_name.Tag = "name";
            //
            // gv_name
            //
            this.gv_name.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_name.AppearanceCell.Options.UseFont = true;
            this.gv_name.Caption = "假日名称";
            this.gv_name.FieldName = "name";
            this.gv_name.MinWidth = 25;
            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.Width = 94;
            //
            // toolBarMenu1
            //
            this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top;
            this.toolBarMenu1.isSetBtn = false;
            this.toolBarMenu1.Location = new System.Drawing.Point(0, 0);
            this.toolBarMenu1.Name = "toolBarMenu1";
            this.toolBarMenu1.Size = new System.Drawing.Size(1128, 80);
            this.toolBarMenu1.TabIndex = 0;
            //
            // gcMain
            //
            this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.gcMain.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gcMain.Location = new System.Drawing.Point(0, 0);
            this.gcMain.MainView = this.gridView1;
            this.gcMain.Name = "gcMain";
            this.gcMain.Size = new System.Drawing.Size(1126, 531);
            this.gcMain.TabIndex = 1;
            this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gridView1});
            //
            // gridView1
            //
            this.gridView1.Appearance.Row.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gridView1.Appearance.Row.Options.UseFont = true;
            this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gv_name,
            this.gv_time1,
            this.gv_time2,
            this.weekdayName,
            this.gv_interval,
            this.gv_isStatus,
            this.gv_createBy,
            this.gv_createTime});
            this.gridView1.GridControl = this.gcMain;
            this.gridView1.IndicatorWidth = 50;
            this.gridView1.Name = "gridView1";
            this.gridView1.OptionsFind.ShowSearchNavButtons = false;
            this.gridView1.OptionsView.ShowAutoFilterRow = true;
            this.gridView1.OptionsView.ShowGroupPanel = false;
            //
            // xtraTabControl1
            //
            this.xtraTabControl1.Dock = System.Windows.Forms.DockStyle.Fill;
            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(1128, 602);
            this.xtraTabControl1.TabIndex = 3;
            this.xtraTabControl1.TabPages.AddRange(new DevExpress.XtraTab.XtraTabPage[] {
            this.xtraTabPage1,
            this.xtraTabPage2});
            //
            // xtraTabPage1
            //
            this.xtraTabPage1.Controls.Add(this.gcMain);
            this.xtraTabPage1.Controls.Add(this.pageBar1);
            this.xtraTabPage1.Name = "xtraTabPage1";
            this.xtraTabPage1.Size = new System.Drawing.Size(1126, 570);
            this.xtraTabPage1.Text = "数据查询";
            //
            // pageBar1
            //
            this.pageBar1.CurrentPage = 1;
            this.pageBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.pageBar1.Location = new System.Drawing.Point(0, 531);
            this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.pageBar1.Name = "pageBar1";
            this.pageBar1.RecordCount = 0;
            this.pageBar1.RowsCount = 50;
            this.pageBar1.Size = new System.Drawing.Size(1126, 39);
            this.pageBar1.TabIndex = 3;
            this.pageBar1.TotalPages = 0;
            //
            // xtraTabPage2
            //
            this.xtraTabPage2.Controls.Add(this.panel1);
            this.xtraTabPage2.Name = "xtraTabPage2";
            this.xtraTabPage2.PageEnabled = false;
            this.xtraTabPage2.Size = new System.Drawing.Size(1126, 570);
            this.xtraTabPage2.Text = "数据编辑";
            //
            // panel1
            //
            this.panel1.BackColor = System.Drawing.Color.White;
            this.panel1.Controls.Add(this.txt_time2);
            this.panel1.Controls.Add(this.txt_time1);
            this.panel1.Controls.Add(this.labelControl11);
            this.panel1.Controls.Add(this.lbGuid);
            this.panel1.Controls.Add(this.lb_time2);
            this.panel1.Controls.Add(this.lb_time1);
            this.panel1.Controls.Add(this.lb_name);
            this.panel1.Controls.Add(this.txt_name);
            this.panel1.Font = new System.Drawing.Font("Tahoma", 10F);
            this.panel1.Location = new System.Drawing.Point(76, 20);
            this.panel1.Name = "panel1";
            this.panel1.Size = new System.Drawing.Size(995, 426);
            this.panel1.TabIndex = 1;
            //
            // txt_time2
            //
            this.txt_time2.CustomFormat = "yyyy-MM-dd HH:mm:ss";
            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);
            this.txt_time2.Name = "txt_time2";
            this.txt_time2.Size = new System.Drawing.Size(200, 28);
            this.txt_time2.TabIndex = 218;
            this.txt_time2.Value = 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.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.txt_time1.Name = "txt_time1";
            this.txt_time1.Size = new System.Drawing.Size(200, 28);
            this.txt_time1.TabIndex = 217;
            this.txt_time1.Value = new System.DateTime(2024, 10, 1, 0, 0, 0, 0);
            //
            // labelControl11
            //
            this.labelControl11.Location = new System.Drawing.Point(61, 388);
            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);
            this.labelControl11.TabIndex = 130;
            this.labelControl11.Text = "主键:";
            //
            // lbGuid
            //
            this.lbGuid.AutoSize = true;
            this.lbGuid.Location = new System.Drawing.Point(112, 388);
            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
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(1128, 682);
            this.Controls.Add(this.xtraTabControl1);
            this.Controls.Add(this.toolBarMenu1);
            this.Name = "FrmHolidy";
            ((System.ComponentModel.ISupportInitialize)(this.txt_name.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gcMain)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).EndInit();
            this.xtraTabControl1.ResumeLayout(false);
            this.xtraTabPage1.ResumeLayout(false);
            this.xtraTabPage2.ResumeLayout(false);
            this.panel1.ResumeLayout(false);
            this.panel1.PerformLayout();
            this.ResumeLayout(false);
        }
        #endregion
        private UserControl.ToolBarMenu toolBarMenu1;
        private DevExpress.XtraGrid.GridControl gcMain;
        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
        private DevExpress.XtraTab.XtraTabControl xtraTabControl1;
        private DevExpress.XtraTab.XtraTabPage xtraTabPage1;
        private DevExpress.XtraTab.XtraTabPage xtraTabPage2;
        private UserControls.Data.PageBar pageBar1;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Label lbGuid;
        private DevExpress.XtraEditors.LabelControl labelControl11;
        private DevExpress.XtraGrid.Columns.GridColumn gv_createTime;
        private DevExpress.XtraGrid.Columns.GridColumn gv_createBy;
        private DevExpress.XtraGrid.Columns.GridColumn gv_isStatus;
        private DevExpress.XtraGrid.Columns.GridColumn gv_interval;
        private DevExpress.XtraEditors.LabelControl lb_time2;
        private DevExpress.XtraGrid.Columns.GridColumn gv_time2;
        private DevExpress.XtraEditors.LabelControl lb_time1;
        private DevExpress.XtraGrid.Columns.GridColumn gv_time1;
        private DevExpress.XtraEditors.LabelControl lb_name;
        private DevExpress.XtraEditors.TextEdit txt_name;
        private DevExpress.XtraGrid.Columns.GridColumn gv_name;
        private System.Windows.Forms.DateTimePicker txt_time2;
        private System.Windows.Forms.DateTimePicker txt_time1;
        private DevExpress.XtraGrid.Columns.GridColumn weekdayName;
    }
}
DevApp/Gs.DevApp/DevFrm/BasicData/FrmHolidy.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,290 @@
using DevExpress.XtraEditors;
using DevExpress.XtraGrid.Views.Base;
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
{
    public partial class FrmHolidy : DevExpress.XtraEditors.XtraForm
    {
        public FrmHolidy()
        {
            InitializeComponent();
            this.toolBarMenu1.btnAddClick += ToolBarMenu1_btnAddClick;
            this.toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick;
            this.toolBarMenu1.btnSaveClick += ToolBarMenu1_btnSaveClick;
            this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
            this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
            gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
            gridView1.CustomDrawRowIndicator += GridView1_CustomDrawRowIndicator;
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            getPageList(1, UtilityHelper.GetPageSize());
        }
        private void GridView1_CustomDrawRowIndicator(object sender, RowIndicatorCustomDrawEventArgs e)
        {
            if (e.Info.IsRowIndicator && e.RowHandle >= 0)
            {
                e.Info.DisplayText = (e.RowHandle + 1).ToString();
            }
        }
        private void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            //// èŽ·å–GridView组件
            //GridView view = sender as GridView;
            //// ç¡®ä¿view不为null
            //if (view == null) return;
            //// èŽ·å–åº”ç”¨çš„ç­›é€‰å™¨ä¿¡æ¯
            //string filter = view.ActiveFilterString;
            //MessageBox.Show(filter);
            //getPageList(1, UtilityHelper.GetPageSize());
        }
        /// <summary>
        /// åŒå‡»äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            GridHitInfo info = gridView1.CalcHitInfo(e.Location);
            if (info.InRow)
            {
                GridView view = info.View as GridView;
                if (view != null)
                {
                    DataRow row = view.GetDataRow(info.RowHandle);
                    if (row != null)
                    {
                        string rowGuid = (row["guid"].ToString());
                        getModel(rowGuid, false, 999);
                    }
                }
            }
        }
        /// <summary>
        /// åˆ†é¡µäº‹ä»¶
        /// </summary>
        /// <param name="curPage"></param>
        /// <param name="pageSize"></param>
        private void PageBar1_PagerEvent(int curPage, int pageSize)
        {
            getPageList(curPage, pageSize);
        }
        /// <summary>
        /// æŸ¥è¯¢äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e)
        {
            Gs.DevApp.UserControl.ShowFilter frm = new Gs.DevApp.UserControl.ShowFilter(gridView1.Columns);
            frm.UpdateParent += Frm_UpdateParent;
            frm.ShowDialog();
        }
        /// <summary>
        /// æŸ¥è¯¢å›žè°ƒ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Frm_UpdateParent(object sender, UpdateParentEventArgs e)
        {
            string strWhere = e.Data;
            MessageBox.Show(strWhere);
        }
        /// <summary>
        /// å–消事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
        {
            UtilityHelper.ChangeTab(xtraTabControl1, 0);
        }
        /// <summary>
        /// åˆ é™¤äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
        {
            DataRow dr = gridView1.GetFocusedDataRow();
            if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString()))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + dr["name"].ToString() + "】,确定删除吗?"))
                return;
            var _obj = new
            {
                guidList = dr["guid"].ToString(),//主建
            };
            string strJson = "";
            try
            {
                strJson = UtilityHelper.HttpPost("", "Holiday/DeleteModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.ChangeTab(xtraTabControl1, 0);
                    getPageList(1, UtilityHelper.GetPageSize());
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        /// <summary>
        /// åˆ·æ–°äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e)
        {
            UtilityHelper.ChangeTab(xtraTabControl1, 0);
            getPageList(1, UtilityHelper.GetPageSize());
        }
        /// <summary>
        /// ä¿®æ”¹äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
        {
            DataRow dr = gridView1.GetFocusedDataRow();
            if (dr == null || string.IsNullOrEmpty(dr["guid"].ToString()))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(dr["guid"].ToString(), true, 1);
        }
        /// <summary>
        /// æ–°å¢žäº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
        {
            UtilityHelper.ChangeTab(xtraTabControl1, 1);
            lbGuid.Text = "";
            UtilityHelper.CleanValue(this.panel1.Controls, true);
        }
        /// <summary>
        /// ä¿å­˜äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
        {
            toolBarMenu1.isSetBtn = false;
            if (string.IsNullOrEmpty(txt_name.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("名称不能为空!");
                txt_name.Focus();
                return;
            }
            if (txt_time1.Value>=txt_time2.Value)
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("开始时间不能大于结束时间!");
                txt_time1.Focus();
                return;
            }
            var _obj = new
            {
                guid = lbGuid.Text.Trim(),//主建
                name = txt_name.Text.Trim(),
                time1=txt_time1.Value,
                time2 = txt_time2.Value,
            };
            try
            {
                string strJson = UtilityHelper.HttpPost("", "Holiday/EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
                {
                    lbGuid.Text = _rtn.rtnData;
                    toolBarMenu1.isSetBtn = true;
                    UtilityHelper.ChangeEnable(this.panel1.Controls, false);
                }
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="curPage">第几页</param>
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage, int pageSize)
        {
            PageQueryModel pgq = new PageQueryModel(curPage, pageSize, "time1", "asc", "", "");
            string json = JsonConvert.SerializeObject(pgq);
            try
            {
                string strReturn = UtilityHelper.HttpPost("", "Holiday/GetListPage", json);
                ReturnModel<PageListModel> dd = UtilityHelper.GetTableByJson(strReturn);
                DataTable dt = dd.rtnData.list;
                gcMain.BindingContext = new BindingContext();
                gcMain.DataSource = dt;
                gcMain.ForceInitialize();
                int dddd = dd.rtnData.pages;//总页
                pageBar1.TotalPages = dddd;
                pageBar1.RecordCount = dd.rtnData.total;//记录总数
                pageBar1.CurrentPage = curPage;//当前页
                pageBar1.RowsCount = pageSize;//每页显示
                pageBar1.setTxt();
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        {
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UtilityHelper.ChangeTab(xtraTabControl1, tabIdx);
            var _obj = new
            {
                guid = strGuid,//主建
            };
            try
            {
                string strJson = UtilityHelper.HttpPost("", "Holiday/GetModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.GetDataByJson(strJson);
                if (_rtn.rtnCode > 0)
                {
                    dynamic dy = _rtn.rtnData;
                    lbGuid.Text = strGuid;
                    UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit);
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/BasicData/FrmHolidy.resx
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,120 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
  <!--
    Microsoft ResX Schema
    Version 2.0
    The primary goals of this format is to allow a simple XML format
    that is mostly human readable. The generation and parsing of the
    various data types are done through the TypeConverter classes
    associated with the data types.
    Example:
    ... ado.net/XML headers & schema ...
    <resheader name="resmimetype">text/microsoft-resx</resheader>
    <resheader name="version">2.0</resheader>
    <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
    <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
    <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
    <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
    <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
        <value>[base64 mime encoded serialized .NET Framework object]</value>
    </data>
    <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
        <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
        <comment>This is a comment</comment>
    </data>
    There are any number of "resheader" rows that contain simple
    name/value pairs.
    Each data row contains a name, and value. The row also contains a
    type or mimetype. Type corresponds to a .NET class that support
    text/value conversion through the TypeConverter architecture.
    Classes that don't support this are serialized and stored with the
    mimetype set.
    The mimetype is used for serialized objects, and tells the
    ResXResourceReader how to depersist the object. This is currently not
    extensible. For a given mimetype the value must be set accordingly:
    Note - application/x-microsoft.net.object.binary.base64 is the format
    that the ResXResourceWriter will generate, however the reader can
    read any of the formats listed below.
    mimetype: application/x-microsoft.net.object.binary.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.soap.base64
    value   : The object must be serialized with
            : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
            : and then encoded with base64 encoding.
    mimetype: application/x-microsoft.net.object.bytearray.base64
    value   : The object must be serialized into a byte array
            : using a System.ComponentModel.TypeConverter
            : and then encoded with base64 encoding.
    -->
  <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
    <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
    <xsd:element name="root" msdata:IsDataSet="true">
      <xsd:complexType>
        <xsd:choice maxOccurs="unbounded">
          <xsd:element name="metadata">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" />
              </xsd:sequence>
              <xsd:attribute name="name" use="required" type="xsd:string" />
              <xsd:attribute name="type" type="xsd:string" />
              <xsd:attribute name="mimetype" type="xsd:string" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="assembly">
            <xsd:complexType>
              <xsd:attribute name="alias" type="xsd:string" />
              <xsd:attribute name="name" type="xsd:string" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="data">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
                <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
              <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
              <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
              <xsd:attribute ref="xml:space" />
            </xsd:complexType>
          </xsd:element>
          <xsd:element name="resheader">
            <xsd:complexType>
              <xsd:sequence>
                <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
              </xsd:sequence>
              <xsd:attribute name="name" type="xsd:string" use="required" />
            </xsd:complexType>
          </xsd:element>
        </xsd:choice>
      </xsd:complexType>
    </xsd:element>
  </xsd:schema>
  <resheader name="resmimetype">
    <value>text/microsoft-resx</value>
  </resheader>
  <resheader name="version">
    <value>2.0</value>
  </resheader>
  <resheader name="reader">
    <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
  <resheader name="writer">
    <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
  </resheader>
</root>
DevApp/Gs.DevApp/DevFrm/FrmLogin.cs
@@ -16,7 +16,10 @@
        public FrmLogin()
        {
            InitializeComponent();
            if (ConfigurationManager.AppSettings["IsAutoUpdater"] == "1")
            _autoUpdate();
            else
                getTree();
            this.Text = lbVersion.Text = System.Configuration.ConfigurationSettings.AppSettings.Get("ProductName").ToString();
            btnLogin.Click += BtnLogin_Click;
            btnCancel.Click += BtnCancel_Click;
DevApp/Gs.DevApp/DevFrm/User/SysMenu.Designer.cs
@@ -260,7 +260,7 @@
            this.txt_formPath.Properties.Appearance.Options.UseFont = true;
            this.txt_formPath.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.txt_formPath.Properties.DropDownRows = 100;
            this.txt_formPath.Properties.DropDownRows = 30;
            this.txt_formPath.Size = new System.Drawing.Size(297, 28);
            this.txt_formPath.TabIndex = 134;
            // 
@@ -281,7 +281,7 @@
            this.txt_name.Properties.Appearance.Options.UseFont = true;
            this.txt_name.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.txt_name.Properties.DropDownRows = 100;
            this.txt_name.Properties.DropDownRows = 30;
            this.txt_name.Size = new System.Drawing.Size(297, 28);
            this.txt_name.TabIndex = 3;
            // 
DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -138,6 +138,12 @@
    <Compile Include="DevFrm\BasicData\FrmDictionary.Designer.cs">
      <DependentUpon>FrmDictionary.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\BasicData\FrmHolidy.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="DevFrm\BasicData\FrmHolidy.Designer.cs">
      <DependentUpon>FrmHolidy.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\BasicData\FrmItemType.cs">
      <SubType>Form</SubType>
    </Compile>
@@ -300,6 +306,9 @@
    <EmbeddedResource Include="DevFrm\BasicData\FrmDepartment.resx">
      <DependentUpon>FrmDepartment.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="DevFrm\BasicData\FrmHolidy.resx">
      <DependentUpon>FrmHolidy.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="DevFrm\BasicData\FrmItemType.resx">
      <DependentUpon>FrmItemType.cs</DependentUpon>
    </EmbeddedResource>
DevApp/Gs.DevApp/ToolBox/UtilityHelper.cs
@@ -264,6 +264,15 @@
                            txt.Enabled = isEdt;
                            continue;
                        }
                        //时间
                        if (colType is DateTimePicker)
                        {
                            DateTimePicker txt = colType as DateTimePicker;
                            if (txt != null)
                                txt.Checked = (strVal.ToString() == "1" ? true : false);
                            txt.Enabled = isEdt;
                            continue;
                        }
                    }
                }
                catch (Exception ex)
@@ -335,7 +344,12 @@
                    ctrl.Enabled = isEdt;
                    continue;
                }
                //日期
                if (ctrl is DateTimePicker)
                {
                    ctrl.Enabled = isEdt;
                    continue;
                }
            }
        }