public string AverageFlow_Month_mew(String station_name, int year) { string yearstr = "'%" + year + "%'"; string wherestr = "station_name ='" + station_name + "' and YYYY_MM like " + yearstr; Maticsoft.BLL.HIS_MEASURAND_DischargeAmount_Month Bll = new Maticsoft.BLL.HIS_MEASURAND_DischargeAmount_Month(); DataSet dataset = Bll.GetList(1000, wherestr, "YYYY_MM"); DataTable dtl = dataset.Tables[0]; int rowcount = dtl.Rows.Count; if (rowcount == 0) { return("null"); } DataRow col = dtl.Rows[0]; String DischargeAmountstr = col["station_name"].ToString(); DischargeAmountstr += "#flow"; for (int i = 0; i < rowcount; i++) { col = dtl.Rows[i]; DischargeAmountstr += ";" + col["YYYY_MM"].ToString() + "," + col["flow"].ToString(); } return(DischargeAmountstr); }
public string DischargeAmount_Month(int id, int year) { string yearstr = "'%" + year + "%'"; string wherestr = "id ='" + id + "' and YYYY_MM like " + yearstr; Maticsoft.BLL.HIS_MEASURAND_DischargeAmount_Month Bll = new Maticsoft.BLL.HIS_MEASURAND_DischargeAmount_Month(); DataSet dataset = Bll.GetList(1000, wherestr, "YYYY_MM"); DataTable dtl = dataset.Tables[0]; int rowcount = dtl.Rows.Count; if (rowcount == 0) { return("null"); } DataRow col = dtl.Rows[0]; String DischargeAmountstr = col["id"].ToString(); DischargeAmountstr += "#CODMn"; for (int i = 0; i < rowcount; i++) { col = dtl.Rows[i]; DischargeAmountstr += ";" + col["YYYY_MM"].ToString() + "," + col["CODMn"].ToString(); } DischargeAmountstr += "#NH3_N"; for (int i = 0; i < rowcount; i++) { col = dtl.Rows[i]; DischargeAmountstr += ";" + col["YYYY_MM"].ToString() + "," + col["NH3_N"].ToString(); } DischargeAmountstr += "#TP"; for (int i = 0; i < rowcount; i++) { col = dtl.Rows[i]; DischargeAmountstr += ";" + col["YYYY_MM"].ToString() + "," + col["TP"].ToString(); } DischargeAmountstr += "#TN"; for (int i = 0; i < rowcount; i++) { col = dtl.Rows[i]; DischargeAmountstr += ";" + col["YYYY_MM"].ToString() + "," + col["TN"].ToString(); } return(DischargeAmountstr); }
public string DischargeAmount_Month(String station_name, int year) { string yearstr = "'%" + year + "%'"; string wherestr = "station_name ='" + station_name + "' and YYYY_MM like "+yearstr; Maticsoft.BLL.HIS_MEASURAND_DischargeAmount_Month Bll = new Maticsoft.BLL.HIS_MEASURAND_DischargeAmount_Month(); DataSet dataset = Bll.GetList(1000, wherestr, "YYYY_MM"); DataTable dtl = dataset.Tables[0]; int rowcount = dtl.Rows.Count; if (rowcount == 0) { return "null"; } DataRow col = dtl.Rows[0]; String DischargeAmountstr = col["station_name"].ToString(); DischargeAmountstr += "#CODMn"; for (int i = 0; i < rowcount; i++) { col = dtl.Rows[i]; DischargeAmountstr += ";" + col["YYYY_MM"].ToString() + "," + col["CODMn"].ToString(); } DischargeAmountstr += "#NH3_N"; for (int i = 0; i < rowcount; i++) { col = dtl.Rows[i]; DischargeAmountstr += ";" + col["YYYY_MM"].ToString() + "," + col["NH3_N"].ToString(); } DischargeAmountstr += "#TP"; for (int i = 0; i < rowcount; i++) { col = dtl.Rows[i]; DischargeAmountstr += ";" + col["YYYY_MM"].ToString() + "," + col["TP"].ToString(); } DischargeAmountstr += "#TN"; for (int i = 0; i < rowcount; i++) { col = dtl.Rows[i]; DischargeAmountstr += ";" + col["YYYY_MM"].ToString() + "," + col["TN"].ToString(); } return DischargeAmountstr; }