protected void gvTRANS_RowDataBound(Object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { Label lblReceiver = (Label)e.Row.FindControl("lblReceiver"); Label lblLocation = (Label)e.Row.FindControl("lblLocation"); Label lblRECEIVERID = (Label)e.Row.FindControl("lblRECEIVERID"); Label lblLOCATIONID = (Label)e.Row.FindControl("lblLOCATIONID"); RECEIVER rECEIVER = new RECEIVER(); rECEIVER = RECEIVERManager.GetRECEIVERByID(int.Parse(lblRECEIVERID.Text)); if (rECEIVER != null) { lblReceiver.Text = rECEIVER.RECEIVERFNAME.ToString(); } LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(lblLOCATIONID.Text)); if (lOCATION != null) { lblLocation.Text = lOCATION.BRANCH.ToString(); } } }
protected void gvUSERINFO_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { Label lblAgent_LocationID = (Label)e.Row.FindControl("lblAgent_LocationID"); Label lblAgent_LocationName = (Label)e.Row.FindControl("lblAgent_LocationName"); if (ddlUserType.SelectedItem.Value.ToString() == "Agent") { AGENT aGENT = new AGENT(); aGENT = AGENTManager.GetAGENTByID(int.Parse(lblAgent_LocationID.Text)); if (aGENT != null) { lblAgent_LocationName.Text = aGENT.AGENTNAME.ToString(); } } else { LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(lblAgent_LocationID.Text)); if (lOCATION != null) { lblAgent_LocationName.Text = lOCATION.BRANCH.ToString(); } } } }
protected void gvFoodTransactionItemRelation_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { Label lblfID = (Label)e.Row.FindControl("lblfID"); Label lblFoodItem = (Label)e.Row.FindControl("lblFoodItem"); Label lblfRATE = (Label)e.Row.FindControl("lblfRATE"); Label lblfQTY = (Label)e.Row.FindControl("lblfQTY"); Label lblSubTotal = (Label)e.Row.FindControl("lblSubTotal"); Label lblTOTALAMT = (Label)e.Row.FindControl("lblTOTALAMT"); Label lblCUSTID = (Label)e.Row.FindControl("lblCUSTID"); Label lblLOCATIONID = (Label)e.Row.FindControl("lblLOCATIONID"); Label lblRECEIVERID = (Label)e.Row.FindControl("lblRECEIVERID"); Label lblCUSTFname = (Label)e.Row.FindControl("lblCUSTFname"); Label lblLOCATIONName = (Label)e.Row.FindControl("lblLOCATIONName"); Label lblRECEIVERFname = (Label)e.Row.FindControl("lblRECEIVERFname"); FOODITEM_MASTER foodItems = new FOODITEM_MASTER(); foodItems = FOODITEM_MASTERManager.GetFOODITEM_MASTERByID(int.Parse(lblfID.Text)); if (Items != null) { lblFoodItem.Text = foodItems.ITEMNAME.ToString(); } //lblSubTotal.Text = (decimal.Parse(lblfRATE.Text) * int.Parse(lblfQTY.Text)).ToString(); CUSTOMER cUSTOMER = new CUSTOMER(); cUSTOMER = CUSTOMERManager.GetCUSTOMERByID(int.Parse(lblCUSTID.Text)); if (cUSTOMER != null) { lblCUSTFname.Text = cUSTOMER.CUSTFNAME.ToString(); } LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(lblLOCATIONID.Text)); if (lOCATION != null) { lblLOCATIONName.Text = lOCATION.BRANCH.ToString(); } RECEIVER rECEIVER = new RECEIVER(); rECEIVER = RECEIVERManager.GetRECEIVERByID(int.Parse(lblRECEIVERID.Text)); if (rECEIVER != null) { lblRECEIVERFname.Text = rECEIVER.RECEIVERFNAME.ToString(); } lblTOTALAMT.Text = lblTOTALAMT.Text; } }
protected void loadLocationInfo(int locationID) { LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(locationID); txtBranch.Text = lOCATION.BRANCH.ToString(); lblRate.Text = lOCATION.AGENTRATE.ToString(); }
protected void loadLocationInfo() { LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(Session["snlocationID"].ToString())); txtBranch.Text = lOCATION.BRANCH.ToString(); lblRate.Text = lOCATION.AGENTRATE.ToString(); }
protected void GetlocationInfo() { LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(ddlLoction.SelectedItem.Value.ToString())); if (lOCATION != null) { txtCountry.Text = lOCATION.COUNTRY.ToString(); txtCity.Text = lOCATION.CITY.ToString(); txtBranch.Text = lOCATION.BRANCH.ToString(); loadFoodItem(LOCATIONMAPPINGManager.GetLOCATIONMAPPINGByLOCATIONID(int.Parse(ddlLoction.SelectedItem.Value.ToString()))[0].LOCATIONGROUPID); } }
private void showLocationData() { int locationID = 0; locationID = selecetedGridRow(); LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(locationID); lblLocationID.Text = locationID.ToString(); txtCOUNTRY.Text = lOCATION.COUNTRY; txtCITY.Text = lOCATION.CITY; txtBRANCH.Text = lOCATION.BRANCH; txtBRANCH_CODE.Text = lOCATION.BRANCH_CODE; txtSEQUENCE.Text = lOCATION.SEQUENCE.ToString(); ddlAGENT.SelectedValue = lOCATION.AGENTID.ToString(); txtAGENTRATE.Text = lOCATION.AGENTRATE.ToString(); }
private void showLOCATIONMAPPINGGrid() { gvLOCATIONMAPPING.DataSource = LOCATIONMAPPINGManager.GetAllLOCATIONMAPPINGs(); gvLOCATIONMAPPING.DataBind(); foreach (GridViewRow gvr in gvLOCATIONMAPPING.Rows) { Label lblLOCATIONID = gvr.FindControl("lblLOCATIONID") as Label; Label lblLOCATIONGROUPID = gvr.FindControl("lblLOCATIONGROUPID") as Label; LOCATION location = LOCATIONManager.GetLOCATIONByID(int.Parse(lblLOCATIONID.Text)); if (location != null) { lblLOCATIONID.Text = location.COUNTRY + ", " + location.CITY + ", " + location.BRANCH; } LOCATIONGROUP locationGroup = LOCATIONGROUPManager.GetLOCATIONGROUPByID(int.Parse(lblLOCATIONGROUPID.Text)); if (locationGroup != null) { lblLOCATIONGROUPID.Text = locationGroup.GROUPNAME; } } }
protected void gvTRANS_RowDataBound(object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { Label lblCUSTID = (Label)e.Row.FindControl("lblCUSTID"); Label lblRECEIVERID = (Label)e.Row.FindControl("lblRECEIVERID"); Label lblLOCATIONID = (Label)e.Row.FindControl("lblLOCATIONID"); Label lblCustName = (Label)e.Row.FindControl("lblCustName"); Label lblreceiverName = (Label)e.Row.FindControl("lblreceiverName"); Label lblLocationName = (Label)e.Row.FindControl("lblLocationName"); CUSTOMER cUSTOMER = new CUSTOMER(); cUSTOMER = CUSTOMERManager.GetCUSTOMERByID(int.Parse(lblCUSTID.Text)); if (cUSTOMER != null) { lblCustName.Text = cUSTOMER.CUSTFNAME + " " + cUSTOMER.CUSTMNAME + " " + cUSTOMER.CUSTLNAME; } RECEIVER rECEIVER = new RECEIVER(); rECEIVER = RECEIVERManager.GetRECEIVERByID(int.Parse(lblRECEIVERID.Text)); if (rECEIVER != null) { lblreceiverName.Text = rECEIVER.RECEIVERFNAME + " " + rECEIVER.RECEIVERMNAME + " " + rECEIVER.RECEIVERLNAME; } LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(lblLOCATIONID.Text)); if (lOCATION != null) { lblLocationName.Text = lOCATION.BRANCH.ToString(); } } }
protected void GetlocationInfo() { LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(ddlLoction.SelectedItem.Value.ToString())); if (lOCATION != null) { txtCountry.Text = lOCATION.COUNTRY.ToString(); txtCity.Text = lOCATION.CITY.ToString(); txtBranch.Text = lOCATION.BRANCH.ToString(); //if (txtCity.Text == "GUI-FOOD") //{ loadFoodItem(LOCATIONMAPPINGManager.GetLOCATIONMAPPINGByLOCATIONID(int.Parse(ddlLoction.SelectedItem.Value.ToString()))[0].LOCATIONGROUPID); //} //else //{ // loadFoodItem(1); //} Session["snFoodlocationID"] = ddlLoction.SelectedItem.Value.ToString(); } }
private void ExportToPDF() { Document document = new Document(PageSize.A4, 0, 0, 0, 0); System.IO.MemoryStream msReport = new System.IO.MemoryStream(); try { // creation of the different writers PdfWriter writer = PdfWriter.GetInstance(document, msReport); // we add some meta information to the document document.AddAuthor("Maruf"); document.AddSubject("Report"); document.Open(); iTextSharp.text.Table datatable = new iTextSharp.text.Table(9); datatable.Padding = 2; datatable.Spacing = 0; float[] headerwidths = { 10, 9, 9, 9, 9, 9, 9, 9, 9 }; datatable.Widths = headerwidths; //iTextSharp.text.Table datatable1 = new iTextSharp.text.Table(7); //datatable1.Padding = 2; //datatable1.Spacing = 0; float[] headerwidths1 = { 16, 14, 14, 14, 14, 14, 14 }; //datatable1.Widths = headerwidths1; // the first cell spans 7 columns Cell cell = new Cell(new Phrase("Receipt", FontFactory.GetFont(FontFactory.HELVETICA, 16, Font.BOLD))); cell.HorizontalAlignment = Element.ALIGN_CENTER; cell.Leading = 30; cell.Colspan = 9; cell.Border = Rectangle.NO_BORDER; cell.BackgroundColor = new iTextSharp.text.Color(System.Drawing.Color.Gray); datatable.AddCell(cell); List <string> ssReferenceCodeFINAL = new List <string>(); ssReferenceCodeFINAL = (List <string>)Session["ssReferenceCode"]; string stReferenceCode = string.Empty; datatable.DefaultHorizontalAlignment = Element.ALIGN_LEFT; TRANS tRANS = new TRANS(); tRANS = TRANSManager.GetTRANSByRefCode(ssReferenceCodeFINAL[0].ToString()); if (tRANS != null) { AGENT agent = new AGENT(); agent = AGENTManager.GetAGENTByID(tRANS.AGENTID); if (agent != null) { Cell cell1 = new Cell(new Phrase("Agent No/Location : " + agent.AGENTNAME.ToString(), FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.BOLD))); cell1.HorizontalAlignment = Element.ALIGN_LEFT; //cell1.Leading = 30; cell1.Colspan = 9; cell1.Border = Rectangle.BOX; cell1.BorderWidth = 1; cell1.BackgroundColor = new iTextSharp.text.Color(System.Drawing.Color.WhiteSmoke); datatable.AddCell(cell1); } Cell cellSender = new Cell(new Phrase("Sender Information ", FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.BOLD))); cellSender.HorizontalAlignment = Element.ALIGN_LEFT; cellSender.Colspan = 9; cellSender.Border = Rectangle.NO_BORDER; cellSender.BackgroundColor = new iTextSharp.text.Color(System.Drawing.Color.WhiteSmoke); datatable.AddCell(cellSender); datatable.DefaultCellBorderWidth = 1; datatable.DefaultHorizontalAlignment = 1; datatable.DefaultRowspan = 9; //datatable.Widths = headerwidths; //datatable.ta datatable.AddCell(new Phrase("First Name", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Last Name", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Middle Name", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Address", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("City", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("State", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Zip", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); //datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); //datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.Alignment = Element.ALIGN_CENTER; CUSTOMER cUSTOMER = new CUSTOMER(); cUSTOMER = CUSTOMERManager.GetCUSTOMERByID(int.Parse(tRANS.CUSTID.ToString())); if (cUSTOMER != null) { datatable.AddCell(cUSTOMER.CUSTFNAME); datatable.AddCell(cUSTOMER.CUSTMNAME); datatable.AddCell(cUSTOMER.CUSTLNAME); datatable.AddCell(cUSTOMER.CUSTADDRESS1); datatable.AddCell(cUSTOMER.CUSTCITY); datatable.AddCell(cUSTOMER.CUSTSTATE); datatable.AddCell(cUSTOMER.CUSTZIP); } datatable.AddCell(""); datatable.AddCell(""); //datatable.AddCell(""); //datatable.AddCell(""); } //document.Add(datatable1); //document.Close(); Cell cellLocation = new Cell(new Phrase("Location Information ", FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.BOLD))); cellLocation.HorizontalAlignment = Element.ALIGN_LEFT; cellLocation.Colspan = 9; cellLocation.Border = Rectangle.NO_BORDER; cellLocation.BackgroundColor = new iTextSharp.text.Color(System.Drawing.Color.WhiteSmoke); datatable.AddCell(cellLocation); datatable.DefaultCellBorderWidth = 1; datatable.DefaultHorizontalAlignment = 1; datatable.DefaultRowspan = 9; datatable.AddCell(new Phrase("Branch", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("City", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Country", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); for (int i = 0; i < ssReferenceCodeFINAL.Count; i++) { datatable.DefaultHorizontalAlignment = Element.ALIGN_LEFT; TRANS tRANS1 = new TRANS(); tRANS1 = TRANSManager.GetTRANSByRefCode(ssReferenceCodeFINAL[i].ToString()); if (tRANS1 != null) { datatable.Alignment = Element.ALIGN_CENTER; LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(tRANS1.LOCATIONID.ToString())); if (lOCATION != null) { datatable.AddCell(lOCATION.BRANCH); datatable.AddCell(lOCATION.CITY); datatable.AddCell(lOCATION.COUNTRY); datatable.AddCell(""); datatable.AddCell(""); datatable.AddCell(""); datatable.AddCell(""); datatable.AddCell(""); datatable.AddCell(""); } } } Cell cellReceiver = new Cell(new Phrase("Receiver Information ", FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.BOLD))); cellReceiver.HorizontalAlignment = Element.ALIGN_LEFT; cellReceiver.Colspan = 9; cellReceiver.Border = Rectangle.NO_BORDER; cellReceiver.BackgroundColor = new iTextSharp.text.Color(System.Drawing.Color.WhiteSmoke); datatable.AddCell(cellReceiver); datatable.DefaultCellBorderWidth = 1; datatable.DefaultHorizontalAlignment = 1; datatable.DefaultRowspan = 9; datatable.AddCell(new Phrase("First Name", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Last Name", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Middle Name", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Address", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); //datatable.AddCell(new Phrase("City", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); //datatable.AddCell(new Phrase("State", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Reference Code", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Charges", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Other Charges", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Amount Trans", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); datatable.AddCell(new Phrase("Total Amount", FontFactory.GetFont(FontFactory.HELVETICA, 9, Font.BOLD))); decimal smCharges = 0; decimal smOtherCharges = 0; decimal smAmountTrans = 0; decimal smTotalAmount = 0; for (int i = 0; i < ssReferenceCodeFINAL.Count; i++) { datatable.DefaultHorizontalAlignment = Element.ALIGN_LEFT; TRANS tRANS1 = new TRANS(); tRANS1 = TRANSManager.GetTRANSByRefCode(ssReferenceCodeFINAL[i].ToString()); if (tRANS1 != null) { datatable.Alignment = Element.ALIGN_CENTER; RECEIVER rECEIVER = new RECEIVER(); rECEIVER = RECEIVERManager.GetRECEIVERByID(int.Parse(tRANS1.RECEIVERID.ToString())); if (rECEIVER != null) { datatable.AddCell(rECEIVER.RECEIVERFNAME); datatable.AddCell(rECEIVER.RECEIVERMNAME); datatable.AddCell(rECEIVER.RECEIVERLNAME); datatable.AddCell(rECEIVER.RECEIVERADDRESS1); //datatable.AddCell(rECEIVER.RECEIVERCITY); //datatable.AddCell(rECEIVER.RECEIVERSTATE); datatable.AddCell(ssReferenceCodeFINAL[i].ToString()); } datatable.AddCell(tRANS1.TRANSFEES.ToString()); datatable.AddCell(tRANS1.TRANSOTHERFEES.ToString()); datatable.AddCell(tRANS1.TRANSAMOUNT.ToString()); datatable.AddCell(tRANS1.TRANSTOTALAMOUNT.ToString()); smCharges = smCharges + decimal.Parse(tRANS1.TRANSFEES.ToString()); smOtherCharges = smOtherCharges + decimal.Parse(tRANS1.TRANSOTHERFEES.ToString()); smAmountTrans = smAmountTrans + decimal.Parse(tRANS1.TRANSAMOUNT.ToString()); smTotalAmount = smTotalAmount + decimal.Parse(tRANS1.TRANSTOTALAMOUNT.ToString()); } } //datatable.AddCell(""); //datatable.AddCell(""); datatable.AddCell(""); datatable.AddCell(""); datatable.AddCell(""); datatable.AddCell(""); datatable.AddCell(new Phrase("Total : ", FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.BOLD))); datatable.AddCell(new Phrase(smCharges.ToString(), FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.BOLD))); datatable.AddCell(new Phrase(smOtherCharges.ToString(), FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.BOLD))); datatable.AddCell(new Phrase(smAmountTrans.ToString(), FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.BOLD))); datatable.AddCell(new Phrase(smTotalAmount.ToString(), FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.BOLD))); Cell cellConditionTitle = new Cell(new Phrase("CONDITIONS GOVERNING THE TRANSFER OF FUNDS", FontFactory.GetFont(FontFactory.HELVETICA, 14, Font.BOLD))); cellConditionTitle.HorizontalAlignment = Element.ALIGN_CENTER; cellConditionTitle.Colspan = 9; cellConditionTitle.Border = Rectangle.NO_BORDER; cellConditionTitle.BackgroundColor = new iTextSharp.text.Color(System.Drawing.Color.WhiteSmoke); datatable.AddCell(cellConditionTitle); string ConditionDesc = string.Empty; ConditionDesc = "Customer(s) (“You”) authorize KOROMSTAR ENTERPRISE (“Us/We”) to make thewire transfer described on this form.CURRENCYEXCHANGE:In addition to the transfer fee, KOROMSTAR ENTERPRISE also makes money when it changesyour dollars into foreign currency. Payments willgenerally be in local currency. In addition to the transfer feesapplicable to this transaction, a currency exchange rate will beapplied. United States currency is converted to foreign currency at anexchange rate set by KOROMSTAR ENTERPRISE. Any difference between the rate given to Customers and the rate receivedby KOROMSTAR ENTERPRISE will be kept by KOROMSTAR ENTERPRISE(and its Agents in some cases) in addition to the transfer fees.We may transfer funds through an Intermediary Bank or funds transfersystem tha is different from that shown in your instructions. If we receive your payment order after our processing ending hour, or ona weekend or holiday, we may process it on the next funds-transferbusiness day. A delay may also occur if an Intermediary Bank or theBeneficiary Bank is not accepting payment orders (e.g. due to a localholiday).You agree to hold KOROMSTAR ENTERPRISE harmlessfrom any loss that occurs if your instructions are incomplete,ambiguous, or incorrect. We are not required to seek clarification fromanyone regarding ambiguous instructions. If we cannot complete atransfer .g. because of an ambiguity), we will notify you orally or inwriting at the end of the next business day. We will not be liable for the consequential, special, or exemplarydamages or losses of any kind. We will not be liable for any failure toact or delay due to: circumstances beyond our control; fire, flood, ornatural disasters; communication failures; labor disputes; anyinaccuracy or ambiguity in your instructions; the action or inaction ofothers; or any applicable government or funds-transfer system rule,policy, or regulations.REFUNDOF PRINCIPAL AMOUNTand cancellation of the money transfer will be made upon written requestof the Sender if payment to the Receiver has not yet been made at thetime the request is processed by KOROMSTAR ENTERPRISE . REFUNDS OFTRANSFER FEES will be made upon written request of the Sender if themoney transfer is not available to the Receiver within the timespecified by KOROMSTAR ENTERPRISE forthe selected service, subject to the hours of operation that the Serviceis offered at the Agent location selected by the Receiver for paymentand other special conditions. Refund will be made within 45 days ofreceipt of a valid written request from the Sender.LIMITATION OF LIABILITY: IN NO EVENT SHALL KOROMSTAR ENTERPRISE BELIABLE FOR DAMAGES FOR DELAY, NON DELIVERY, NON PAYMENT OR UNDERPAYMENTOF ANY MONEY TRANSFER, OR ANY SUPPLEMENTAL MESSAGE WHETHER CAUSED BYNEGLIGENCE ON THE PART OF ITS EMPLOYEES, SUPPLIERS OR AGENTS OROTHERWISE BEYOND THE SUM OF $500 (in addition to refunding the principalamount of the money transfer and the transfer fees), IN NO EVENT WILLKOROMSTAR ENTERPRISE BE LIABLE FORANY INDIRECT, SPECIAL, INCIDENTAL, CONSEQUENTIAL EXEMPLENARY OR PUNITIVEDAMGES, OR THE LIKE. THESE CONDITIONS CANNOT BE CHANGED OR SUPPLEMENTEDORALLY.KOROMSTAR ENTERPRISE reserved theright to limit the principal amount of a money transfer, or to reject aproposed money transfer, in its sole discretion. KOROMSTAR ENTERPRISE assumes no obligation fordamages resulting from nonpayment of the money transfer or any failureto complete any applicable Service transaction by reason of such lack ofauthorization. KOROMSTAR ENTERPRISE reservesthe right to refuse to provide the Service to you at anytime for anyreason deemed necessary to protect KOROMSTAR ENTERPRISE ’s interests."; Cell cellConditionDesc = new Cell(new Phrase(ConditionDesc, FontFactory.GetFont(FontFactory.HELVETICA, 8, Font.NORMAL))); cellConditionDesc.HorizontalAlignment = Element.ALIGN_JUSTIFIED; cellConditionDesc.Colspan = 9; cellConditionDesc.Border = Rectangle.NO_BORDER; cellConditionDesc.BackgroundColor = new iTextSharp.text.Color(System.Drawing.Color.White); datatable.AddCell(cellConditionDesc); Cell cellAgentSignature = new Cell(new Phrase("AGENT SIGNATURE", FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.NORMAL))); cellAgentSignature.HorizontalAlignment = Element.ALIGN_LEFT; cellAgentSignature.Leading = 100; cellAgentSignature.Colspan = 5; cellAgentSignature.Border = Rectangle.NO_BORDER; cellAgentSignature.BackgroundColor = new iTextSharp.text.Color(System.Drawing.Color.White); datatable.AddCell(cellAgentSignature); Cell cellCustomerSignature = new Cell(new Phrase("CUSTOMER SIGNATURE", FontFactory.GetFont(FontFactory.HELVETICA, 10, Font.NORMAL))); cellCustomerSignature.HorizontalAlignment = Element.ALIGN_RIGHT; cellCustomerSignature.Leading = 100; cellCustomerSignature.Colspan = 4; cellCustomerSignature.Border = Rectangle.NO_BORDER; cellCustomerSignature.BackgroundColor = new iTextSharp.text.Color(System.Drawing.Color.White); datatable.AddCell(cellCustomerSignature); document.Add(datatable); } catch (Exception e) { //Console.Error.WriteLine(e.Message); } document.Close(); Response.Clear(); Response.AddHeader("content-disposition", "attachment;filename=Receipt.pdf"); Response.ContentType = "application/pdf"; Response.BinaryWrite(msReport.ToArray()); Response.End(); }
protected void gvLocation_RowDataBound(Object sender, GridViewRowEventArgs e) { if (e.Row.RowType == DataControlRowType.DataRow) { HiddenField hfAgnetID = (HiddenField)e.Row.FindControl("hfAgnetID"); GridView gvPayment = (GridView)e.Row.FindControl("gvPayment"); List <TRANS> tRANSs = new List <TRANS>(); tRANSs = TRANSManager.GetTRANSByAgnetIDnLocationIDsByDateNAmount(getLocationIDs(), int.Parse(hfAgnetID.Value), txtFromDate.Text, txtToDate.Text, int.Parse(txtMoney.Text == "" ? "0" : txtMoney.Text)); List <TRANS> tRANSsDistinct = new List <TRANS>(); int count = 0; for (int i = 0; i < tRANSs.Count; i++) { count = tRANSsDistinct.FindAll(x => x.LOCATIONID == tRANSs[i].LOCATIONID).Count; if (count == 0) { tRANSsDistinct.Add(tRANSs[i]); } } gvPayment.DataSource = tRANSsDistinct; gvPayment.DataBind(); decimal totalAgentCommision = 0; for (int i = 0; i < gvPayment.Rows.Count; i++) { Label lblAgentID = (Label)gvPayment.Rows[i].FindControl("lblAgentID"); lblAgentID.Text = hfAgnetID.Value.ToString(); Label lblLocationID = (Label)gvPayment.Rows[i].FindControl("lblLocationID"); Label lblPayAgentID = (Label)gvPayment.Rows[i].FindControl("lblAgentID"); Label lblTransCount = (Label)gvPayment.Rows[i].FindControl("lblTransCount"); Label lblRate = (Label)gvPayment.Rows[i].FindControl("lblRate"); Label lblFees = (Label)gvPayment.Rows[i].FindControl("lblFees"); Label lblAgentCommision = (Label)gvPayment.Rows[i].FindControl("lblAgentCommision"); Label lbllocationName = (Label)gvPayment.Rows[i].FindControl("lbllocationName"); lblPayAgentID.Text = hfAgnetID.Value.ToString(); if (lblPayAgentID.Text != "") { List <TRANS> tRANSsTransactionCount = new List <TRANS>(); foreach (TRANS tRANS in tRANSs) { if (tRANS.LOCATIONID == int.Parse(lblLocationID.Text)) { tRANSsTransactionCount.Add(tRANS); } } lblTransCount.Text = tRANSsTransactionCount.Count.ToString(); LOCATION lOCATION = new LOCATION(); lOCATION = LOCATIONManager.GetLOCATIONByID(int.Parse(lblLocationID.Text)); lblRate.Text = lOCATION.AGENTRATE.ToString(); lbllocationName.Text = lOCATION.BRANCH.ToString(); List <decimal> fees = new List <decimal>(); for (int j = 0; j < tRANSsTransactionCount.Count; j++) { fees.Add(tRANSsTransactionCount[j].TRANSFEES + tRANSsTransactionCount[j].TRANSOTHERFEES); } lblFees.Text = fees.Sum().ToString(); lblAgentCommision.Text = ((decimal.Parse(lblRate.Text) * decimal.Parse(lblFees.Text)) / 100).ToString(); totalAgentCommision = decimal.Parse(lblAgentCommision.Text) + totalAgentCommision; //just formating the currency lblAgentCommision.Text = String.Format("{0:C}", decimal.Parse(lblAgentCommision.Text)); lblRate.Text = lOCATION.AGENTRATE.ToString() + "%"; } } Label lblTotalAgentCommission = (Label)gvPayment.FooterRow.FindControl("lblTotalAgentCommission"); lblTotalAgentCommission.Text = String.Format("{0:C}", totalAgentCommision); } }