using Swift.DAL.VoucherReport; using Swift.web.Library; using System; using System.Data; using System.Text; using System.Web; namespace Swift.web.BillVoucher.VoucherReport { public partial class VoucherReportDetails : System.Web.UI.Page { private string vType = null; private string vNum = null; private string typeDDL = null; private string id = null; private SwiftLibrary _sl = new SwiftLibrary(); private RemittanceLibrary rl = new RemittanceLibrary(); private VoucherReportDAO st = new VoucherReportDAO(); protected void Page_Load(object sender, EventArgs e) { _sl.CheckSession(); if (!IsPostBack) { GenerateVoucherReport(); } } private void GetPDFMethod(string a) { string b = a; } protected string VoucherText() { return GetStatic.ReadQueryString("vText", ""); } protected string VoucherNumber() { return GetStatic.ReadQueryString("vNum", ""); } protected string TypeDDL() { return GetStatic.ReadQueryString("typeDDL", ""); } private string GenerateVoucherReport() { vType = VoucherText(); vNum = VoucherNumber(); typeDDL = TypeDDL(); string searchType = GetStatic.ReadQueryString("searchType", ""); letterHead.Text = GetStatic.getCompanyHead(); var dt = st.GetVoucherReport(vNum, typeDDL, searchType); if (dt == null || dt.Rows.Count == 0) { rl.ManageInvalidControlNoAttempt(Page, GetStatic.GetUser(), "N"); return null; } var sb = new StringBuilder(); double DRTotal = 0, cRTotal = 0; int sNo = 1; //sb.AppendLine("
" + sNo + " | "); sb.AppendLine("" + item["acc_num"] + " | "); sb.AppendLine("" + item["acct_name"] + " | "); sb.AppendLine("" + GetStatic.ShowDecimal(item["DRTotal"].ToString()) + " | "); sb.AppendLine("" + GetStatic.ShowDecimal(item["cRTotal"].ToString()) + " | "); sb.AppendLine("