| | |
| | | { |
| | | sDlgWhere = sDlgWhere.Substring(1, sDlgWhere.Length - 1); |
| | | } |
| | | // |
| | | DSet = SubCn.RunProcReturn("exec h_p_CJKB" + sDlgWhere, "Gy_Czygl"); |
| | | |
| | | DSet = SubCn.RunProcReturn("exec h_p_CJKB " + sDlgWhere, "h_p_CJKB"); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | { |
| | |
| | | } |
| | | // |
| | | grdMain.DataSource = DSet.Tables[0].DefaultView; |
| | | //è·å卿å ï¼ç©æä¿¡æ¯ï¼ |
| | | |
| | | //DsHead = SubCn.RunProcReturn("exec h_p_Sc_GetProcExchReportHead " + sDlgWhere, "Gy_Czygl"); |
| | | |
| | | //for (int a = 0; a < DsHead.Tables[0].Rows.Count; a++) |
| | | //{ |
| | | // if (ClsPub.isLong(DsHead.Tables[0].Rows[a]["HMaterID"]) != 0) |
| | | // { |
| | | // grdMain.Columns.Add(ClsPub.isStrNull(DsHead.Tables[0].Rows[a]["HMaterID"]), ClsPub.isStrNull(DsHead.Tables[0].Rows[a]["HName"])); |
| | | // grdMain.Columns[BCol].Tag = ClsPub.isLong(DsHead.Tables[0].Rows[a]["HMaterID"]); |
| | | // BCol = BCol + 1; |
| | | // } |
| | | //} |
| | | BCol = 7; |
| | | //è·å卿å
容 ï¼æ°éä¿¡æ¯ï¼ |
| | | for (int row = 0; row <= grdMain.RowCount - 1; row++) |
| | | { |
| | | for (int col = BCol; col <= grdMain.ColumnCount - 1; col++) |
| | | { |
| | | HDeptID = DBUtility.ClsPub.isLong(grdMain.Rows[row].Cells[Fun_GetCol("HDeptID")].Value); |
| | | DsQty = SubCn.RunProcReturn("exec h_p_CJKB '" + HDeptID.ToString(), "Gy_Czygl"); |
| | | if (DsQty != null && DsQty.Tables[0].Rows.Count > 0) |
| | | { |
| | | grdMain.Rows[row].Cells[col].Value = DBUtility.ClsPub.isDoule(DsQty.Tables[0].Rows[0]["HQty"], 2); |
| | | } |
| | | } |
| | | } |
| | | //for (int row = 0; row <= grdMain.RowCount - 1; row++) |
| | | //{ |
| | | // for (int col = BCol; col <= grdMain.ColumnCount - 1; col++) |
| | | // { |
| | | // //HDeptID = DBUtility.ClsPub.isLong(grdMain.Rows[row].Cells[Fun_GetCol("HDeptID")].Value); |
| | | // DsQty = SubCn.RunProcReturn("exec h_p_CJKB " + 0, "h_p_CJKB"); |
| | | // if (DsQty != null && DsQty.Tables[0].Rows.Count > 0) |
| | | // { |
| | | // grdMain.Rows[row].Cells[col].Value = DBUtility.ClsPub.isDoule(DsQty.Tables[0].Rows[0]["HQty"], 2); |
| | | // } |
| | | // } |
| | | //} |
| | | |
| | | //设置å计å |
| | | string sTotalCol = ""; |