private DataTable DailySubDWiseSummary(string SubDivision, string CounterName, string fromdate, string todate, string userid) { report_Prop reportProp = new report_Prop(); reportProp.SubDivision = SubDivision; reportProp.CounterName = CounterName; reportProp.fromdate = fromdate; reportProp.todate = todate; reportProp.UserId = userid; report_bal reportbal = new report_bal(); DataTable dt = reportbal.DailySubDWiseSummary(reportProp); return(dt); }
private string DailySubDWiseSummary(string SubDivision, string CounterName, string fromdate, string todate, string userid) { report_Prop reportProp = new report_Prop(); reportProp.SubDivision = SubDivision; reportProp.CounterName = CounterName; reportProp.fromdate = fromdate; reportProp.todate = todate; reportProp.UserId = userid; report_bal reportbal = new report_bal(); DataTable dt = reportbal.DailySubDWiseSummary(reportProp); StringBuilder sb = new StringBuilder(); if (reportbal.ErrMessage != "" && reportbal.ErrMessage != null) { return("0#" + reportbal.ErrMessage + "$"); } else { sb.Append("<tr>"); sb.Append("<th colspan=7>" + "Daily Sub Division Wise Summary" + "</th>"); sb.Append("</tr>"); sb.Append("<tr>"); sb.Append("<th>" + "SDO Name" + "</th>"); sb.Append("<th>" + "TOTAL CASHSTUBS" + "</th>"); sb.Append("<th>" + "TOTALCASHS Amount" + "</th>"); sb.Append("<th>" + "TOTAL CHQ STUBS" + "</th>"); sb.Append("<th>" + "TOTAL CHQ Amount" + "</th>"); sb.Append("<th>" + "Total Stub" + "</th>"); sb.Append("<th>" + "TotalAmount" + "</th>"); sb.Append("</tr>"); if (dt.Rows.Count > 0) { sb.Append("$"); for (int i = 0; i < dt.Rows.Count; i++) { sb.Append("<tr>"); sb.Append("<td>" + dt.Rows[i]["SDO"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["TOTAL CASHSTUBS"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["TOTALCASHSAMount"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["TOTAL CHQ STUBS"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["TOTALCHQAmount"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["TotalStub"].ToString() + "</td>"); sb.Append("<td>" + dt.Rows[i]["TotalAmount"].ToString() + "</td>"); sb.Append("</tr>"); } } else { sb.Append("<tr><td>No Record Found</td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td><td></td></tr>"); } //sb.Append("<tr><td colspan='13'>No Record Found</td></tr>"); } return(sb.ToString()); }