| | |
| | | { |
| | | try |
| | | { |
| | | ClsCN SubCn = new ClsCN(); |
| | | string sSql = ""; |
| | | string sWhere = ""; |
| | | //è¿æ»¤æ¡ä»¶ |
| | | //if (frmCondition.SqlStr.Trim().Length == 0) |
| | | //ClsCN SubCn = new ClsCN(); |
| | | //string sSql = ""; |
| | | //string sWhere = ""; |
| | | ////è¿æ»¤æ¡ä»¶ |
| | | ////if (frmCondition.SqlStr.Trim().Length == 0) |
| | | //// return; |
| | | ////sSql = frmCondition.SqlStr + sWhere + " order by HStatus,HDate "; |
| | | //sSql = "exec h_p_CJKB "; |
| | | //// |
| | | //DSet = SubCn.RunProcReturn(sSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | ////çæé¦è¡æ é¢ |
| | | //if (DSet == null) |
| | | //{ |
| | | // //MessageBox.Show("没æè¿åä»»ä½ç»æ,请å¨è¿æ»¤æ¡ä¸ç¹å»ãæ¢å¤ãæé®,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | // return; |
| | | //sSql = frmCondition.SqlStr + sWhere + " order by HStatus,HDate "; |
| | | sSql = "exec h_p_CJKB "; |
| | | // |
| | | DSet = SubCn.RunProcReturn(sSql, ViewName, ref DBUtility.ClsPub.sExeReturnInfo); |
| | | //çæé¦è¡æ é¢ |
| | | if (DSet == null) |
| | | //} |
| | | ////éæ¾å»ç» |
| | | //DBUtility.Xt_BaseBillFun.CancelFrozenCol(grdMain); |
| | | //// |
| | | //grdMain.DataSource = DSet.Tables[0].DefaultView; |
| | | //// |
| | | |
| | | ////-----------é¢è¦ç¶æ |
| | | ////å¼å·¥æ¶é´å°äºå½å¤©æ¶é´ï¼ä½æ¯ä»»å¡åç¶æè¿æ¯ å¾
ç产ï¼ç³»ç»èªå¨é»è²è¦ç¤ºï¼ |
| | | ////å®å·¥æ¶é´å°äºå½å¤©æ¶é´ï¼ä½æ¯ä»»å¡åè¿æ¯å¾
ç产æè
卿§è¡çï¼ç³»ç»èªå¨çº¢è²è¦ç¤ºï¼ |
| | | ////int HBDateCol = Fun_GetCol("å¼å·¥æ¶é´"); |
| | | ////int HEDateCol = Fun_GetCol("å®å·¥æ¶é´"); |
| | | ////int HStatusCol = Fun_GetCol("çäº§ç¶æ"); |
| | | ////DateTime oNow = DateTime.Today.Date; |
| | | ////for (int i = 0; i < grdMain.Rows.Count; i++) |
| | | ////{ |
| | | //// if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HBDateCol].Value) < oNow && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HStatusCol].Value) == "å¾
ç产") |
| | | //// { |
| | | //// grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Yellow; |
| | | //// } |
| | | //// if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HStatusCol].Value) == "å¾
ç产") |
| | | //// { |
| | | //// grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red; |
| | | //// } |
| | | ////} |
| | | |
| | | ////设置å计å |
| | | //string sTotalCol = ""; |
| | | //sTotalCol = DBUtility.Gy_BaseFun.GetTotalCols(DSet); |
| | | //string[] sT; |
| | | //sT = sTotalCol.Split(Convert.ToChar(",")); |
| | | //oSumGrid.BuildTotalCols(sT); |
| | | //// |
| | | ////å»ç» |
| | | //int FrCol = 10; |
| | | //string s = "æ¯"; |
| | | //DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol); |
| | | ////ç»çº¿ |
| | | ////GraphLine(); |
| | | |
| | | ////Total(); |
| | | |
| | | ////for (int i = 0; i < grdMain.Rows.Count; i++) |
| | | ////{ |
| | | //// if (i % 2 == 0) |
| | | //// { |
| | | //// grdMain.Rows[i].DefaultCellStyle.BackColor = Color.SteelBlue; |
| | | //// grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.White; |
| | | //// } |
| | | //// else |
| | | //// { |
| | | //// grdMain.Rows[i].DefaultCellStyle.BackColor = Color.SlateGray; |
| | | //// grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.White; |
| | | //// } |
| | | ////} |
| | | //// |
| | | /// |
| | | |
| | | ClsCN clsCN = new ClsCN(); |
| | | ClsIni clsIni = new ClsIni(); |
| | | string text = ClsIni.ReadIni("Dept", "DeptID", Pub_Class.ClsPub.AppPath + "\\HXErp.ini"); |
| | | this.sDeptID = text; |
| | | string procName = "exec h_p_CJKB " + this.sDeptID; |
| | | this.DSet = clsCN.RunProcReturn(procName, this.ViewName, ref Pub_Class.ClsPub.sExeReturnInfo); |
| | | bool flag = this.DSet == null; |
| | | if (!flag) |
| | | { |
| | | //MessageBox.Show("没æè¿åä»»ä½ç»æ,请å¨è¿æ»¤æ¡ä¸ç¹å»ãæ¢å¤ãæé®,å°è¯å次æ¥è¯¢ï¼" + DBUtility.ClsPub.sExeReturnInfo); |
| | | return; |
| | | Xt_BaseBillFun.CancelFrozenCol(this.grdMain); |
| | | this.grdMain.DataSource = this.DSet.Tables[0].DefaultView; |
| | | string totalCols = Gy_BaseFun.GetTotalCols(this.DSet); |
| | | string[] cols = totalCols.Split(new char[] |
| | | { |
| | | Convert.ToChar(",") |
| | | }); |
| | | this.oSumGrid.BuildTotalCols(cols); |
| | | int frCol = 10; |
| | | string s = "æ¯"; |
| | | Xt_BaseBillFun.DisplayGrid(this.grdMain, base.Name, s, frCol); |
| | | } |
| | | //éæ¾å»ç» |
| | | DBUtility.Xt_BaseBillFun.CancelFrozenCol(grdMain); |
| | | // |
| | | grdMain.DataSource = DSet.Tables[0].DefaultView; |
| | | // |
| | | |
| | | //-----------é¢è¦ç¶æ |
| | | //å¼å·¥æ¶é´å°äºå½å¤©æ¶é´ï¼ä½æ¯ä»»å¡åç¶æè¿æ¯ å¾
ç产ï¼ç³»ç»èªå¨é»è²è¦ç¤ºï¼ |
| | | //å®å·¥æ¶é´å°äºå½å¤©æ¶é´ï¼ä½æ¯ä»»å¡åè¿æ¯å¾
ç产æè
卿§è¡çï¼ç³»ç»èªå¨çº¢è²è¦ç¤ºï¼ |
| | | //int HBDateCol = Fun_GetCol("å¼å·¥æ¶é´"); |
| | | //int HEDateCol = Fun_GetCol("å®å·¥æ¶é´"); |
| | | //int HStatusCol = Fun_GetCol("çäº§ç¶æ"); |
| | | //DateTime oNow = DateTime.Today.Date; |
| | | //for (int i = 0; i < grdMain.Rows.Count; i++) |
| | | //{ |
| | | // if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HBDateCol].Value) < oNow && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HStatusCol].Value) == "å¾
ç产") |
| | | // { |
| | | // grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Yellow; |
| | | // } |
| | | // if (DBUtility.ClsPub.isDate(grdMain.Rows[i].Cells[HEDateCol].Value) < oNow && DBUtility.ClsPub.isStrNull(grdMain.Rows[i].Cells[HStatusCol].Value) == "å¾
ç产") |
| | | // { |
| | | // grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.Red; |
| | | // } |
| | | //} |
| | | |
| | | //设置å计å |
| | | string sTotalCol = ""; |
| | | sTotalCol = DBUtility.Gy_BaseFun.GetTotalCols(DSet); |
| | | string[] sT; |
| | | sT = sTotalCol.Split(Convert.ToChar(",")); |
| | | oSumGrid.BuildTotalCols(sT); |
| | | // |
| | | //å»ç» |
| | | int FrCol = 10; |
| | | string s = "æ¯"; |
| | | DBUtility.Xt_BaseBillFun.DisplayGrid(grdMain, this.Name, s, FrCol); |
| | | //ç»çº¿ |
| | | //GraphLine(); |
| | | |
| | | //Total(); |
| | | |
| | | //for (int i = 0; i < grdMain.Rows.Count; i++) |
| | | //{ |
| | | // if (i % 2 == 0) |
| | | // { |
| | | // grdMain.Rows[i].DefaultCellStyle.BackColor = Color.SteelBlue; |
| | | // grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.White; |
| | | // } |
| | | // else |
| | | // { |
| | | // grdMain.Rows[i].DefaultCellStyle.BackColor = Color.SlateGray; |
| | | // grdMain.Rows[i].DefaultCellStyle.ForeColor = Color.White; |
| | | // } |
| | | //} |
| | | // |
| | | } |
| | | catch (Exception e) |
| | | { |