111
jhz
2023-04-04 c0f103a688099f89d8201a9d3bcc64ab031a4a89
111
4个文件已修改
2个文件已添加
335 ■■■■■ 已修改文件
SCM/ClsXt_WorkAddress_Model.cs 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/ClsXt_WorkAddress_View.cs 223 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/KF_HD_INVENTORYReport.cs 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/KF_HD_INVENTORYReport.designer.cs 64 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/KF_HD_INVENTORYReport.resx 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/SCM.csproj 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/ClsXt_WorkAddress_Model.cs
New file
@@ -0,0 +1,12 @@
using System;
using System.Collections.Generic;
using System.Text;
namespace SCM
{
    public class ClsXt_WorkAddress_Model : DBUtility.ClsGy_Base_Model
    {
        //-----------------
    }
}
SCM/ClsXt_WorkAddress_View.cs
New file
@@ -0,0 +1,223 @@
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using DBUtility;
namespace SCM
{
    public class ClsXt_WorkAddress_View:DBUtility.ClsGy_Base_View
    {
        //
        public SCM.ClsXt_WorkAddress_Model omodel = new SCM.ClsXt_WorkAddress_Model();
        SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
        public ClsXt_WorkAddress_View()
        {
            base.MvarReportTitle = "生产基地设置";
            base.MvarItemKey = "h_v_Xt_WorkAddressList";
            base.SQLName = "Select HItemID,HNumber 生产基地代码,HName 生产基地 from h_v_Xt_WorkAddressList  ";
            base.SQLWhere = " where HStopflag=0 ";
            base.SQLOrder = " Order by HNumber ";
            base.SQLList = "Select * from " + MvarItemKey + " ";
            //下拉SQL
            base.SQLNameForDown = " Select top 30 HItemID,HNumber 生产基地代码,HName 生产基地 from h_v_Xt_WorkAddressList ";
            base.SQLOrderForDown = "  Order by HNumber ";
            base.SQLWhereForDown = "  where HStopflag=0  ";
        }
        //
        public void Dispose()
        {
            GC.SuppressFinalize(this);
        }
        //
        //返回项目信息
        public override bool GetInfoByID(Int64 sItemID)
        {
            DataSet DS ;
            try
            {
                oWeb.Url = ClsPub1.WEBSURL;
                DS = oWeb.getDataSetBySQL("Select * from " + MvarItemKey + " Where HItemID='" + sItemID + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count  == 0)
                    return false;
                else
                {
                    return GetInfo(DS);
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //根据代码返回项目信息
        public  bool GetInfoByNumber(string sNumber, long HOrgID)
        {
            DataSet DS;
            try
            {
                oWeb.Url = ClsPub1.WEBSURL;
                DS = oWeb.getDataSetBySQL("Select * from " + MvarItemKey + " Where HNumber='" + sNumber + "' and HItemID=" + HOrgID.ToString(), MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count == 0)
                    return false;
                else
                {
                    return GetInfo(DS);
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        //返回项目信息
        public override bool GetInfo(DataSet DS)
        {
            try
            {
                omodel = new SCM.ClsXt_WorkAddress_Model();
                omodel.HItemID = Convert.ToInt64(DS.Tables[0].Rows[0]["HItemID"]);
                omodel.HNumber = DS.Tables[0].Rows[0]["HNumber"].ToString().Trim();
                omodel.HName = DS.Tables[0].Rows[0]["HName"].ToString().Trim();
                omodel.HStopflag = DBUtility.ClsPub.isBool(DS.Tables[0].Rows[0]["HStopflag"]);
                //omodel.HRemark = DS.Tables[0].Rows[0]["HRemark"].ToString().Trim();
                return true;
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        /// <summary>
        /// 基础资料帮助-全部型
        /// </summary>
        /// <returns></returns>
        public override bool RefreshView()
        {
            try
            {//
                oWeb.Url = ClsPub1.WEBSURL;
                SCM.frmHlpInfo_View ofrm = new SCM.frmHlpInfo_View();
                //
                string sSQL = SQLName + SQLWhere + SQLOrder;
                //编辑ofrm
                ofrm.sTitle = MvarReportTitle;
                ofrm.sBill = MvarItemKey;
                ofrm.txtFindInfo.Text = WherePart;
                //
                DataSet Ds;
                Ds = oWeb.getDataSetBySQL(sSQL, MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
                //oCn.RunProcReturn(sSQL, MvarItemKey);
                if (Ds == null || Ds.Tables[0].Rows.Count == 0)
                {
                    return false;
                }
                //绑定
                ofrm.grdShow.DataSource = Ds.Tables[0].DefaultView;
                Ds.Dispose();
                Ds = null;
                ofrm.grdShow.SuspendLayout();
                ofrm.grdShow.Columns[0].Visible = false;
                ofrm.ShowDialog();
                //得到对应列
                int HItemIDCol = 0;
                int HNumberCol = 1;
                int HNameCol = 2;
                //
                if (ofrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
                {
                    if (ofrm.grdShow.CurrentRow == null)
                    {
                        return false;
                    }
                    oModel = new ClsGy_Base_Model();
                    oModel.HItemID = Pub_Class.ClsPub.isLong(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[0].Value);
                    oModel.HNumber = Pub_Class.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[1].Value);
                    oModel.HName = Pub_Class.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[2].Value);
                }
                else
                {
                    return false;
                }
                //
                ofrm.Dispose();
                ofrm = null;
                //
                return true;
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
        public override bool RefreshView(string sLike)
        {
            try
            {//
                oWeb.Url = ClsPub1.WEBSURL;
                SCM.frmHlpInfo_View ofrm = new SCM.frmHlpInfo_View();
                //
                string sSQL = SQLName + SQLWhere + sLike + SQLOrder;
                //编辑ofrm
                ofrm.sTitle = MvarReportTitle;
                ofrm.sBill = MvarItemKey;
                ofrm.txtFindInfo.Text = WherePart;
                //
                DataSet Ds;
                Ds = oWeb.getDataSetBySQL(sSQL, MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
                //oCn.RunProcReturn(sSQL, MvarItemKey);
                if (Ds == null || Ds.Tables[0].Rows.Count == 0)
                {
                    return false;
                }
                //绑定
                ofrm.grdShow.DataSource = Ds.Tables[0].DefaultView;
                Ds.Dispose();
                Ds = null;
                ofrm.grdShow.SuspendLayout();
                ofrm.grdShow.Columns[0].Visible = false;
                ofrm.ShowDialog();
                //得到对应列
                int HItemIDCol = 0;
                int HNumberCol = 1;
                int HNameCol = 2;
                //
                if (ofrm.OKTag == Pub_Class.ClsPub.Enum_OKTag.OKTag_OK)
                {
                    if (ofrm.grdShow.CurrentRow == null)
                    {
                        return false;
                    }
                    oModel = new ClsGy_Base_Model();
                    oModel.HItemID = Pub_Class.ClsPub.isLong(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[0].Value);
                    oModel.HNumber = Pub_Class.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[1].Value);
                    oModel.HName = Pub_Class.ClsPub.isStrNull(ofrm.grdShow.Rows[ofrm.grdShow.CurrentRow.Index].Cells[2].Value);
                }
                else
                {
                    return false;
                }
                //
                ofrm.Dispose();
                ofrm = null;
                //
                return true;
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
    }
}
SCM/KF_HD_INVENTORYReport.cs
@@ -177,7 +177,7 @@
            sDlgWhere = sDlgWhere + " '" + txtHMaterNumber.Text.Trim() + "'";
            sDlgWhere = sDlgWhere + ",'" + txtHMaterName.Text.Trim() + "'";
            sDlgWhere = sDlgWhere + ",'" + txtHWhName.Text.Trim() + "'";
            sDlgWhere = sDlgWhere + ",'" + cmbHOrgID.Text + "'";
            sDlgWhere = sDlgWhere + ",'" + txtHWorkAdd.Text + "'";
            sDlgWhere = sDlgWhere + ",'" + ClsPub.CurUserName + "'";
            if (sDlgWhere.Trim().Length > 0)
            {
@@ -398,6 +398,23 @@
            txtHMaterNumber.Text = "";
            txtHMaterName.Text = "";
            txtHWhName.Text = "";
            txtHWorkAdd.Text = "";
        }
        private void cmdHWorkAdd_Click(object sender, EventArgs e)
        {
            SCM.ClsXt_WorkAddress_View oWorkAddress = new SCM.ClsXt_WorkAddress_View();
            oWorkAddress.WherePart = "";
            string sWhere = "";
            if (oWorkAddress.RefreshView(sWhere))
            {
                //txtHWorkAdd.Tag = oWorkAddress.oModel.HItemID.ToString();
                txtHWorkAdd.Text = txtHWorkAdd.Text + "," + oWorkAddress.oModel.HName;
            }
            else
            {
                txtHWorkAdd.Text = "";
            }
        }
    }
}
SCM/KF_HD_INVENTORYReport.designer.cs
@@ -54,6 +54,7 @@
            this.timer2 = new System.Windows.Forms.Timer(this.components);
            this.grdMain = new System.Windows.Forms.DataGridView();
            this.groupBox1 = new System.Windows.Forms.GroupBox();
            this.btnOK = new System.Windows.Forms.Button();
            this.txtHWhName = new System.Windows.Forms.TextBox();
            this.label2 = new System.Windows.Forms.Label();
            this.txtHMaterNumber = new System.Windows.Forms.TextBox();
@@ -62,7 +63,9 @@
            this.label7 = new System.Windows.Forms.Label();
            this.cmbHOrgID = new System.Windows.Forms.ComboBox();
            this.label3 = new System.Windows.Forms.Label();
            this.btnOK = new System.Windows.Forms.Button();
            this.label5 = new System.Windows.Forms.Label();
            this.txtHWorkAdd = new System.Windows.Forms.TextBox();
            this.cmdHWorkAdd = new System.Windows.Forms.Button();
            this.Tool.SuspendLayout();
            this.pPic.SuspendLayout();
            ((System.ComponentModel.ISupportInitialize)(this.grdMain)).BeginInit();
@@ -286,7 +289,7 @@
            // 
            this.lblHSumQty.AutoSize = true;
            this.lblHSumQty.ForeColor = System.Drawing.Color.Black;
            this.lblHSumQty.Location = new System.Drawing.Point(991, 19);
            this.lblHSumQty.Location = new System.Drawing.Point(1056, 19);
            this.lblHSumQty.Name = "lblHSumQty";
            this.lblHSumQty.Size = new System.Drawing.Size(0, 12);
            this.lblHSumQty.TabIndex = 65;
@@ -295,7 +298,7 @@
            // 
            this.label1.AutoSize = true;
            this.label1.ForeColor = System.Drawing.Color.Black;
            this.label1.Location = new System.Drawing.Point(931, 19);
            this.label1.Location = new System.Drawing.Point(996, 19);
            this.label1.Name = "label1";
            this.label1.Size = new System.Drawing.Size(65, 12);
            this.label1.TabIndex = 64;
@@ -323,7 +326,10 @@
            // groupBox1
            // 
            this.groupBox1.BackColor = System.Drawing.Color.Lavender;
            this.groupBox1.Controls.Add(this.cmdHWorkAdd);
            this.groupBox1.Controls.Add(this.btnOK);
            this.groupBox1.Controls.Add(this.txtHWorkAdd);
            this.groupBox1.Controls.Add(this.label5);
            this.groupBox1.Controls.Add(this.txtHWhName);
            this.groupBox1.Controls.Add(this.label2);
            this.groupBox1.Controls.Add(this.txtHMaterNumber);
@@ -340,6 +346,16 @@
            this.groupBox1.Size = new System.Drawing.Size(1365, 43);
            this.groupBox1.TabIndex = 66;
            this.groupBox1.TabStop = false;
            //
            // btnOK
            //
            this.btnOK.Location = new System.Drawing.Point(940, 13);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new System.Drawing.Size(50, 24);
            this.btnOK.TabIndex = 94;
            this.btnOK.Text = "清除";
            this.btnOK.UseVisualStyleBackColor = true;
            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
            // 
            // txtHWhName
            // 
@@ -393,7 +409,7 @@
            // 
            this.cmbHOrgID.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
            this.cmbHOrgID.FormattingEnabled = true;
            this.cmbHOrgID.Location = new System.Drawing.Point(703, 15);
            this.cmbHOrgID.Location = new System.Drawing.Point(1191, 15);
            this.cmbHOrgID.Name = "cmbHOrgID";
            this.cmbHOrgID.Size = new System.Drawing.Size(188, 20);
            this.cmbHOrgID.TabIndex = 87;
@@ -403,21 +419,40 @@
            // 
            this.label3.AutoSize = true;
            this.label3.ForeColor = System.Drawing.Color.Black;
            this.label3.Location = new System.Drawing.Point(661, 19);
            this.label3.Location = new System.Drawing.Point(1149, 19);
            this.label3.Name = "label3";
            this.label3.Size = new System.Drawing.Size(47, 12);
            this.label3.TabIndex = 86;
            this.label3.Text = "组 织:";
            // 
            // btnOK
            // label5
            // 
            this.btnOK.Location = new System.Drawing.Point(602, 13);
            this.btnOK.Name = "btnOK";
            this.btnOK.Size = new System.Drawing.Size(50, 24);
            this.btnOK.TabIndex = 94;
            this.btnOK.Text = "清除";
            this.btnOK.UseVisualStyleBackColor = true;
            this.btnOK.Click += new System.EventHandler(this.btnOK_Click);
            this.label5.AutoSize = true;
            this.label5.ForeColor = System.Drawing.Color.Black;
            this.label5.Location = new System.Drawing.Point(597, 20);
            this.label5.Name = "label5";
            this.label5.Size = new System.Drawing.Size(65, 12);
            this.label5.TabIndex = 95;
            this.label5.Text = "生产基地:";
            //
            // txtHWorkAdd
            //
            this.txtHWorkAdd.Location = new System.Drawing.Point(657, 15);
            this.txtHWorkAdd.Name = "txtHWorkAdd";
            this.txtHWorkAdd.ReadOnly = true;
            this.txtHWorkAdd.Size = new System.Drawing.Size(242, 21);
            this.txtHWorkAdd.TabIndex = 96;
            //
            // cmdHWorkAdd
            //
            this.cmdHWorkAdd.Image = ((System.Drawing.Image)(resources.GetObject("cmdHWorkAdd.Image")));
            this.cmdHWorkAdd.ImageAlign = System.Drawing.ContentAlignment.TopRight;
            this.cmdHWorkAdd.Location = new System.Drawing.Point(900, 14);
            this.cmdHWorkAdd.Name = "cmdHWorkAdd";
            this.cmdHWorkAdd.Size = new System.Drawing.Size(22, 22);
            this.cmdHWorkAdd.TabIndex = 97;
            this.cmdHWorkAdd.UseVisualStyleBackColor = true;
            this.cmdHWorkAdd.Click += new System.EventHandler(this.cmdHWorkAdd_Click);
            // 
            // KF_HD_INVENTORYReport
            // 
@@ -480,5 +515,8 @@
        private System.Windows.Forms.TextBox txtHMaterName;
        private System.Windows.Forms.Label label7;
        private System.Windows.Forms.Button btnOK;
        private System.Windows.Forms.TextBox txtHWorkAdd;
        private System.Windows.Forms.Label label5;
        private System.Windows.Forms.Button cmdHWorkAdd;
    }
}
SCM/KF_HD_INVENTORYReport.resx
@@ -3919,6 +3919,21 @@
  <metadata name="timer2.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
    <value>266, 21</value>
  </metadata>
  <data name="cmdHWorkAdd.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
    <value>
        R0lGODlhEAAQAIYAAAAzmQBmzP///1o7AJlmAOazAMTz/9mmAEW5//nNT+W5ToPV/5TW/cyZAAyf/7Dp
        /yOn/2jD/q3h/le8/sz3/5zg/7bt/73l/7Xs/2fH/4DT///bnZXb/97//2rK/wWb/8np/6zf/1S//77x
        /73w/8Xv/1+//wmc/1jA/5Db/5LV/6rn/6Xb/zCt/33O/9X3/4LO/7jj/4PT/x+m/7nk/3XP/3PJ/3bQ
        /6Tb/5Td/zCv/3fM/029/4za/6Pf/ZHc/6Pk/////wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
        AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH/C05FVFNDQVBFMi4wAwEBAAAh+QQB
        AABBACwAAAAAEAAQAAAIqACDCBwoMIDBAAQTBjEYIcKECQYVLmQQ44KJFhBmQECYMAAOEAJYnPjgwAHH
        gQEYqAhBA4YOBDwQIDg5cYcLGyg8LOixYAFNABJkZBBRI8cDEg98ACAIlIOGGylWGOhgwMBSphUq/ACC
        wQAFClcFEiAAQICAEhZGvDAbloCCDQUAlDUrQO5AtwkKHBgQRK7duwryHmjAV2IQAoIJGxY4QK/ixYwH
        FIYcEAA7
</value>
  </data>
  <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
    <value>42</value>
  </metadata>
SCM/SCM.csproj
@@ -95,6 +95,8 @@
  </ItemGroup>
  <ItemGroup>
    <Compile Include="Class1.cs" />
    <Compile Include="ClsXt_WorkAddress_Model.cs" />
    <Compile Include="ClsXt_WorkAddress_View.cs" />
    <Compile Include="系统类\ClsCLD_MaterGroup_View.cs" />
    <Compile Include="KF_HD_INVENTORYReport.cs">
      <SubType>Form</SubType>