bug
lu
6 天以前 2a80c1eb78199037b445fbe1514a7849f33231db
bug
已修改5个文件
已添加2个文件
412 ■■■■■ 文件已修改
DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.Designer.cs 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/PDA/SelectUser.cs 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/PDA/SelectZZ.Designer.cs 208 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/PDA/SelectZZ.cs 123 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Gs.DevApp.csproj 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/Program.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.Designer.cs
@@ -149,6 +149,8 @@
            this.gridColumn13 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.rptDel3 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            this.tips = new DevExpress.Utils.ToolTipController(this.components);
            this.gridColumn15 = new DevExpress.XtraGrid.Columns.GridColumn();
            this.repositoryItemButtonEdit5 = new DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit();
            ((System.ComponentModel.ISupportInitialize)(this.xtraTabControl1)).BeginInit();
            this.xtraTabControl1.SuspendLayout();
            this.xtraTabPage1.SuspendLayout();
@@ -205,6 +207,7 @@
            ((System.ComponentModel.ISupportInitialize)(this.gcMx3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvMx3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.rptDel3)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit5)).BeginInit();
            this.SuspendLayout();
            // 
            // isLocked
@@ -276,7 +279,7 @@
            this.split1.Panel2.Text = "Panel2";
            this.split1.ShowSplitGlyph = DevExpress.Utils.DefaultBoolean.True;
            this.split1.Size = new System.Drawing.Size(1002, 649);
            this.split1.SplitterPosition = 36;
            this.split1.SplitterPosition = 0;
            this.split1.TabIndex = 0;
            // 
            // gcMain1
@@ -289,8 +292,9 @@
            this.repositoryItemButtonEdit2,
            this.repositoryItemButtonEdit3,
            this.repositoryItemButtonEdit4,
            this.repositoryItemButtonEdit1});
            this.gcMain1.Size = new System.Drawing.Size(1002, 562);
            this.repositoryItemButtonEdit1,
            this.repositoryItemButtonEdit5});
            this.gcMain1.Size = new System.Drawing.Size(1002, 598);
            this.gcMain1.TabIndex = 2;
            this.gcMain1.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gridView1});
@@ -314,7 +318,8 @@
            this.gridColumn4,
            this.gridColumn1,
            this.gridColumn5,
            this.gridColumn14});
            this.gridColumn14,
            this.gridColumn15});
            gridFormatRule1.Column = this.isLocked;
            gridFormatRule1.Name = "Format0";
            formatConditionRuleExpression1.Appearance.ForeColor = System.Drawing.Color.Red;
@@ -521,7 +526,7 @@
            // 
            this.pageBar1.CurrentPage = 1;
            this.pageBar1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.pageBar1.Location = new System.Drawing.Point(0, 562);
            this.pageBar1.Location = new System.Drawing.Point(0, 598);
            this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5);
            this.pageBar1.Name = "pageBar1";
            this.pageBar1.RecordCount = 0;
@@ -1088,6 +1093,24 @@
            this.rptDel3.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor;
            this.rptDel3.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.rptDel3_ButtonClick);
            // 
            // gridColumn15
            //
            this.gridColumn15.Caption = "绑定组织";
            this.gridColumn15.ColumnEdit = this.repositoryItemButtonEdit5;
            this.gridColumn15.MinWidth = 25;
            this.gridColumn15.Name = "gridColumn15";
            this.gridColumn15.Visible = true;
            this.gridColumn15.VisibleIndex = 13;
            this.gridColumn15.Width = 94;
            //
            // repositoryItemButtonEdit5
            //
            this.repositoryItemButtonEdit5.AutoHeight = false;
            this.repositoryItemButtonEdit5.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] {
            new DevExpress.XtraEditors.Controls.EditorButton()});
            this.repositoryItemButtonEdit5.Name = "repositoryItemButtonEdit5";
            this.repositoryItemButtonEdit5.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit5_ButtonClick);
            //
            // Frm_UserBind
            // 
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
@@ -1153,6 +1176,7 @@
            ((System.ComponentModel.ISupportInitialize)(this.gcMx3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gvMx3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.rptDel3)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.repositoryItemButtonEdit5)).EndInit();
            this.ResumeLayout(false);
        }
@@ -1233,5 +1257,7 @@
        private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit rptDel3;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn14;
        private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit1;
        private DevExpress.XtraGrid.Columns.GridColumn gridColumn15;
        private DevExpress.XtraEditors.Repository.RepositoryItemButtonEdit repositoryItemButtonEdit5;
    }
}
DevApp/Gs.DevApp/DevFrm/PDA/Frm_UserBind.cs
@@ -317,6 +317,28 @@
            }
        }
        /// <summary>
        /// ç»‘定组织
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void repositoryItemButtonEdit5_ButtonClick(object sender, ButtonPressedEventArgs e)
        {
            if (e.Button.Index == 0)
            {
                var rowhandle = gridView1.FocusedRowHandle;
                var dr = gridView1.GetDataRow(rowhandle);
                var userGuid = dr["guid"].ToString();
                var frm = new SelectZZ(userGuid);
                frm.ShowDialog();
            }
        }
        #region MyRegion
        #endregion
        #region å„种删除
        /// <summary>
        /// åˆ é™¤pda
        /// </summary>
        /// <param name="sender"></param>
