雅琪诺MES智能条码管理系统
ouyangqing
2021-01-12 104b9146fd51f8f4e68e139537b6bf1e23d42bb6
nothing
3个文件已修改
44 ■■■■ 已修改文件
NETSCM/Program.cs 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/单据资料/Gy_BarCodeDetailList.cs 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
SCM/单据资料/Gy_BarCodeMain.cs 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
NETSCM/Program.cs
@@ -41,9 +41,9 @@
                    frmlg.ShowDialog();
                    if (frmlg.isOk)
                    {
                        Gy_BarCodeDetailList gy_Bar = new Gy_BarCodeDetailList();
                        Gy_BarCodeMain gy_Bar = new Gy_BarCodeMain();
                        MDIMain MainFrm = new MDIMain();
                        Application.Run(gy_Bar);
                        Application.Run(MainFrm);
                    }
                }
            }
SCM/µ¥¾Ý×ÊÁÏ/Gy_BarCodeDetailList.cs
@@ -19,6 +19,7 @@
            dateTimePicker2.Text = DateTime.Now.ToString();
            comboBox1.SelectedItem = "全部";
            comboBox2.SelectedItem = "默认排序";
            oWeb.Url = SCM.ClsPub1.WEBSURL;
        }
        public frmBillQueryCondition_Base frmCondition;
        public string ViewName = "h_c_barcodedetail";
@@ -55,21 +56,21 @@
                MessageBox.Show("开始时间不能大于截至时间");
                return;
            }
            whereBuilder.Append($" and a.HMakeDate>'{dateTimePicker1.Text}' and a.HMakeDate<'{dateTimePicker2.Text}'");
            whereBuilder.Append($" and a.HMakeDate>''{dateTimePicker1.Text}'' and a.HMakeDate<''{dateTimePicker2.Text}''");
            if (!string.IsNullOrEmpty(txtHBillNo.Text))
                whereBuilder.Append($" and a.HMaterName like '%{txtHBillNo.Text}%'");
                whereBuilder.Append($" and a.HMaterName like ''%{txtHBillNo.Text}%''");
            if(!string.IsNullOrEmpty(textBox1.Text))
                whereBuilder.Append($" and b.FNUMBER like '%{textBox1.Text}%'");
                whereBuilder.Append($" and b.FNUMBER like ''%{textBox1.Text}%''");
            if (!string.IsNullOrEmpty(textBox2.Text))
                whereBuilder.Append($" and c.FLOT_TEXT like '%{textBox2.Text}%'");
                whereBuilder.Append($" and c.FLOT_TEXT like ''%{textBox2.Text}%''");
            if(comboBox1.Text!="全部")
                whereBuilder.Append($" and a.HRemark='{comboBox1.Text}'");
                whereBuilder.Append($" and a.HRemark=''{comboBox1.Text}''");
            if (!string.IsNullOrEmpty(textBox4.Text))
                whereBuilder.Append($" and d.HName like '%{textBox4.Text}%'");
                whereBuilder.Append($" and d.HName like ''%{textBox4.Text}%''");
            if (!string.IsNullOrEmpty(textBox5.Text))
                whereBuilder.Append($" and e.HName like '%{textBox5.Text}%'");
                whereBuilder.Append($" and e.HName like ''%{textBox5.Text}%''");
            if (!string.IsNullOrEmpty(textBox6.Text))
                whereBuilder.Append($" and a.HWorkLineName like '%{textBox6.Text}%'");
                whereBuilder.Append($" and a.HWorkLineName like ''%{textBox6.Text}%''");
            string orderBy = " order by a.HMakeDate desc ";
            if(comboBox2.Text=="产品名称")
            {
@@ -79,7 +80,7 @@
            {
                orderBy = " order by a.HBatchNo desc";
            }
            string execSql = $"exec {ViewName} {whereBuilder},{orderBy}";
            string execSql = $"exec {ViewName} '{whereBuilder}','{orderBy}'";
            DataSet DSet = oWeb.getDataSetBySQL(execSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo);
            //生成首行标题
            if (DSet == null)
@@ -90,9 +91,9 @@
            //
            grdMain.DataSource = DSet.Tables[0].DefaultView;
            //冻结
            int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
            string s = frmCondition.cmbHComplete.Text;
            ClsPub1.DisplayGrid(grdMain, this.Name, s, FrCol);
            //int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
            //string s = frmCondition.cmbHComplete.Text;
            //ClsPub1.DisplayGrid(grdMain, this.Name, s, FrCol);
        }
        /// <summary>
        /// é€€å‡º
SCM/µ¥¾Ý×ÊÁÏ/Gy_BarCodeMain.cs
@@ -15,6 +15,7 @@
            InitializeComponent();
            dateTimePicker1.Text = DateTime.Now.AddDays(-7).ToString();
            dateTimePicker2.Text = DateTime.Now.ToString();
            oWeb.Url = SCM.ClsPub1.WEBSURL;
        }
        public frmBillQueryCondition_Base frmCondition;
        public string ViewName = "h_c_barcodemain";
@@ -40,14 +41,14 @@
                MessageBox.Show("开始时间不能大于截至时间");
                return;
            }
            whereBuilder.Append($" and a.HMakeDate>'{dateTimePicker1.Text}' and a.HMakeDate<'{dateTimePicker2.Text}'");
            whereBuilder.Append($" and a.HMakeDate>''{dateTimePicker1.Text}'' and a.HMakeDate<''{dateTimePicker2.Text}''");
            if (!string.IsNullOrEmpty(txtHBillNo.Text))
                whereBuilder.Append($" and a.HSourceBillNo like '%{txtHBillNo.Text}%'");
                whereBuilder.Append($" and a.HSourceBillNo like ''%{txtHBillNo.Text}%''");
            if (!string.IsNullOrEmpty(textBox1.Text))
                whereBuilder.Append($" and a.b.FNUMBER like '%{textBox1.Text}%'");
                whereBuilder.Append($" and a.b.FNUMBER like ''%{textBox1.Text}%''");
            if (!string.IsNullOrEmpty(textBox2.Text))
                whereBuilder.Append($" and a.HMaterName like '%{textBox2.Text}%'");
            var execSql = $"exec {ViewName} {whereBuilder}";
                whereBuilder.Append($" and a.HMaterName like ''%{textBox2.Text}%''");
            var execSql = $"exec {ViewName} '{whereBuilder}'";
            DataSet DSet = oWeb.getDataSetBySQL(execSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo);
            //生成首行标题
            if (DSet == null)
@@ -57,10 +58,6 @@
            }
            //
            grdMain.DataSource = DSet.Tables[0].DefaultView;
            //冻结
            int FrCol = DBUtility.ClsPub.isInt(frmCondition.txtFrozenCol.Text);
            string s = frmCondition.cmbHComplete.Text;
            ClsPub1.DisplayGrid(grdMain, this.Name, s, FrCol);
        }
        private void tc_Click(object sender, EventArgs e)