1
lu
2024-12-09 25d9b714b1027b036c759eaf44158b3b297bf421
1
已添加12个文件
已修改3个文件
2358 ■■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.Designer.cs 371 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs 312 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintUser.Designer.cs 413 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintUser.cs 307 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintUser.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Gs.DevApp.csproj 38 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookPrint.Designer.cs 133 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookPrint.cs 98 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookPrint.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookUser.Designer.cs 111 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookUser.cs 91 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/UserControl/UcLookUser.resx 120 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category1/category.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,371 @@
/* Create By GS EasyCode */
namespace Gs.DevApp.DevFrm
{
    partial class Frm_PrintInfo
    {
        /// <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.lb_remark = new DevExpress.XtraEditors.LabelControl();
            this.txt_remark = new DevExpress.XtraEditors.TextEdit();
            this.gv_remark = new DevExpress.XtraGrid.Columns.GridColumn();
            this.lb_port = new DevExpress.XtraEditors.LabelControl();
            this.txt_port = new DevExpress.XtraEditors.TextEdit();
            this.gv_port = new DevExpress.XtraGrid.Columns.GridColumn();
            this.lb_ip = new DevExpress.XtraEditors.LabelControl();
            this.txt_ip = new DevExpress.XtraEditors.TextEdit();
            this.gv_ip = new DevExpress.XtraGrid.Columns.GridColumn();
            this.lb_printNo = new DevExpress.XtraEditors.LabelControl();
            this.txt_printNo = new DevExpress.XtraEditors.TextEdit();
            this.gv_printNo = new DevExpress.XtraGrid.Columns.GridColumn();
            this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu();
            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.UcPageBar();
            this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
            this.panel1 = new System.Windows.Forms.Panel();
            this.labelControl11 = new DevExpress.XtraEditors.LabelControl();
            this.lbGuid = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.txt_remark.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_port.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_ip.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_printNo.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();
            //
            // lb_remark
            //
            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(70, 132);
            this.lb_remark.Name = "lb_remark";
            this.lb_remark.Size = new System.Drawing.Size(39, 21);
            this.lb_remark.TabIndex = 217;
            this.lb_remark.Text = "备注 ";
            //
            // txt_remark
            //
            this.txt_remark.Location = new System.Drawing.Point(117, 132);
            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.txt_remark.Size = new System.Drawing.Size(150, 28);
            this.txt_remark.TabIndex = 217;
            //
            // gv_remark
            //
            this.gv_remark.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_remark.AppearanceCell.Options.UseFont = true;
            this.gv_remark.Caption = "备注 ";
            this.gv_remark.FieldName = "remark";
            this.gv_remark.MinWidth = 50;
            this.gv_remark.Name = "gv_remark";
            this.gv_remark.OptionsColumn.AllowEdit = false;
            this.gv_remark.Tag = "query_a.remark";
            this.gv_remark.Visible = true;
            this.gv_remark.VisibleIndex = 3;
            this.gv_remark.Width = 94;
            //
            // lb_port
            //
            this.lb_port.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lb_port.Appearance.Options.UseFont = true;
            this.lb_port.Location = new System.Drawing.Point(19, 94);
            this.lb_port.Name = "lb_port";
            this.lb_port.Size = new System.Drawing.Size(90, 21);
            this.lb_port.TabIndex = 216;
            this.lb_port.Text = "打印机端口 ";
            //
            // txt_port
            //
            this.txt_port.Location = new System.Drawing.Point(117, 94);
            this.txt_port.Name = "txt_port";
            this.txt_port.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_port.Properties.Appearance.Options.UseFont = true;
            this.txt_port.Size = new System.Drawing.Size(150, 28);
            this.txt_port.TabIndex = 216;
            //
            // gv_port
            //
            this.gv_port.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_port.AppearanceCell.Options.UseFont = true;
            this.gv_port.Caption = "打印机端口 ";
            this.gv_port.FieldName = "port";
            this.gv_port.MinWidth = 50;
            this.gv_port.Name = "gv_port";
            this.gv_port.OptionsColumn.AllowEdit = false;
            this.gv_port.Tag = "query_a.port";
            this.gv_port.Visible = true;
            this.gv_port.VisibleIndex = 2;
            this.gv_port.Width = 94;
            //
            // lb_ip
            //
            this.lb_ip.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lb_ip.Appearance.Options.UseFont = true;
            this.lb_ip.Location = new System.Drawing.Point(38, 54);
            this.lb_ip.Name = "lb_ip";
            this.lb_ip.Size = new System.Drawing.Size(71, 21);
            this.lb_ip.TabIndex = 213;
            this.lb_ip.Text = "打印机IP ";
            //
            // txt_ip
            //
            this.txt_ip.Location = new System.Drawing.Point(117, 54);
            this.txt_ip.Name = "txt_ip";
            this.txt_ip.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_ip.Properties.Appearance.Options.UseFont = true;
            this.txt_ip.Size = new System.Drawing.Size(150, 28);
            this.txt_ip.TabIndex = 213;
            //
            // gv_ip
            //
            this.gv_ip.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_ip.AppearanceCell.Options.UseFont = true;
            this.gv_ip.Caption = "打印机IP ";
            this.gv_ip.FieldName = "ip";
            this.gv_ip.MinWidth = 50;
            this.gv_ip.Name = "gv_ip";
            this.gv_ip.OptionsColumn.AllowEdit = false;
            this.gv_ip.Tag = "query_a.ip";
            this.gv_ip.Visible = true;
            this.gv_ip.VisibleIndex = 1;
            this.gv_ip.Width = 94;
            //
            // lb_printNo
            //
            this.lb_printNo.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lb_printNo.Appearance.Options.UseFont = true;
            this.lb_printNo.Location = new System.Drawing.Point(19, 20);
            this.lb_printNo.Name = "lb_printNo";
            this.lb_printNo.Size = new System.Drawing.Size(90, 21);
            this.lb_printNo.TabIndex = 211;
            this.lb_printNo.Text = "打印机编号 ";
            //
            // txt_printNo
            //
            this.txt_printNo.Location = new System.Drawing.Point(117, 20);
            this.txt_printNo.Name = "txt_printNo";
            this.txt_printNo.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_printNo.Properties.Appearance.Options.UseFont = true;
            this.txt_printNo.Size = new System.Drawing.Size(150, 28);
            this.txt_printNo.TabIndex = 211;
            //
            // gv_printNo
            //
            this.gv_printNo.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_printNo.AppearanceCell.Options.UseFont = true;
            this.gv_printNo.Caption = "打印机编号 ";
            this.gv_printNo.FieldName = "printNo";
            this.gv_printNo.MinWidth = 50;
            this.gv_printNo.Name = "gv_printNo";
            this.gv_printNo.OptionsColumn.AllowEdit = false;
            this.gv_printNo.Tag = "query_a.print_no";
            this.gv_printNo.Visible = true;
            this.gv_printNo.VisibleIndex = 0;
            this.gv_printNo.Width = 94;
            //
            // toolBarMenu1
            //
            this.toolBarMenu1.chkParameter = null;
            this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top;
            this.toolBarMenu1.guidKey = null;
            this.toolBarMenu1.isSetBtn = false;
            this.toolBarMenu1.Location = new System.Drawing.Point(0, 0);
            this.toolBarMenu1.Name = "toolBarMenu1";
            this.toolBarMenu1.rptParameter = null;
            this.toolBarMenu1.Size = new System.Drawing.Size(1128, 80);
            this.toolBarMenu1.TabIndex = 0;
            this.toolBarMenu1.xlsInService = null;
            this.toolBarMenu1.xlsOutParameter = null;
            //
            // 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_printNo,
            this.gv_ip,
            this.gv_port,
            this.gv_remark});
            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.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.labelControl11);
            this.panel1.Controls.Add(this.lbGuid);
            this.panel1.Controls.Add(this.lb_remark);
            this.panel1.Controls.Add(this.txt_remark);
            this.panel1.Controls.Add(this.lb_port);
            this.panel1.Controls.Add(this.txt_port);
            this.panel1.Controls.Add(this.lb_ip);
            this.panel1.Controls.Add(this.txt_ip);
            this.panel1.Controls.Add(this.lb_printNo);
            this.panel1.Controls.Add(this.txt_printNo);
            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(441, 208);
            this.panel1.TabIndex = 1;
            //
            // labelControl11
            //
            this.labelControl11.Location = new System.Drawing.Point(334, 23);
            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 = "主键:";
            this.labelControl11.Visible = false;
            //
            // lbGuid
            //
            this.lbGuid.AutoSize = true;
            this.lbGuid.Location = new System.Drawing.Point(385, 23);
            this.lbGuid.Name = "lbGuid";
            this.lbGuid.Size = new System.Drawing.Size(0, 21);
            this.lbGuid.TabIndex = 1;
            this.lbGuid.Visible = false;
            //
            // Frm_PrintInfo
            //
            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 = "Frm_PrintInfo";
            ((System.ComponentModel.ISupportInitialize)(this.txt_remark.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_port.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_ip.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_printNo.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.UcToolBarMenu 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.UcPageBar pageBar1;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Label lbGuid;
        private DevExpress.XtraEditors.LabelControl labelControl11;
       //BQCreateConrolObejct
private DevExpress.XtraEditors.LabelControl lb_remark;
private DevExpress.XtraEditors.TextEdit txt_remark;
 private DevExpress.XtraGrid.Columns.GridColumn gv_remark;
private DevExpress.XtraEditors.LabelControl lb_port;
private DevExpress.XtraEditors.TextEdit txt_port;
 private DevExpress.XtraGrid.Columns.GridColumn gv_port;
private DevExpress.XtraEditors.LabelControl lb_ip;
private DevExpress.XtraEditors.TextEdit txt_ip;
 private DevExpress.XtraGrid.Columns.GridColumn gv_ip;
private DevExpress.XtraEditors.LabelControl lb_printNo;
private DevExpress.XtraEditors.TextEdit txt_printNo;
 private DevExpress.XtraGrid.Columns.GridColumn gv_printNo;
    }
}
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,312 @@
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using MES.Service.Modes;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm
{
    public partial class Frm_PrintInfo : DevExpress.XtraEditors.XtraForm
    {
        string _webServiceName = "PrintInfoManager/";
        List<FilterEntity> _filterList = new List<FilterEntity>();
        public Frm_PrintInfo()
        {
            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;
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1);
        }
        private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
            await Task.Delay(100);
            getPageList(1);
        }
        /// <summary>
        /// åŒå‡»äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
            if (!string.IsNullOrEmpty(rowGuid))
                getModel(rowGuid, false, 999);
        }
        /// <summary>
        /// åˆ†é¡µäº‹ä»¶
        /// </summary>
        /// <param name="curPage"></param>
        /// <param name="pageSize"></param>
        private void PageBar1_PagerEvent(int curPage, int pageSize)
        {
            getPageList(curPage);
        }
        /// <summary>
        /// æŸ¥è¯¢äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e)
        {
            gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
            gridView1.ActiveFilter.Clear();
            gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
            var frm = new ShowFilter(gridView1.Columns, _filterList);
            frm.UpdateParent += Frm_UpdateParent;
            frm.ShowDialog();
        }
        /// <summary>
        /// æŸ¥è¯¢å›žè°ƒ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Frm_UpdateParent(object sender, UpdateParentEventArgs e)
        {
            _filterList = e.FilterList;
            getPageList(1);
        }
        /// <summary>
        /// å–消事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 0);
        }
        /// <summary>
        /// åˆ é™¤äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
        {
            string rowGuid = "", rowName = "";
           (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_printNo, gridView1);
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?"))
                return;
            List<dynamic> lst = new List<dynamic>();
            lst.Add(rowGuid);
            var _obj = lst;
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "DeleteModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    getPageList(1);
                }
                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)
        {
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim(), false, 999);
            else
            {
                _filterList.Clear();
                if (gridView1.ActiveFilter.Count > 0)
                {
                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                    gridView1.ActiveFilter.Clear();
                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                }
                getPageList(1);
            }
        }
        /// <summary>
        /// ä¿®æ”¹äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
        {
            string rowGuid = "", rowName = "";
           (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_printNo, gridView1);
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
        }
        /// <summary>
        /// æ–°å¢žäº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 1);
            lbGuid.Text = "";
            UtilityHelper.CleanValueByControl(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_printNo.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("编号不能为空!");
                txt_printNo.Focus();
                return;
            }
            if (string.IsNullOrEmpty(txt_ip.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("IP不能为空!");
                txt_printNo.Focus();
                return;
            }
            if (string.IsNullOrEmpty(txt_port.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("端口不能为空!");
                txt_printNo.Focus();
                return;
            }
            var _obj = new PrintInfo
            {
                Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建
                PrintNo= txt_printNo.Text.Trim(),
                Ip = txt_ip.Text.Trim(),
                Port= txt_port.Text.Trim(),
                Remark = txt_remark.Text.Trim(),
            };
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
                {
                    lbGuid.Text = _rtn.rtnData;
                    toolBarMenu1.isSetBtn = true;
                    UtilityHelper.ChangeEnableByControl(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)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.print_no",
            "asc", "", _sbSqlWhere.ToString());
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
                var strReturn =  UtilityHelper.HttpPost("",
                    _webServiceName + "GetListPage", json);
                var dd = UtilityHelper.ReturnToTablePage(strReturn);
                if (dd.rtnCode > 0)
                {
                    DataTable dt = dd.rtnData.list;
                    gcMain.BindingContext = new BindingContext();
                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                    if (dt.Rows.Count > 0)
                    {
                        gcMain.DataSource = dt;
                        gcMain.ForceInitialize();
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain, gridView1);
                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                    pageBar1.TotalPages = dd.rtnData.pages;//总页
                    pageBar1.CurrentPage = curPage;//当前页
                    pageBar1.RecordCount = dd.rtnData.total;//总记录数
                }
                else
                {
                    ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg);
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="strGuid">主键</param>
        /// <param name="isEdit">是否可编辑</param>
        /// <param name="tabIdx">选项卡序号</param>
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        {
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
            var _obj = new
            {
                guid = strGuid,//主建
            };
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj));
                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);
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintInfo.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/Sys/Frm_PrintUser.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,413 @@
/* Create By GS EasyCode */
namespace Gs.DevApp.DevFrm
{
    partial class Frm_PrintUser
    {
        /// <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.lb_isStatus = new DevExpress.XtraEditors.LabelControl();
            this.txt_isStatus = new DevExpress.XtraEditors.TextEdit();
            this.gv_isStatus = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_sysParam = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_remark2 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.lb_remark1 = new DevExpress.XtraEditors.LabelControl();
            this.txt_remark1 = new DevExpress.XtraEditors.TextEdit();
            this.gv_remark1 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.lb_printId = new DevExpress.XtraEditors.LabelControl();
            this.gv_printId = new DevExpress.XtraGrid.Columns.GridColumn();
            this.lb_userId = new DevExpress.XtraEditors.LabelControl();
            this.gv_userId = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_guid = new DevExpress.XtraGrid.Columns.GridColumn();
            this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu();
            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.UcPageBar();
            this.xtraTabPage2 = new DevExpress.XtraTab.XtraTabPage();
            this.panel1 = new System.Windows.Forms.Panel();
            this.txt_printId = new Gs.DevApp.UserControl.UcLookPrint();
            this.txt_userId = new Gs.DevApp.UserControl.UcLookUser();
            this.labelControl11 = new DevExpress.XtraEditors.LabelControl();
            this.lbGuid = new System.Windows.Forms.Label();
            ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_remark1.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();
            //
            // 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(32, 97);
            this.lb_isStatus.Name = "lb_isStatus";
            this.lb_isStatus.Size = new System.Drawing.Size(74, 21);
            this.lb_isStatus.TabIndex = 222;
            this.lb_isStatus.Text = "是否启用:";
            //
            // txt_isStatus
            //
            this.txt_isStatus.Location = new System.Drawing.Point(126, 97);
            this.txt_isStatus.Name = "txt_isStatus";
            this.txt_isStatus.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_isStatus.Properties.Appearance.Options.UseFont = true;
            this.txt_isStatus.Size = new System.Drawing.Size(194, 28);
            this.txt_isStatus.TabIndex = 222;
            //
            // 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 = "isStatus";
            this.gv_isStatus.MinWidth = 50;
            this.gv_isStatus.Name = "gv_isStatus";
            this.gv_isStatus.OptionsColumn.AllowEdit = false;
            this.gv_isStatus.Tag = "query_a.is_status";
            this.gv_isStatus.Visible = true;
            this.gv_isStatus.VisibleIndex = 6;
            this.gv_isStatus.Width = 94;
            //
            // gv_sysParam
            //
            this.gv_sysParam.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_sysParam.AppearanceCell.Options.UseFont = true;
            this.gv_sysParam.Caption = "是否系统参数 ";
            this.gv_sysParam.FieldName = "sysParam";
            this.gv_sysParam.MinWidth = 50;
            this.gv_sysParam.Name = "gv_sysParam";
            this.gv_sysParam.OptionsColumn.AllowEdit = false;
            this.gv_sysParam.Tag = "query_a.sys_param";
            this.gv_sysParam.Visible = true;
            this.gv_sysParam.VisibleIndex = 5;
            this.gv_sysParam.Width = 94;
            //
            // gv_remark2
            //
            this.gv_remark2.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_remark2.AppearanceCell.Options.UseFont = true;
            this.gv_remark2.Caption = "备注2 ";
            this.gv_remark2.FieldName = "remark2";
            this.gv_remark2.MinWidth = 50;
            this.gv_remark2.Name = "gv_remark2";
            this.gv_remark2.OptionsColumn.AllowEdit = false;
            this.gv_remark2.Tag = "query_a.remark2";
            this.gv_remark2.Visible = true;
            this.gv_remark2.VisibleIndex = 4;
            this.gv_remark2.Width = 94;
            //
            // lb_remark1
            //
            this.lb_remark1.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lb_remark1.Appearance.Options.UseFont = true;
            this.lb_remark1.Location = new System.Drawing.Point(66, 131);
            this.lb_remark1.Name = "lb_remark1";
            this.lb_remark1.Size = new System.Drawing.Size(40, 21);
            this.lb_remark1.TabIndex = 216;
            this.lb_remark1.Text = "备注:";
            //
            // txt_remark1
            //
            this.txt_remark1.Location = new System.Drawing.Point(126, 131);
            this.txt_remark1.Name = "txt_remark1";
            this.txt_remark1.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.txt_remark1.Properties.Appearance.Options.UseFont = true;
            this.txt_remark1.Size = new System.Drawing.Size(194, 28);
            this.txt_remark1.TabIndex = 216;
            //
            // gv_remark1
            //
            this.gv_remark1.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_remark1.AppearanceCell.Options.UseFont = true;
            this.gv_remark1.Caption = "备注1 ";
            this.gv_remark1.FieldName = "remark1";
            this.gv_remark1.MinWidth = 50;
            this.gv_remark1.Name = "gv_remark1";
            this.gv_remark1.OptionsColumn.AllowEdit = false;
            this.gv_remark1.Tag = "query_a.remark1";
            this.gv_remark1.Visible = true;
            this.gv_remark1.VisibleIndex = 3;
            this.gv_remark1.Width = 94;
            //
            // lb_printId
            //
            this.lb_printId.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lb_printId.Appearance.Options.UseFont = true;
            this.lb_printId.Location = new System.Drawing.Point(49, 61);
            this.lb_printId.Name = "lb_printId";
            this.lb_printId.Size = new System.Drawing.Size(57, 21);
            this.lb_printId.TabIndex = 213;
            this.lb_printId.Text = "打印机:";
            //
            // gv_printId
            //
            this.gv_printId.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_printId.AppearanceCell.Options.UseFont = true;
            this.gv_printId.Caption = "打印机id ";
            this.gv_printId.FieldName = "printId";
            this.gv_printId.MinWidth = 50;
            this.gv_printId.Name = "gv_printId";
            this.gv_printId.OptionsColumn.AllowEdit = false;
            this.gv_printId.Tag = "query_a.print_id";
            this.gv_printId.Visible = true;
            this.gv_printId.VisibleIndex = 2;
            this.gv_printId.Width = 94;
            //
            // lb_userId
            //
            this.lb_userId.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lb_userId.Appearance.Options.UseFont = true;
            this.lb_userId.Location = new System.Drawing.Point(66, 20);
            this.lb_userId.Name = "lb_userId";
            this.lb_userId.Size = new System.Drawing.Size(40, 21);
            this.lb_userId.TabIndex = 211;
            this.lb_userId.Text = "用户:";
            //
            // gv_userId
            //
            this.gv_userId.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_userId.AppearanceCell.Options.UseFont = true;
            this.gv_userId.Caption = "用户id ";
            this.gv_userId.FieldName = "userId";
            this.gv_userId.MinWidth = 50;
            this.gv_userId.Name = "gv_userId";
            this.gv_userId.OptionsColumn.AllowEdit = false;
            this.gv_userId.Tag = "query_a.user_id";
            this.gv_userId.Visible = true;
            this.gv_userId.VisibleIndex = 1;
            this.gv_userId.Width = 94;
            //
            // gv_guid
            //
            this.gv_guid.AppearanceCell.Font = new System.Drawing.Font("Tahoma", 10F);
            this.gv_guid.AppearanceCell.Options.UseFont = true;
            this.gv_guid.Caption = "主键 ";
            this.gv_guid.FieldName = "guid";
            this.gv_guid.MinWidth = 50;
            this.gv_guid.Name = "gv_guid";
            this.gv_guid.OptionsColumn.AllowEdit = false;
            this.gv_guid.Tag = "query_a.guid";
            this.gv_guid.Visible = true;
            this.gv_guid.VisibleIndex = 0;
            this.gv_guid.Width = 94;
            //
            // toolBarMenu1
            //
            this.toolBarMenu1.chkParameter = null;
            this.toolBarMenu1.Dock = System.Windows.Forms.DockStyle.Top;
            this.toolBarMenu1.guidKey = null;
            this.toolBarMenu1.isSetBtn = false;
            this.toolBarMenu1.Location = new System.Drawing.Point(0, 0);
            this.toolBarMenu1.Name = "toolBarMenu1";
            this.toolBarMenu1.rptParameter = null;
            this.toolBarMenu1.Size = new System.Drawing.Size(1128, 80);
            this.toolBarMenu1.TabIndex = 0;
            this.toolBarMenu1.xlsInService = null;
            this.toolBarMenu1.xlsOutParameter = null;
            //
            // 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_guid,
            this.gv_userId,
            this.gv_printId,
            this.gv_remark1,
            this.gv_remark2,
            this.gv_sysParam,
            this.gv_isStatus});
            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.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_printId);
            this.panel1.Controls.Add(this.txt_userId);
            this.panel1.Controls.Add(this.labelControl11);
            this.panel1.Controls.Add(this.lbGuid);
            this.panel1.Controls.Add(this.lb_isStatus);
            this.panel1.Controls.Add(this.txt_isStatus);
            this.panel1.Controls.Add(this.lb_remark1);
            this.panel1.Controls.Add(this.txt_remark1);
            this.panel1.Controls.Add(this.lb_printId);
            this.panel1.Controls.Add(this.lb_userId);
            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(664, 264);
            this.panel1.TabIndex = 1;
            //
            // txt_printId
            //
            this.txt_printId.IsReadly = false;
            this.txt_printId.Location = new System.Drawing.Point(126, 55);
            this.txt_printId.Name = "txt_printId";
            this.txt_printId.Size = new System.Drawing.Size(194, 30);
            this.txt_printId.TabIndex = 224;
            //
            // txt_userId
            //
            this.txt_userId.IsReadly = false;
            this.txt_userId.Location = new System.Drawing.Point(126, 20);
            this.txt_userId.Name = "txt_userId";
            this.txt_userId.Size = new System.Drawing.Size(194, 30);
            this.txt_userId.TabIndex = 223;
            //
            // labelControl11
            //
            this.labelControl11.Location = new System.Drawing.Point(403, 30);
            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(454, 30);
            this.lbGuid.Name = "lbGuid";
            this.lbGuid.Size = new System.Drawing.Size(0, 21);
            this.lbGuid.TabIndex = 1;
            //
            // Frm_PrintUser
            //
            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 = "Frm_PrintUser";
            ((System.ComponentModel.ISupportInitialize)(this.txt_isStatus.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.txt_remark1.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.UcToolBarMenu 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.UcPageBar pageBar1;
        private System.Windows.Forms.Panel panel1;
        private System.Windows.Forms.Label lbGuid;
        private DevExpress.XtraEditors.LabelControl labelControl11;
       //BQCreateConrolObejct
private DevExpress.XtraEditors.LabelControl lb_isStatus;
private DevExpress.XtraEditors.TextEdit txt_isStatus;
 private DevExpress.XtraGrid.Columns.GridColumn gv_isStatus;
 private DevExpress.XtraGrid.Columns.GridColumn gv_sysParam;
 private DevExpress.XtraGrid.Columns.GridColumn gv_remark2;
private DevExpress.XtraEditors.LabelControl lb_remark1;
private DevExpress.XtraEditors.TextEdit txt_remark1;
 private DevExpress.XtraGrid.Columns.GridColumn gv_remark1;
private DevExpress.XtraEditors.LabelControl lb_printId;
 private DevExpress.XtraGrid.Columns.GridColumn gv_printId;
private DevExpress.XtraEditors.LabelControl lb_userId;
 private DevExpress.XtraGrid.Columns.GridColumn gv_userId;
 private DevExpress.XtraGrid.Columns.GridColumn gv_guid;
        private UserControl.UcLookUser txt_userId;
        private UserControl.UcLookPrint txt_printId;
    }
}
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintUser.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,307 @@
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using MES.Service.Modes;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.Data;
using System.Drawing;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm
{
    public partial class Frm_PrintUser : DevExpress.XtraEditors.XtraForm
    {
        string _webServiceName = "PrintUserManager/";
        List<FilterEntity> _filterList = new List<FilterEntity>();
        public Frm_PrintUser()
        {
            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;
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1);
        }
        private async void GridView1_ColumnFilterChanged(object sender, EventArgs e)
        {
            _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns);
            await Task.Delay(100);
            getPageList(1);
        }
        /// <summary>
        /// åŒå‡»äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void GcMain_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            string rowGuid = Gs.DevApp.ToolBox.UtilityHelper.GetCurrentDoubleRow(gridView1, e, "guid");
            if (!string.IsNullOrEmpty(rowGuid))
                getModel(rowGuid, false, 999);
        }
        /// <summary>
        /// åˆ†é¡µäº‹ä»¶
        /// </summary>
        /// <param name="curPage"></param>
        /// <param name="pageSize"></param>
        private void PageBar1_PagerEvent(int curPage, int pageSize)
        {
            getPageList(curPage);
        }
        /// <summary>
        /// æŸ¥è¯¢äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e)
        {
            gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
            gridView1.ActiveFilter.Clear();
            gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
            var frm = new ShowFilter(gridView1.Columns, _filterList);
            frm.UpdateParent += Frm_UpdateParent;
            frm.ShowDialog();
        }
        /// <summary>
        /// æŸ¥è¯¢å›žè°ƒ
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void Frm_UpdateParent(object sender, UpdateParentEventArgs e)
        {
            _filterList = e.FilterList;
            getPageList(1);
        }
        /// <summary>
        /// å–消事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEscClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 0);
        }
        /// <summary>
        /// åˆ é™¤äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_remark1, gridView1);
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?"))
                return;
            List<dynamic> lst = new List<dynamic>();
            lst.Add(rowGuid);
            var _obj = lst;
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "DeleteModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    UtilityHelper.JumpToTab(xtraTabControl1, 0);
                    getPageList(1);
                }
                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)
        {
            if (xtraTabControl1.SelectedTabPageIndex == 1)
                getModel(lbGuid.Text.Trim(), false, 999);
            else
            {
                _filterList.Clear();
                if (gridView1.ActiveFilter.Count > 0)
                {
                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                    gridView1.ActiveFilter.Clear();
                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                }
                getPageList(1);
            }
        }
        /// <summary>
        /// ä¿®æ”¹äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_remark1, gridView1);
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            getModel(rowGuid, true, 1);
        }
        /// <summary>
        /// æ–°å¢žäº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnAddClick(object sender, EventArgs e)
        {
            UtilityHelper.JumpToTab(xtraTabControl1, 1);
            lbGuid.Text = "";
            UtilityHelper.CleanValueByControl(this.panel1.Controls, true);
        }
        /// <summary>
        /// ä¿å­˜äº‹ä»¶
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e)
        {
            string _userId = txt_userId.GetGuid();
            string _printId = txt_printId.GetGuid();
            toolBarMenu1.isSetBtn = false;
            if (string.IsNullOrEmpty(_userId))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择用户!");
                txt_userId.Focus();
                return;
            }
            if (string.IsNullOrEmpty(_printId))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("请选择打印机!");
                txt_printId.Focus();
                return;
            }
            var _obj = new PrintUser
            {
                Guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建
                UserId = UtilityHelper.ToGuid(_userId),
                PrintId = UtilityHelper.ToGuid(_printId),
                Remark1 = txt_remark1.Text.Trim()
            };
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
                {
                    lbGuid.Text = _rtn.rtnData;
                    toolBarMenu1.isSetBtn = true;
                    UtilityHelper.ChangeEnableByControl(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)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.user_id",
            "asc", "", _sbSqlWhere.ToString());
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
                var strReturn = UtilityHelper.HttpPost("",
                    _webServiceName + "GetListPage", json);
                var dd = UtilityHelper.ReturnToTablePage(strReturn);
                if (dd.rtnCode > 0)
                {
                    DataTable dt = dd.rtnData.list;
                    gcMain.BindingContext = new BindingContext();
                    gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged;
                    if (dt.Rows.Count > 0)
                    {
                        gcMain.DataSource = dt;
                        gcMain.ForceInitialize();
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain, gridView1);
                    gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged;
                    pageBar1.TotalPages = dd.rtnData.pages;//总页
                    pageBar1.CurrentPage = curPage;//当前页
                    pageBar1.RecordCount = dd.rtnData.total;//总记录数
                }
                else
                {
                    ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg);
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        /// <summary>
        ///
        /// </summary>
        /// <param name="strGuid">主键</param>
        /// <param name="isEdit">是否可编辑</param>
        /// <param name="tabIdx">选项卡序号</param>
        private void getModel(string strGuid, bool isEdit, int tabIdx)
        {
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            UtilityHelper.JumpToTab(xtraTabControl1, tabIdx);
            var _obj = new
            {
                guid = strGuid,//主建
            };
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "GetModel", JsonConvert.SerializeObject(_obj));
                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);
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
    }
}
DevApp/Gs.DevApp/DevFrm/Sys/Frm_PrintUser.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/Gs.DevApp.csproj
@@ -356,6 +356,20 @@
    <Compile Include="DevFrm\Sys\Frm_MesSysPageview.Designer.cs">
      <DependentUpon>Frm_MesSysPageview.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\Sys\Frm_PrintInfo.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="DevFrm\Sys\Frm_PrintInfo.Designer.cs">
      <DependentUpon>Frm_PrintInfo.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\Sys\Frm_PrintUser.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="DevFrm\Sys\Frm_PrintUser.Designer.cs">
      <DependentUpon>Frm_PrintUser.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\Sys\Mode\PrintInfo.cs" />
    <Compile Include="DevFrm\Sys\Mode\PrintUser.cs" />
    <Compile Include="DevFrm\Sys\SysHelp.cs">
      <SubType>Form</SubType>
    </Compile>