@@ -343,7 +365,11 @@
        {
            delBind(e, gvMx3);
        }
        /// <summary>
        /// åˆ é™¤å„种绑定
        /// </summary>
        /// <param name="e"></param>
        /// <param name="gv"></param>
        private void delBind(ButtonPressedEventArgs e, DevExpress.XtraGrid.Views.Grid.GridView gv)
        {
            var rowhandle = gv.FocusedRowHandle;
@@ -379,6 +405,8 @@
                }
            }
        }
        #endregion
    }
}
DevApp/Gs.DevApp/DevFrm/PDA/SelectUser.cs
@@ -11,6 +11,9 @@
namespace Gs.DevApp.DevFrm.PDA
{
    /// <summary>
    /// ä»“库分区绑定
    /// </summary>
    public partial class SelectUser : DevExpress.XtraEditors.XtraForm
    {
        private readonly string _webServiceName = "User/";
DevApp/Gs.DevApp/DevFrm/PDA/SelectZZ.Designer.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,208 @@
namespace Gs.DevApp.DevFrm.PDA
{
    partial class SelectZZ
    {
        /// <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.panelControl2 = new DevExpress.XtraEditors.PanelControl();
            this.gcMain = new DevExpress.XtraGrid.GridControl();
            this.gridView1 = new DevExpress.XtraGrid.Views.Grid.GridView();
            this.colChkInt = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_depotCode = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_depottype = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_createBy = new DevExpress.XtraGrid.Columns.GridColumn();
            this.gv_isNg = new DevExpress.XtraGrid.Columns.GridColumn();
            this.panelControl1 = new DevExpress.XtraEditors.PanelControl();
            this.btnIn = new DevExpress.XtraEditors.SimpleButton();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).BeginInit();
            this.panelControl2.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.gcMain)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).BeginInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).BeginInit();
            this.panelControl1.SuspendLayout();
            this.SuspendLayout();
            //
            // panelControl2
            //
            this.panelControl2.Controls.Add(this.gcMain);
            this.panelControl2.Controls.Add(this.panelControl1);
            this.panelControl2.Dock = System.Windows.Forms.DockStyle.Fill;
            this.panelControl2.Location = new System.Drawing.Point(0, 0);
            this.panelControl2.Name = "panelControl2";
            this.panelControl2.Size = new System.Drawing.Size(595, 691);
            this.panelControl2.TabIndex = 4;
            //
            // gcMain
            //
            this.gcMain.Dock = System.Windows.Forms.DockStyle.Fill;
            this.gcMain.Location = new System.Drawing.Point(2, 2);
            this.gcMain.MainView = this.gridView1;
            this.gcMain.Name = "gcMain";
            this.gcMain.Size = new System.Drawing.Size(591, 644);
            this.gcMain.TabIndex = 6;
            this.gcMain.ViewCollection.AddRange(new DevExpress.XtraGrid.Views.Base.BaseView[] {
            this.gridView1});
            //
            // gridView1
            //
            this.gridView1.Appearance.HeaderPanel.Options.UseTextOptions = true;
            this.gridView1.Appearance.HeaderPanel.TextOptions.WordWrap = DevExpress.Utils.WordWrap.Wrap;
            this.gridView1.Appearance.Row.Options.UseFont = true;
            this.gridView1.ColumnPanelRowHeight = 60;
            this.gridView1.Columns.AddRange(new DevExpress.XtraGrid.Columns.GridColumn[] {
            this.colChkInt,
            this.gv_depotCode,
            this.gv_depottype,
            this.gv_createBy,
            this.gv_isNg});
            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;
            //
            // colChkInt
            //
            this.colChkInt.Caption = ".";
            this.colChkInt.FieldName = "chkInt";
            this.colChkInt.MinWidth = 25;
            this.colChkInt.Name = "colChkInt";
            this.colChkInt.Visible = true;
            this.colChkInt.VisibleIndex = 0;
            this.colChkInt.Width = 94;
            //
            // gv_depotCode
            //
            this.gv_depotCode.AppearanceCell.Options.UseFont = true;
            this.gv_depotCode.Caption = "线体编号";
            this.gv_depotCode.FieldName = "lineNo";
            this.gv_depotCode.MinWidth = 50;
            this.gv_depotCode.Name = "gv_depotCode";
            this.gv_depotCode.OptionsColumn.AllowEdit = false;
            this.gv_depotCode.Tag = "query_a.depot_code";
            this.gv_depotCode.Visible = true;
            this.gv_depotCode.VisibleIndex = 1;
            this.gv_depotCode.Width = 50;
            //
            // gv_depottype
            //
            this.gv_depottype.AppearanceCell.Options.UseFont = true;
            this.gv_depottype.Caption = "线体名称";
            this.gv_depottype.FieldName = "name";
            this.gv_depottype.MinWidth = 50;
            this.gv_depottype.Name = "gv_depottype";
            this.gv_depottype.OptionsColumn.AllowEdit = false;
            this.gv_depottype.Tag = "query_a.depottype";
            this.gv_depottype.Visible = true;
            this.gv_depottype.VisibleIndex = 2;
            this.gv_depottype.Width = 80;
            //
            // gv_createBy
            //
            this.gv_createBy.AppearanceCell.Options.UseFont = true;
            this.gv_createBy.Caption = "线体备注";
            this.gv_createBy.FieldName = "remark";
            this.gv_createBy.MinWidth = 50;
            this.gv_createBy.Name = "gv_createBy";
            this.gv_createBy.OptionsColumn.AllowEdit = false;
            this.gv_createBy.Tag = "query_a.create_by";
            this.gv_createBy.Visible = true;
            this.gv_createBy.VisibleIndex = 3;
            this.gv_createBy.Width = 71;
            //
            // gv_isNg
            //
            this.gv_isNg.AppearanceCell.Options.UseFont = true;
            this.gv_isNg.Caption = "打印机备注";
            this.gv_isNg.FieldName = "remark";
            this.gv_isNg.MinWidth = 50;
            this.gv_isNg.Name = "gv_isNg";
            this.gv_isNg.OptionsColumn.AllowEdit = false;
            this.gv_isNg.Tag = "query_a.is_ng";
            this.gv_isNg.Visible = true;
            this.gv_isNg.VisibleIndex = 4;
            this.gv_isNg.Width = 100;
            //
            // panelControl1
            //
            this.panelControl1.Controls.Add(this.btnIn);
            this.panelControl1.Dock = System.Windows.Forms.DockStyle.Bottom;
            this.panelControl1.Location = new System.Drawing.Point(2, 646);
            this.panelControl1.Name = "panelControl1";
            this.panelControl1.Size = new System.Drawing.Size(591, 43);
            this.panelControl1.TabIndex = 5;
            //
            // btnIn
            //
            this.btnIn.Appearance.BackColor = DevExpress.LookAndFeel.DXSkinColors.FillColors.Question;
            this.btnIn.Appearance.Options.UseBackColor = true;
            this.btnIn.AppearancePressed.BackColor = System.Drawing.Color.White;
            this.btnIn.AppearancePressed.Options.UseBackColor = true;
            this.btnIn.Dock = System.Windows.Forms.DockStyle.Right;
            this.btnIn.ImageOptions.Image = global::Gs.DevApp.Properties.Resources.selectvaluespivottable_16x16;
            this.btnIn.Location = new System.Drawing.Point(495, 2);
            this.btnIn.Name = "btnIn";
            this.btnIn.Size = new System.Drawing.Size(94, 39);
            this.btnIn.TabIndex = 4;
            this.btnIn.Text = "确定保存";
            //
            // SelectLine
            //
            this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 18F);
            this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
            this.ClientSize = new System.Drawing.Size(595, 691);
            this.Controls.Add(this.panelControl2);
            this.IconOptions.Image = global::Gs.DevApp.Properties.Resources.logo_png_black;
            this.MaximizeBox = false;
            this.MinimizeBox = false;
            this.Name = "SelectLine";
            this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent;
            this.Text = "选择线体";
            this.TopMost = true;
            ((System.ComponentModel.ISupportInitialize)(this.panelControl2)).EndInit();
            this.panelControl2.ResumeLayout(false);
            ((System.ComponentModel.ISupportInitialize)(this.gcMain)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.gridView1)).EndInit();
            ((System.ComponentModel.ISupportInitialize)(this.panelControl1)).EndInit();
            this.panelControl1.ResumeLayout(false);
            this.ResumeLayout(false);
        }
        #endregion
        private DevExpress.XtraEditors.PanelControl panelControl2;
        private DevExpress.XtraEditors.PanelControl panelControl1;
        private DevExpress.XtraEditors.SimpleButton btnIn;
        private DevExpress.XtraGrid.GridControl gcMain;
        private DevExpress.XtraGrid.Views.Grid.GridView gridView1;
        private DevExpress.XtraGrid.Columns.GridColumn gv_depotCode;
        private DevExpress.XtraGrid.Columns.GridColumn gv_depottype;
        private DevExpress.XtraGrid.Columns.GridColumn gv_createBy;
        private DevExpress.XtraGrid.Columns.GridColumn gv_isNg;
        private DevExpress.XtraGrid.Columns.GridColumn colChkInt;
    }
}
DevApp/Gs.DevApp/DevFrm/PDA/SelectZZ.cs
¶Ô±ÈÐÂÎļþ
@@ -0,0 +1,123 @@
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.DevFrm.PDA
{
    public partial class SelectZZ : DevExpress.XtraEditors.XtraForm
    {
        private readonly string _webServiceName = "MesWorkshopLineManager/";
        private string userGuid = "";
        /// <summary>
        ///
        /// </summary>
        /// <param name="_suppId">供应商</param>
        /// <param name="_receiveOrgId">收料组织</param>
        /// <param name="_isWw">是否委外</param>
        public SelectZZ(string _userGuid)
        {
            InitializeComponent();
            this.gridView1.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); };
            this.gridView1.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMain, gridView1); };
            this.colChkInt.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False;
            this.colChkInt.OptionsFilter.AllowAutoFilter = false;
            this.colChkInt.OptionsFilter.AllowFilter = false;
            this.colChkInt.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False;
            this.userGuid = _userGuid;
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", null, null, false);
            getPageList(1);
            btnIn.Click += (s, e) =>
            {
                gridView1.PostEditor();
                gridView1.UpdateCurrentRow();
                System.Text.StringBuilder sbList = new System.Text.StringBuilder();
                DataTable dt = this.gcMain.DataSource as DataTable;
                {
                    foreach (DataRow dr in dt.Rows)
                    {
                        string checkBox = dr["chkInt"].ToString();
                        string _guid = dr["guid"].ToString();
                        if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox))
                        {
                            if (sbList.Length > 0)
                                sbList.Append(",");
                            sbList.Append(_guid);
                        }
                    }
                }
                var _obj = new
                {
                    userGuid = Gs.DevApp.ToolBox.UtilityHelper.ToGuid(userGuid),
                    bindGuidslist = sbList.ToString(),
                    fType = "过站时绑定线体",
                };
                try
                {
                    var strJson = UtilityHelper.HttpPost("",
                          "MesSysPageviewManager/SetUserBind",
                        JsonConvert.SerializeObject(_obj));
                    var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                    if (_rtn.rtnCode > 0)
                    {
                        MsgHelper.ShowInformation("提示:" + _rtn.rtnData.outMsg);
                        this.Close();
                    }
                    else
                        MsgHelper.ShowError("提示:" + _rtn.rtnData.outMsg);
                }
                catch (Exception ex)
                {
                    MsgHelper.ShowError("提示:" + ex.Message);
                }
            };
        }
        /// <summary>
        /// </summary>
        /// <param name="curPage">第几页</param>
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = "";
            var pgq = new PageQueryModel(curPage, 999999, "a.line_no", "asc", "", _sbSqlWhere.ToString(), userGuid);
            var json = JsonConvert.SerializeObject(pgq);
            try
            {
                var strReturn = UtilityHelper.HttpPost("", _webServiceName + "GetListPage2", json);
                var dd = UtilityHelper.ReturnToTablePage(strReturn);
                if (dd.rtnCode > 0)
                {
                    DataTable dt = dd.rtnData.list;
                    gcMain.BindingContext = new BindingContext();
                    if (dt.Rows.Count > 0)
                    {
                        gcMain.DataSource = dt;
                        gcMain.ForceInitialize();
                        gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1);
                    }
                    else
                        UtilityHelper.SetDefaultTable(gcMain, gridView1);
                }
                else
                {
                    ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg);
                }
            }
            catch (Exception ex)
            {
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
    }
}
DevApp/Gs.DevApp/Gs.DevApp.csproj
@@ -533,6 +533,12 @@
    <Compile Include="DevFrm\PDA\SelectUser.Designer.cs">
      <DependentUpon>SelectUser.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\PDA\SelectZZ.cs">
      <SubType>Form</SubType>
    </Compile>
    <Compile Include="DevFrm\PDA\SelectZZ.Designer.cs">
      <DependentUpon>SelectZZ.cs</DependentUpon>
    </Compile>
    <Compile Include="DevFrm\QC\DefectCode.cs">
      <SubType>UserControl</SubType>
    </Compile>
DevApp/Gs.DevApp/Program.cs
@@ -51,8 +51,8 @@
                fmLogin.ShowDialog();
                if (fmLogin.DialogResult == DialogResult.OK)
                {
                    //Application.Run(new DevFrm.User.SysMenu());
                    //return;
                    Application.Run(new DevFrm.User.SysMenu());
                    return;
                    Application.Run(new FrmMain());
                }
            }