Exemplo n.º 1
0
        private DataTable DatewiseSTS(string CounterName, string fromdate, string todate, string userid)
        {
            report_Prop reportProp = new report_Prop();

            reportProp.CounterName = CounterName;
            reportProp.fromdate    = fromdate;
            reportProp.todate      = todate;
            reportProp.UserId      = userid;
            report_bal reportbal = new report_bal();
            DataTable  dt        = reportbal.DatewiseSTS(reportProp);

            return(dt);
        }
Exemplo n.º 2
0
        private string DatewiseSTS(string CounterName, string fromdate, string todate, string userid)
        {
            report_Prop reportProp = new report_Prop();

            reportProp.CounterName = CounterName;
            reportProp.fromdate    = fromdate;
            reportProp.todate      = todate;
            reportProp.UserId      = userid;
            report_bal reportbal = new report_bal();
            DataTable  dt        = reportbal.DatewiseSTS(reportProp);

            StringBuilder sb = new StringBuilder();

            if (reportbal.ErrMessage != "" && reportbal.ErrMessage != null)
            {
                return("0#" + reportbal.ErrMessage + "$");
            }
            else
            {
                sb.Append("<tr>");
                sb.Append("<th colspan='11'>" + "Date wise Subdivision wise 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)
                {
                    if (dt.Rows[0][0].ToString() != "")
                    {
                        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>");
                    }
                }
                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());
        }