private DataTable DailyChequeWise(string SubDivision, string CounterName, string Bank, string User, string fromdate, string todate, string userid)
        {
            report_Prop reportProp = new report_Prop();

            reportProp.SubDivision = SubDivision;
            reportProp.CounterName = CounterName;
            reportProp.Bank        = Bank;
            reportProp.UserName    = User;
            reportProp.fromdate    = fromdate;
            reportProp.todate      = todate;
            reportProp.UserId      = userid;
            report_bal reportbal = new report_bal();
            DataTable  dt        = reportbal.DailyChequeWise(reportProp);

            return(dt);
        }
示例#2
0
        private string DailyChequeWise(string SubDivision, string CounterName, string Bank, string User, string fromdate, string todate, string userid)
        {
            report_Prop reportProp = new report_Prop();

            reportProp.SubDivision = SubDivision;
            reportProp.CounterName = CounterName;
            reportProp.Bank        = Bank;
            reportProp.UserName    = User;
            reportProp.fromdate    = fromdate;
            reportProp.todate      = todate;
            reportProp.UserId      = userid;
            report_bal reportbal = new report_bal();
            DataTable  dt        = reportbal.DailyChequeWise(reportProp);

            StringBuilder sb = new StringBuilder();

            if (reportbal.ErrMessage != "" && reportbal.ErrMessage != null)
            {
                return("0#" + reportbal.ErrMessage + "$");
            }
            else
            {
                sb.Append("<tr>");
                sb.Append("<th colspan=9>" + "Daily Cheque Report Cheque Wise" + "</th>");
                sb.Append("</tr>");
                sb.Append("<tr>");
                sb.Append("<th>" + "Sr No" + "</th>");
                sb.Append("<th>" + "SDO" + "</th>");
                sb.Append("<th>" + "SDO Name" + "</th>");

                sb.Append("<th>" + "ACCNo" + "</th>");
                sb.Append("<th>" + "CHEQUENO" + "</th>");
                sb.Append("<th>" + "CHQ DATE" + "</th>");
                sb.Append("<th>" + "BANK" + "</th>");
                sb.Append("<th>" + "UNDER A/C" + "</th>");

                sb.Append("<th>" + "AMOUNT" + "</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]["SrNo"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["SDO"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["SDO Name"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["ACCNo"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["CHEQUENO"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["CHQ DATE"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["BANK NAME"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["UNDER A/C"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["AMOUNT"].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></tr>");
                }
                //sb.Append("<tr><td colspan='13'>No Record Found</td></tr>");
            }


            return(sb.ToString());
        }