雅琪诺MES智能条码管理系统
jingh
2021-03-31 715746486281876dcad7f40e618f1bc82c4baef1
SCM/±¨±í/Qk_OutProcessList.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)
        {
@@ -75,7 +76,29 @@
            //
           var dt= AddDatable(DSet.Tables[0]);
            grdMain.DataSource = dt.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();
            }
        }
        public DataTable AddDatable(DataTable dt)
        {
            decimal tal = 0;
@@ -177,5 +200,11 @@
                MessageBox.Show("将此工作表导出为excel共耗时:" + DateTime.Now.Subtract(start).TotalMilliseconds.ToString() + "毫秒");
            }
        }
        private void Qk_OutProcessList_Load(object sender, EventArgs e)
        {
            oSumGrid.ogrdMain = grdMain;  //初始化 new
            oSumGrid.oGridsum = grdSum;
        }
    }
}