| | |
| | | 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) |
| | | { |
| | |
| | | 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) |
| | |
| | | } |
| | | // |
| | | 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(); |
| | |
| | | MessageBox.Show("å°æ¤å·¥ä½è¡¨å¯¼åºä¸ºexcelå
±èæ¶ï¼" + DateTime.Now.Subtract(start).TotalMilliseconds.ToString() + "毫ç§"); |
| | | } |
| | | } |
| | | |
| | | private void grdMain_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e) |
| | | { |
| | | if (e.RowIndex < grdMain.Rows.Count) |
| | | { |
| | | DataGridViewRow dgrSingle = grdMain.Rows[e.RowIndex]; |
| | | try |
| | | { |
| | | var rowIndex = DBUtility.Xt_BaseBillFun.Fun_GetCol("订åé¢è®¡äº¤è´§æ¶é´", grdMain); |
| | | if (dgrSingle.Cells[rowIndex].Value == null) |
| | | return; |
| | | var pusTimeStr = dgrSingle.Cells[rowIndex].Value.ToString().Trim();//è·åæ°é |
| | | if (string.IsNullOrEmpty(pusTimeStr)) |
| | | return; |
| | | if (DateTime.Parse(pusTimeStr) < DateTime.Now) |
| | | { |
| | | // 设置åå
æ ¼çèæ¯è² |
| | | dgrSingle.DefaultCellStyle.BackColor = Color.FromArgb(255, 128, 128); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MessageBox.Show(ex.Message); |
| | | } |
| | | } |
| | | } |
| | | |
| | | private void Qk_ProcessbillMain_Load(object sender, EventArgs e) |
| | | { |
| | | oSumGrid.ogrdMain = grdMain; //åå§å new |
| | | oSumGrid.oGridsum = grdSum; |
| | | } |
| | | } |
| | | } |