private string DatewiseSPTS(string sdo, string CounterName, string fromdate, string todate, string userid) { report_Prop reportProp = new report_Prop(); reportProp.SubDivision = sdo; reportProp.CounterName = CounterName; reportProp.fromdate = fromdate; reportProp.todate = todate; reportProp.UserId = userid; report_bal reportbal = new report_bal(); DataTable dt = reportbal.DatewiseSPTS(reportProp); StringBuilder sb = new StringBuilder(); if (reportbal.ErrMessage != "" && reportbal.ErrMessage != null) { return("0#" + reportbal.ErrMessage + "$"); } else { sb.Append("<tr>"); sb.Append("<th colspan=7>" + "Date wise & Subdivision wise Payment transaction Summary" + "</th>"); sb.Append("</tr>"); sb.Append("<tr>"); for (int i = 0; i < dt.Columns.Count; i++) { sb.Append("<th>" + dt.Columns[i].ColumnName.ToString() + "</th>"); } sb.Append("</tr>"); if (dt.Rows.Count > 0) { sb.Append("$"); for (int i = 0; i < dt.Rows.Count; i++) { sb.Append("<tr>"); for (int j = 0; j < dt.Columns.Count; j++) { sb.Append("<td>" + dt.Rows[i][j].ToString() + "</td>"); } sb.Append("</tr>"); } } else { sb.Append("<tr><td>No Record Found</td><td></td><td></td><td></td><td></td></tr>"); } //sb.Append("<tr><td colspan='13'>No Record Found</td></tr>"); } return(sb.ToString()); }
private DataTable DatewiseSPTS(string sdo, string CounterName, string fromdate, string todate, string userid) { report_Prop reportProp = new report_Prop(); reportProp.SubDivision = sdo; reportProp.CounterName = CounterName; reportProp.fromdate = fromdate; reportProp.todate = todate; reportProp.UserId = userid; report_bal reportbal = new report_bal(); DataTable dt = reportbal.DatewiseSPTS(reportProp); return(dt); }