private DataTable DailyCSUserWise(string CounterName, string user, string fromdate, string todate, string userid) { report_Prop reportProp = new report_Prop(); reportProp.CounterName = CounterName; reportProp.UserName = user; reportProp.fromdate = fromdate; reportProp.todate = todate; reportProp.UserId = userid; report_bal reportbal = new report_bal(); DataTable dt = reportbal.DailyCSUserWise(reportProp); return(dt); }
private string DailyCSUserWise(string CounterName, string user, string fromdate, string todate, string userid) { report_Prop reportProp = new report_Prop(); reportProp.CounterName = CounterName; reportProp.UserName = user; reportProp.fromdate = fromdate; reportProp.todate = todate; reportProp.UserId = userid; report_bal reportbal = new report_bal(); DataTable dt = reportbal.DailyCSUserWise(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 Collection Summary User Wise" + "</th>"); sb.Append("</tr>"); sb.Append("<tr>"); sb.Append("<th>" + "User 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]["username"].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()); }