@@ -607,6 +621,12 @@
    <Compile Include="UserControl\UcLookOrg.Designer.cs">
      <DependentUpon>UcLookOrg.cs</DependentUpon>
    </Compile>
    <Compile Include="UserControl\UcLookPrint.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Include="UserControl\UcLookPrint.Designer.cs">
      <DependentUpon>UcLookPrint.cs</DependentUpon>
    </Compile>
    <Compile Include="UserControl\UcLookStaff.cs">
      <SubType>UserControl</SubType>
    </Compile>
@@ -624,6 +644,12 @@
    </Compile>
    <Compile Include="UserControl\UcLookUnit.Designer.cs">
      <DependentUpon>UcLookUnit.cs</DependentUpon>
    </Compile>
    <Compile Include="UserControl\UcLookUser.cs">
      <SubType>UserControl</SubType>
    </Compile>
    <Compile Include="UserControl\UcLookUser.Designer.cs">
      <DependentUpon>UcLookUser.cs</DependentUpon>
    </Compile>
    <Compile Include="UserControl\UcLookWorkline.cs">
      <SubType>UserControl</SubType>
@@ -746,6 +772,12 @@
    <EmbeddedResource Include="DevFrm\Sys\Frm_MesSysPageview.resx">
      <DependentUpon>Frm_MesSysPageview.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="DevFrm\Sys\Frm_PrintInfo.resx">
      <DependentUpon>Frm_PrintInfo.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="DevFrm\Sys\Frm_PrintUser.resx">
      <DependentUpon>Frm_PrintUser.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="DevFrm\Sys\SysHelp.resx">
      <DependentUpon>SysHelp.cs</DependentUpon>
    </EmbeddedResource>
