protected void Page_Load(object sender, EventArgs e) { if (Session["loginId"] == null) { Response.Redirect("../Login.aspx"); } strCurrencycode = _objBOUtiltiy.Currencycode(); if (!IsPostBack) { txtStartDate.Text = _objBOUtiltiy.ConvertDateFormat(DateTime.Now.ToString()); txtTodate.Text = _objBOUtiltiy.ConvertDateFormat(DateTime.Now.ToString()); BindReport(); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["loginId"] == null) { Response.Redirect("../SalesLogin.aspx"); } strCurrencycode = _objBOUtiltiy.Currencycode(); if (!IsPostBack) { BindRolesDropDwon(); txtStartDate.Text = _objBOUtiltiy.ConvertDateFormat(DateTime.Now.ToString()); txtTodate.Text = _objBOUtiltiy.ConvertDateFormat(DateTime.Now.ToString()); ddlUser.Items.Insert(0, new System.Web.UI.WebControls.ListItem("All Users", "0")); BindReport(0); } }
protected void Page_Load(object sender, EventArgs e) { if (Session["loginId"] == null) { Response.Redirect("../SalesLogin.aspx"); } CurrencyCode = _objBOUtiltiy.Currencycode(); if (!IsPostBack) { if (Request.QueryString["reqstId"] != null) { int RequestId = Convert.ToInt32(_objBOUtiltiy.Decrypt(Request.QueryString["reqstId"], true)); GetHotelRequestDetails(RequestId); } } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["loginId"] == null) { Response.Redirect("../SalesLogin.aspx"); return; } strCurrencyCode = _objBOUtiltiy.Currencycode(); if (!IsPostBack) { string strInvocieId = "0";; if (!string.IsNullOrEmpty(Request.QueryString["FileNo"])) { strInvocieId = Request.QueryString["FileNo"]; } string strMessage = UKZNCreateInvoice(strInvocieId); if (strMessage != "Success") { lblMsg.Text = _objBOUtiltiy.ShowMessage("danger", "Info ", strMessage); return; } DataSet objDs = _objBAinvoice.GetInvoiceDetails(strInvocieId); StreamReader reader = new StreamReader(Server.MapPath("~/HtmlTemps/InvoicePdf.html")); string readFile = reader.ReadToEnd(); reader.Close(); StringBuilder sbMainrow = new StringBuilder(); int Flight = 0; int Land = 0; int car = 0; if (objDs.Tables.Count > 0) { #region Company Deatils if (objDs.Tables[5].Rows.Count > 0) { string strimgLogo = _objBOUtiltiy.LogoUrl(objDs.Tables[5].Rows[0]["communicationlogo"].ToString()); readFile = readFile.Replace("{CompanyName}", objDs.Tables[5].Rows[0]["CompanyName"].ToString()); readFile = readFile.Replace("{address}", objDs.Tables[5].Rows[0]["CompanyAddress"].ToString()); readFile = readFile.Replace("{Image}", "<img src='" + strimgLogo + "'></img>"); readFile = readFile.Replace("{Image3}", " "); readFile = readFile.Replace("{Invoice_No}", objDs.Tables[5].Rows[0]["FileNo"].ToString()); readFile = readFile.Replace("{Date}", DateTime.Now.ToString("D")); readFile = readFile.Replace("{Consultant}", objDs.Tables[5].Rows[0]["UserName"].ToString()); readFile = readFile.Replace("{Client1}", objDs.Tables[5].Rows[0]["TravellerFullName"].ToString()); readFile = readFile.Replace("{Client}", objDs.Tables[5].Rows[0]["TravellerFullName"].ToString()); readFile = readFile.Replace("{Currency}", strCurrencyCode); readFile = readFile.Replace("{ClientAddress}", objDs.Tables[5].Rows[0]["TravellerAddress"].ToString() != "" ? objDs.Tables[5].Rows[0]["TravellerAddress"].ToString() : "Durban"); } else { readFile = readFile.Replace("{CompanyName}", " "); readFile = readFile.Replace("{address}", " "); readFile = readFile.Replace("{Country}", " "); readFile = readFile.Replace("{State}", " "); readFile = readFile.Replace("{City}", " "); readFile = readFile.Replace("{Image}", " "); readFile = readFile.Replace("{Image3}", " "); readFile = readFile.Replace("{ClientAddress}", ""); } #endregion decimal LandClientTotal = 0; decimal CarLandClientTotal = 0; decimal FlihgtClientTotal = 0; decimal ServiceFeeClientTotal = 0; decimal GeneralChargeClienttotal = 0; decimal FlightServiceFeeTotal = 0; decimal HotelServiceFeeTotal = 0; decimal FlightExclAmt = 0; decimal LandExclAmt = 0; decimal CarLandExclAmt = 0; decimal ServiceFeeExclAmt = 0; decimal GeneralChargeExclAmt = 0; decimal FlightVat = 0; decimal LandVat = 0; decimal CarLandVat = 0; decimal ServiceFeeVat = 0; decimal GeneralChargeVat = 0; decimal AirportTaxes = 0; #region AirTicket if (objDs.Tables[0].Rows.Count > 0) { foreach (DataRow dtlRow in objDs.Tables[0].Rows) { decimal FlightServiceFee = 0; if (Flight == 0) { if (objDs.Tables[1].Rows.Count > 0) { FlightServiceFee = Convert.ToDecimal(objDs.Tables[1].Rows[0]["ChargeServiceFee"]); FlightServiceFeeTotal = FlightServiceFeeTotal + FlightServiceFee; } sbMainrow.Append("<tr>"); sbMainrow.Append("<td colspan='7' style='background-color:#f5f5f5;border: 1px ridge black;font-weight:bold;padding:3px;color:blue;'>Air Tickets</td>"); sbMainrow.Append("</tr>"); sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Prn</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Ticket No</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Passenger/Dep Date/Route/Class</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Excl Amt</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'> Airport Taxes</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>VAT</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Incl Amt</td>"); sbMainrow.Append("</tr>"); } FlihgtClientTotal = FlihgtClientTotal + Convert.ToDecimal(dtlRow["TotalPrice"]); string strFlightExclAmt = "0.00"; if (Convert.ToDecimal(dtlRow["EquivalentBasePrice"]) != 0) { strFlightExclAmt = (Convert.ToDecimal(dtlRow["EquivalentBasePrice"]) + FlightServiceFee).ToString(); FlightExclAmt = FlightExclAmt + Convert.ToDecimal(strFlightExclAmt); } else { FlightExclAmt = FlightExclAmt + Convert.ToDecimal(dtlRow["BasePrice"]) + FlightServiceFee; strFlightExclAmt = (Convert.ToDecimal(dtlRow["BasePrice"]) + FlightServiceFee).ToString(); } FlightVat = FlightVat + 0;// Vat AirportTaxes = AirportTaxes + Convert.ToDecimal(dtlRow["Taxes"]); string TotalPrice = (Convert.ToDecimal(dtlRow["TotalPrice"]) + FlightServiceFee).ToString(); sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>" + dtlRow["ProviderLocatorCode"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>" + dtlRow["TicketNumber"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'/>" + dtlRow["FirstName"] + " " + dtlRow["Concats"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + strFlightExclAmt + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + dtlRow["Taxes"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>0</td>");// Var Fee sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + TotalPrice + "</td>"); sbMainrow.Append("</tr>"); Flight = 1; } sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>Air Tickets Total</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>" + (FlightExclAmt) + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>" + AirportTaxes + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>0</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + (FlihgtClientTotal + FlightServiceFeeTotal) + "</td></tr>"); } #endregion AirTicket #region LandArrangement if (objDs.Tables[2].Rows.Count > 0) { decimal LandDtlTotal = 0; foreach (DataRow dtlRow in objDs.Tables[2].Rows) { decimal HotelServiceFee = 0; if (Land == 0) { if (objDs.Tables[1].Rows.Count > 0) { HotelServiceFee = Convert.ToDecimal(objDs.Tables[3].Rows[0]["ChargeServiceFee"]); HotelServiceFeeTotal = HotelServiceFeeTotal + HotelServiceFee; } sbMainrow.Append("<tr>"); sbMainrow.Append("<td colspan='7' style='background-color:#f5f5f5;border: 1px ridge black;font-weight:bold;padding:3px;color:blue;'>Land Arrangement</td>"); sbMainrow.Append("</tr>"); sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Type</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Ser RefNo</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Details</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Excl Amt</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Taxes</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>VAT</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Incl Amt</td>"); sbMainrow.Append("</tr>"); } LandClientTotal = LandClientTotal + Convert.ToDecimal(dtlRow["TotalPrice"]); LandExclAmt = LandExclAmt + Convert.ToDecimal(dtlRow["TotalPrice"]); LandVat = LandVat + 0; LandDtlTotal = Convert.ToDecimal(dtlRow["TotalPrice"]) + HotelServiceFee; sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>" + dtlRow["SupplierReference"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>" + dtlRow["BookingRefNo"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>" + dtlRow["Details"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + LandDtlTotal + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>0</td>"); // Hotel Taxes sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>0</td>"); // Vat sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + LandDtlTotal + "</td>"); sbMainrow.Append("</tr>"); Land = 1; } sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>Land Total</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>" + LandExclAmt + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;;text-align:right'>0</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>0</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>" + (LandClientTotal + HotelServiceFeeTotal) + "</td></tr>"); } #endregion LandArrangement #region CarLandArrangement if (objDs.Tables[6].Rows.Count > 0) { decimal CarLandDtlTotal = 0; foreach (DataRow dtlRow in objDs.Tables[6].Rows) { if (car == 0) { sbMainrow.Append("<tr>"); sbMainrow.Append("<td colspan='7' style='background-color:#f5f5f5;border: 1px ridge black;font-weight:bold;padding:3px;color:blue;'>Car Arrangement</td>"); sbMainrow.Append("</tr>"); sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Type</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Ser RefNo</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Details</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Excl Amt</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Taxes</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>VAT</td>"); sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Incl Amt</td>"); sbMainrow.Append("</tr>"); } CarLandClientTotal = CarLandClientTotal + Convert.ToDecimal(dtlRow["TotalPrice"]); CarLandExclAmt = CarLandExclAmt + Convert.ToDecimal(dtlRow["TotalPrice"]); CarLandVat = CarLandVat + 0; CarLandDtlTotal = Convert.ToDecimal(dtlRow["TotalPrice"]) + 0; sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>" + dtlRow["CarModel"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>" + dtlRow["FileNo"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'> Class " + dtlRow["Class"] + "Doors " + dtlRow["CarDoors"] + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + CarLandDtlTotal + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>0</td>"); // Hotel Taxes sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>0</td>"); // Vat sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + CarLandDtlTotal + "</td>"); sbMainrow.Append("</tr>"); car = 1; } sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>Land Total</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>" + CarLandExclAmt + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;;text-align:right'>0</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>0</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>" + (CarLandClientTotal + 0) + "</td></tr>"); } #endregion LandArrangement //#region ServiceFee //if (objDs.Tables[4].Rows.Count > 0) //{ // sbMainrow.Append("<tr>"); // sbMainrow.Append("<td colspan='7' style='background-color:#f5f5f5;border: 1px ridge black;font-weight:bold;padding:3px;color:blue;'>Service Fee</td>"); // sbMainrow.Append("</tr>"); // sbMainrow.Append("<tr>"); // sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Type</td>"); // sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>SourceRef</td>"); // sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Details</td>"); // sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Excl Amt</td>"); // sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Taxes</td>"); // sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>VAT</td>"); // sbMainrow.Append("<td style='font-weight:bold;border: 1px ridge black;padding: 5px;background-color: white;border-bottom: 1px ridge black;border-radius:5px;'>Incl Amt</td>"); // sbMainrow.Append("</tr>"); // foreach (DataRow dtlRow in objDs.Tables[4].Rows) // { // string Clienttotal = string.IsNullOrEmpty(dtlRow["ChargeServiceFee"].ToString().Trim()) ? ".00" : dtlRow["ChargeServiceFee"].ToString().Trim(); // string ExcluAmount = string.IsNullOrEmpty(dtlRow["ServiceFee"].ToString().Trim()) ? ".00" : dtlRow["ServiceFee"].ToString().Trim(); // string VatAmount = string.IsNullOrEmpty(dtlRow["VatFee"].ToString().Trim()) ? ".00" : dtlRow["VatFee"].ToString().Trim(); // ServiceFeeClientTotal = ServiceFeeClientTotal + Convert.ToDecimal(Clienttotal); // ServiceFeeExclAmt = ServiceFeeExclAmt + Convert.ToDecimal(ExcluAmount); // ServiceFeeVat = ServiceFeeVat + Convert.ToDecimal(VatAmount); // sbMainrow.Append("<tr>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>Service fee on sales</td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>" + dtlRow["FileNo"] + "</td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>Service Fee On Sales</td>");// Service Fee // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + dtlRow["ServiceFee"] + "</td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>0</td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + dtlRow["VatFee"] + "</td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + dtlRow["ChargeServiceFee"] + "</td>"); // sbMainrow.Append("</tr>"); // } // sbMainrow.Append("<tr>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'>Service Fee Total</td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>" + ServiceFeeExclAmt + "</td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>0</td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right;'>" + ServiceFeeVat + "</td>"); // sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + ServiceFeeClientTotal + "</td></tr>"); //} //#endregion Service decimal TotalInvExclAmt = FlightExclAmt + LandExclAmt + CarLandExclAmt + ServiceFeeExclAmt + GeneralChargeExclAmt; decimal TotalVat = FlightVat + LandVat + CarLandVat + ServiceFeeVat + GeneralChargeVat; decimal TotalInclAmount = FlihgtClientTotal + CarLandClientTotal + FlightServiceFeeTotal + LandClientTotal + ServiceFeeClientTotal + GeneralChargeClienttotal; TotalInclAmount = Convert.ToDecimal(_objBOUtiltiy.FormatTwoDecimal(TotalInclAmount.ToString())); // Invocie Total desing //sbMainrow.Append("<tr>"); //sbMainrow.Append("<td colspan='7'><br/></td>"); //sbMainrow.Append("</tr>"); sbMainrow.Append("<tr>"); sbMainrow.Append("<td colspan='7' style='background-color:#f5f5f5;border: 1px ridge black;font-weight:bold;padding:3px;color:blue;'><br/></td>"); sbMainrow.Append("</tr>"); sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;color:blue;'>Invoice Total</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + TotalInvExclAmt + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + AirportTaxes + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + TotalVat + "</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + TotalInclAmount + "</td></tr>"); // Balance From you desing sbMainrow.Append("<tr>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;color:blue;'>Total Due</td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;'></td>"); sbMainrow.Append("<td style='border: 1px ridge black; font-weight:bold;padding:3px;text-align:right'>" + TotalInclAmount + "</td></tr>"); } readFile = readFile.Replace("{MainRows}", sbMainrow.ToString()); string StrContent = readFile; string strFileName = "Invoice_" + " " + strInvocieId; string strFileSavePath = Server.MapPath("../PdfDocuments/Invoices/" + strFileName + ".pdf"); GenerateHTML_TO_PDF(StrContent, true, strFileSavePath, true); } } catch (Exception ex) { lblMsg.Text = _objBOUtiltiy.ShowMessage("danger", "Danger", ex.Message); } }
protected void Page_Load(object sender, EventArgs e) { try { if (Session["loginId"] == null) { Response.Redirect("../Login.aspx"); } strCurrencyCode = objBOUtiltiy.Currencycode(); if (!IsPostBack) { Session.Remove("returnurl"); if (Session["FileNo"] == null) { Session["FileNo"] = 0; } string QuotationRefNo = Request.QueryString["QutRef"]; objDsAirlinecode = objBAFlightSearch.GetAirticketDetailsByFlightRequestId(0); int CreatedBy = Convert.ToInt32(Session["loginId"]); int RoleId = Convert.ToInt32(Session["role_id"]); int CompanyId = Convert.ToInt32(Session["CompanyId"]); DataSet objDsQut = objBOQutation.GetAllQuotationByQuotationMaster(Convert.ToInt32(QuotationRefNo), RoleId, CompanyId, CreatedBy); if (objDsQut.Tables[2].Rows.Count > 0) { lblOrderNo.Text = "UKZN Order No : " + objDsQut.Tables[2].Rows[0]["ukzn_orderno"].ToString(); Session["UKZNORDERNO"] = objDsQut.Tables[2].Rows[0]["ukzn_orderno"].ToString(); Session["CarResult"] = 0; } if (objDsQut.Tables[0].Rows.Count > 0) { QuotationConfirmation(objDsQut); //pnlFlight.Visible = true; } else { //pnlFlight.Visible = false; } if (objDsQut.Tables[1].Rows.Count > 0) { GenerateHotelQuotation(objDsQut); // pnlHotel.Visible = true; } else { // pnlHotel.Visible = false; } if (objDsQut.Tables[3].Rows.Count > 0) { rptCars.DataSource = objDsQut.Tables[3]; rptCars.DataBind(); } else { } } } catch (Exception ex) { lblMsg.Text = objBOUtiltiy.ShowMessage("danger", "Error", ex.Message); } }