コード例 #1
0
        private DataTable PaymentData(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.PaymentData(reportProp);


            return(dt);
        }
コード例 #2
0
        private string PaymentData(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.PaymentData(reportProp);



            StringBuilder sb = new StringBuilder();

            if (reportbal.ErrMessage != "" && reportbal.ErrMessage != null)
            {
                return("0#" + reportbal.ErrMessage + "$");
            }
            else
            {
                sb.Append("<tr>");
                sb.Append("<th colspan=15>" + "Daily Payment Data" + "</th>");
                sb.Append("</tr>");
                sb.Append("<tr>");
                sb.Append("<th>" + "SDO" + "</th>");
                sb.Append("<th>" + "ACCNo" + "</th>");
                sb.Append("<th>" + "Counter No" + "</th>");
                sb.Append("<th>" + "ReceiptNo" + "</th>");
                sb.Append("<th>" + "AMOUNT" + "</th>");
                sb.Append("<th>" + "RDATE" + "</th>");
                sb.Append("<th>" + "CHEQUENO" + "</th>");
                sb.Append("<th>" + "CHQ DATE" + "</th>");
                sb.Append("<th>" + "BANK" + "</th>");
                sb.Append("<th>" + "Mode Of Payment" + "</th>");
                sb.Append("<th>" + "Status" + "</th>");
                sb.Append("<th>" + "CounterName" + "</th>");
                sb.Append("<th>" + "Entered Time" + "</th>");
                sb.Append("<th>" + "Consumer Name" + "</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]["ACCNo"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["Counter No"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["ReceiptNo"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["AMOUNT"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["RDATE"].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"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["Mode Of Payment"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["Status"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["CounterName"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["Entered Time"].ToString() + "</td>");
                        sb.Append("<td>" + dt.Rows[i]["Consumer Name"].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='9'>No Record Found</td></tr>");
            }


            return(sb.ToString());
        }