雅琪诺MES智能条码管理系统
jhz
2022-06-30 0d3b2bd4edaa7385e4ff96370c877be237af054b
SCM/±¨±í/Qk_ProcessbillMain.cs
@@ -26,6 +26,7 @@
        public const string ModName = "1250";
        public string sDlgWhere = "";  //外窗体递入
        public int selectRow = 0;
        Pub_Class.ClsGridListSum oSumGrid = new Pub_Class.ClsGridListSum();
        SCM.WMSWeb.WebService1 oWeb = new SCM.WMSWeb.WebService1();
        private void yl_Click(object sender, EventArgs e)
        {
@@ -50,6 +51,7 @@
                return;
            }
            var execSql = "exec " + ViewName + " '"+ dateTimePicker1.Text + "','"+dateTimePicker2.Text+"','"+ txtHBillNo.Text + "','"+ textBox3.Text+ "','"+ textBox4.Text+ "','"+ textBox1.Text + "','"+ textBox2.Text + "'";
            oWeb.Timeout = 300000;
            DataSet DSet = oWeb.getDataSetBySQL(execSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo);
            //生成首行标题
            if (DSet == null)
@@ -59,7 +61,29 @@
            }
            //
            grdMain.DataSource = DSet.Tables[0].DefaultView;
            grdMain.RowHeadersVisible = false;
            ////设置合计列
            string sTotalCol = "";
            sTotalCol = DBUtility.Gy_BaseFun.GetTotalCols(DSet);
            string[] sT;
            sT = sTotalCol.Split(Convert.ToChar(","));
            oSumGrid.BuildTotalCols(sT);
            Total();
        }
        //合计 new
        private void Total()
        {
            if (grdMain.Rows.Count > 0 && grdMain.ColumnCount > 0)
            {
                oSumGrid.SetGridsum();
                oSumGrid.TotalAll();
            }
        }
        private void tc_Click(object sender, EventArgs e)
        {
            this.Close();
@@ -175,5 +199,11 @@
                }
            }
        }
        private void Qk_ProcessbillMain_Load(object sender, EventArgs e)
        {
            oSumGrid.ogrdMain = grdMain;  //初始化 new
            oSumGrid.oGridsum = grdSum;
        }
    }
}