@@ -863,6 +895,9 @@
    <EmbeddedResource Include="UserControl\UcLookOrg.resx">
      <DependentUpon>UcLookOrg.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="UserControl\UcLookPrint.resx">
      <DependentUpon>UcLookPrint.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="UserControl\UcLookStaff.resx">
      <DependentUpon>UcLookStaff.cs</DependentUpon>
    </EmbeddedResource>
@@ -872,6 +907,9 @@
    <EmbeddedResource Include="UserControl\UcLookUnit.resx">
      <DependentUpon>UcLookUnit.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="UserControl\UcLookUser.resx">
      <DependentUpon>UcLookUser.cs</DependentUpon>
    </EmbeddedResource>
    <EmbeddedResource Include="UserControl\UcLookWorkline.resx">
      <DependentUpon>UcLookWorkline.cs</DependentUpon>
    </EmbeddedResource>
DevApp/Gs.DevApp/UserControl/UcLookPrint.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,133 @@
namespace Gs.DevApp.UserControl
{
    partial class UcLookPrint
    {
        /// <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 Component 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.lookSearchSupplier = new DevExpress.XtraEditors.SearchLookUpEdit();
            this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn1 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn3 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
            ((System.ComponentModel.ISupportInitialize)(this.lookSearchSupplier.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
            this.SuspendLayout();
            //
            // lookSearchSupplier
            //
            this.lookSearchSupplier.Dock = System.Windows.Forms.DockStyle.Fill;
            this.lookSearchSupplier.EditValue = "请选择";
            this.lookSearchSupplier.Location = new System.Drawing.Point(0, 0);
            this.lookSearchSupplier.Name = "lookSearchSupplier";
            this.lookSearchSupplier.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lookSearchSupplier.Properties.Appearance.Options.UseFont = true;
            this.lookSearchSupplier.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.lookSearchSupplier.Properties.PopupView = this.searchLookUpEdit1View;
            this.lookSearchSupplier.Size = new System.Drawing.Size(327, 28);
            this.lookSearchSupplier.TabIndex = 12;
            //
            // searchLookUpEdit1View
            //
            this.searchLookUpEdit1View.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gridColumn2,
            this.gridColumn5,
            this.gridColumn1,
            this.gridColumn3,
            this.gridColumn4});
            this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
            this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
            this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
            //
            // gridColumn2
            //
            this.gridColumn2.Caption = "打印机编号";
            this.gridColumn2.FieldName = "printNo";
            this.gridColumn2.MinWidth = 80;
            this.gridColumn2.Name = "gridColumn2";
            this.gridColumn2.UnboundDataType = typeof(string);
            this.gridColumn2.Visible = true;
            this.gridColumn2.VisibleIndex = 0;
            this.gridColumn2.Width = 80;
            //
            // gridColumn5
            //
            this.gridColumn5.Caption = "打印机IP";
            this.gridColumn5.FieldName = "ip";
            this.gridColumn5.Name = "gridColumn5";
            this.gridColumn5.Visible = true;
            this.gridColumn5.VisibleIndex = 1;
            //
            // gridColumn1
            //
            this.gridColumn1.Caption = "端口";
            this.gridColumn1.FieldName = "port";
            this.gridColumn1.Name = "gridColumn1";
            this.gridColumn1.Visible = true;
            this.gridColumn1.VisibleIndex = 2;
            //
            // gridColumn3
            //
            this.gridColumn3.Caption = "备注";
            this.gridColumn3.FieldName = "remark";
            this.gridColumn3.Name = "gridColumn3";
            this.gridColumn3.Visible = true;
            this.gridColumn3.VisibleIndex = 3;
            //
            // gridColumn4
            //
            this.gridColumn4.Caption = "guid";
            this.gridColumn4.FieldName = "guid";
            this.gridColumn4.Name = "gridColumn4";
            //
            // UcLookPrint
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.lookSearchSupplier);
            this.Name = "UcLookPrint";
            this.Size = new System.Drawing.Size(327, 30);
            ((System.ComponentModel.ISupportInitialize)(this.lookSearchSupplier.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
            this.ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraEditors.SearchLookUpEdit lookSearchSupplier;
        private DevExpress.XtraGrid.Views.Grid.GridView searchLookUpEdit1View;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn5;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn4;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn1;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn3;
    }
}
DevApp/Gs.DevApp/UserControl/UcLookPrint.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,98 @@
using DevExpress.XtraEditors;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.UserControl
{
    public partial class UcLookPrint : DevExpress.XtraEditors.XtraUserControl
    {
        public UcLookPrint()
        {
            InitializeComponent();
            lookSearchSupplier.Properties.NullText = "请选择";
            lookSearchSupplier.EditValueChanged +=
                LookSearchSupplier_EditValueChanged;
            getSuppler();
        }
        public bool IsReadly { get; set; }
        /// <summary>
        ///     æ”¹å˜äº‹ä»¶
        /// </summary>
        public event EventHandler EditChanged;
        private void LookSearchSupplier_EditValueChanged(object sender,
            EventArgs e)
        {
            if (EditChanged != null) EditChanged(this, e);
        }
        private void getSuppler()
        {
            var pgq = new PageQueryModel(1, 999999, "print_no", "asc", "", " and 1=1");
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
                var strReturn = UtilityHelper.HttpPost("", "PrintInfoManager/GetListPage", json);
                var rtn = UtilityHelper.ReturnToTablePage(strReturn);
                var dt = rtn.rtnData.list;
                lookSearchSupplier.Properties.DataSource = dt;
                lookSearchSupplier.Properties.DisplayMember = "printNo";
                lookSearchSupplier.Properties.ValueMember = "guid";
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        public string GetGuid()
        {
            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
            if (row != null)
            {
                string id = row["guid"].ToString();
                return id;
            }
            return "";
        }
        public string GetCode()
        {
            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
            if (row != null)
            {
                string id = row["printNo"].ToString();
                return id;
            }
            return "";
        }
        public string GetName()
        {
            var name = lookSearchSupplier.Text.Trim();
            return name;
        }
        public void SetIdOrCode(string Code)
        {
            if (Code == "-1" || string.IsNullOrEmpty(Code))
            {
                lookSearchSupplier.EditValue = null;
                return;
            }
            //lookSearchSupplier.EditValue = Int64.Parse(((Code.ToString().Trim())));
            lookSearchSupplier.EditValue = (((Code.ToString().Trim())));
        }
    }
}
DevApp/Gs.DevApp/UserControl/UcLookPrint.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/UserControl/UcLookUser.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,111 @@
namespace Gs.DevApp.UserControl
{
    partial class UcLookUser
    {
        /// <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 Component 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.lookSearchSupplier = new DevExpress.XtraEditors.SearchLookUpEdit();
            this.searchLookUpEdit1View = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn5 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gridColumn4 = new DevExpress.XtraGrid.Columns.GridColumn();
            ((System.ComponentModel.ISupportInitialize)(this.lookSearchSupplier.Properties)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).BeginInit();
            this.SuspendLayout();
            //
            // lookSearchSupplier
            //
            this.lookSearchSupplier.Dock = System.Windows.Forms.DockStyle.Fill;
            this.lookSearchSupplier.EditValue = "请选择";
            this.lookSearchSupplier.Location = new System.Drawing.Point(0, 0);
            this.lookSearchSupplier.Name = "lookSearchSupplier";
            this.lookSearchSupplier.Properties.Appearance.Font = new System.Drawing.Font("Tahoma", 10F);
            this.lookSearchSupplier.Properties.Appearance.Options.UseFont = true;
            this.lookSearchSupplier.Properties.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)});
            this.lookSearchSupplier.Properties.PopupView = this.searchLookUpEdit1View;
            this.lookSearchSupplier.Size = new System.Drawing.Size(321, 28);
            this.lookSearchSupplier.TabIndex = 11;
            //
            // searchLookUpEdit1View
            //
            this.searchLookUpEdit1View.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.gridColumn2,
            this.gridColumn5,
            this.gridColumn4});
            this.searchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus;
            this.searchLookUpEdit1View.Name = "searchLookUpEdit1View";
            this.searchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = false;
            this.searchLookUpEdit1View.OptionsView.ShowGroupPanel = false;
            //
            // gridColumn2
            //
            this.gridColumn2.Caption = "用户名称";
            this.gridColumn2.FieldName = "userName";
            this.gridColumn2.MinWidth = 80;
            this.gridColumn2.Name = "gridColumn2";
            this.gridColumn2.UnboundDataType = typeof(string);
            this.gridColumn2.Visible = true;
            this.gridColumn2.VisibleIndex = 0;
            this.gridColumn2.Width = 80;
            //
            // gridColumn5
            //
            this.gridColumn5.Caption = "用户账号";
            this.gridColumn5.FieldName = "account";
            this.gridColumn5.Name = "gridColumn5";
            this.gridColumn5.Visible = true;
            this.gridColumn5.VisibleIndex = 1;
            //
            // gridColumn4
            //
            this.gridColumn4.Caption = "guid";
            this.gridColumn4.FieldName = "guid";
            this.gridColumn4.Name = "gridColumn4";
            //
            // UcLookUser
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.Controls.Add(this.lookSearchSupplier);
            this.Name = "UcLookUser";
            this.Size = new System.Drawing.Size(321, 30);
            ((System.ComponentModel.ISupportInitialize)(this.lookSearchSupplier.Properties)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.searchLookUpEdit1View)).EndInit();
            this.ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraEditors.SearchLookUpEdit lookSearchSupplier;
        private DevExpress.XtraGrid.Views.Grid.GridView searchLookUpEdit1View;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn2;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn5;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn4;
    }
}
DevApp/Gs.DevApp/UserControl/UcLookUser.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,91 @@
using DevExpress.XtraEditors;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Newtonsoft.Json;
using System;
using System.Data;
namespace Gs.DevApp.UserControl
{
    public partial class UcLookUser : DevExpress.XtraEditors.XtraUserControl
    {
        public UcLookUser()
        {
            InitializeComponent();
            lookSearchSupplier.Properties.NullText = "请选择";
            lookSearchSupplier.EditValueChanged +=
                LookSearchSupplier_EditValueChanged;
            getSuppler();
        }
        public bool IsReadly { get; set; }
        /// <summary>
        ///     æ”¹å˜äº‹ä»¶
        /// </summary>
        public event EventHandler EditChanged;
        private void LookSearchSupplier_EditValueChanged(object sender,
            EventArgs e)
        {
            if (EditChanged != null) EditChanged(this, e);
        }
        private void getSuppler()
        {
            var pgq = new PageQueryModel(1, 999999, "USER_NAME", "asc", "", " and 1=1");
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
                var strReturn = UtilityHelper.HttpPost("", "User/GetListPage", json);
                var rtn = UtilityHelper.ReturnToTablePage(strReturn);
                var dt = rtn.rtnData.list;
                lookSearchSupplier.Properties.DataSource = dt;
                lookSearchSupplier.Properties.DisplayMember = "userName";
                lookSearchSupplier.Properties.ValueMember = "guid";
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        public string GetGuid()
        {
            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
            if (row != null)
            {
                string id = row["guid"].ToString();
                return id;
            }
            return "";
        }
        public string GetCode()
        {
            var row = lookSearchSupplier.GetSelectedDataRow() as DataRowView;
            if (row != null)
            {
                string id = row["account"].ToString();
                return id;
            }
            return "";
        }
        public string GetName()
        {
            var name = lookSearchSupplier.Text.Trim();
            return name;
        }
        public void SetIdOrCode(string Code)
        {
            if (Code == "-1" || string.IsNullOrEmpty(Code))
            {
                lookSearchSupplier.EditValue = null;
                return;
            }
            //lookSearchSupplier.EditValue = Int64.Parse(((Code.ToString().Trim())));
            lookSearchSupplier.EditValue = (((Code.ToString().Trim())));
        }
    }
}
DevApp/Gs.DevApp/UserControl/UcLookUser.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/bin/Debug/templeEasyCode/category1/category.cs
@@ -217,7 +217,7 @@
        /// </summary>
        /// <param name="curPage">第几页</param>
        /// <param name="pageSize">每页几条</param>
        private async void getPageList(int curPage)
        private  void getPageList(int curPage)
        {
            
 var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
DevApp/Gs.DevApp/bin/Debug/templeEasyCode/category2/category.cs
@@ -222,7 +222,7 @@
 /// </summary>
 /// <param name="curPage">第几页</param>
 /// <param name="pageSize">每页几条</param>
 private async void getPageList(int curPage)
 private   void getPageList(int curPage)
 {
    
     var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);