public BookingInfoUI(long _bookingNo) { InitializeComponent(); var rr = Glob_Bookings.Select_Row_Booking(_bookingNo); orignalbookingno = rr.BOOKING_ID; referencetypeVar = rr.REFERENCE_TYPE; bookingid_Link.Text = rr.BOOKING_ID.ToString(); BookedBy_ReferenceCode_Link.Text = rr.REFERENCE_CODE.ToString(); BookingData_Link.Text = rr.BOOKING_DATE.ToLongDateString(); PackageCode_Link.Text = rr.PACKAGE_CODE.ToString(); FornoofPersons_Link.Text = rr.FOR_NO_OF_PERSONS.ToString(); BillId_Link.Text = rr.BILL_ID.ToString(); StatusToggle.Checked = rr.BOOKING_STATUS; StatusToggle.Show(); if (rr.BOOKING_STATUS == false) { StatusToggle.Hide(); canceledLable.Show(); } }
public PrintUI(long bookingId) { InitializeComponent(); var br = Glob_Bill_Payments.Select_Row_Bill_Payment(bookingId); orignalBillid = br.BILL_ID; BillNoTxt.Text = br.BILL_ID.ToString(); BillingDateTxt.Text = br.BILL_DATE.ToLongDateString(); OrignaltotalTxt.Text = br.TOTAL_ORIGNAL_AMOUNT.ToString(); GrandTotal_Txt.Text = br.TOTAL_ORIGNAL_AMOUNT.ToString(); Special_OfferTxt.Text = br.SPECIAL_OFFER_DISCOUNT.ToString(); ExtraDiscountTxt.Text = br.EXTRA_DISCOUNT.ToString(); Total_Discount.Text = br.TOTAL_DISCOUNT.ToString(); GrandTotal_Txt.Text = (br.TOTAL_ORIGNAL_AMOUNT - br.TOTAL_DISCOUNT).ToString(); Collected_Amount_Txt.Text = ((br.TOTAL_ORIGNAL_AMOUNT - br.TOTAL_DISCOUNT) - br.REMAINING_AMOUNT).ToString(); Remaining_Amount_Txt.Text = br.REMAINING_AMOUNT.ToString(); if (br.IsREFUNDED == true) { canceledLable.Show(); } //for RemainingBillbutton if ((br.IsPAID_FULL == false) && (br.IsREFUNDED == false)) { PayRemainingBtn.Show(); } // OurCompany Info var oc = WARPRO.Glob.CustomersAndAgents.Glob_OurCompanyProfile.Get_Select_Row_OurCompanyProfile(); HeaderCompanyNameTxt.Text = oc.COMPANY_NAME.ToUpper(); FromBillOurcomp_Txt.Text = oc.COMPANY_NAME + "\nCONTACT INFO:\n" + oc.COMPANY_MOBILE_NO.ToString() + " - " + oc.OWNER_MOBILE_NO.ToString() + "\n" + oc.ADDRESS; if (oc.IMAGE != null) { ImageR.Image = WARPRO.Glob.CacheData.Glob_Veriables.GetImageFromByteArray(oc.IMAGE); } var bkr = Glob_Bookings.Select_Row_Booking(br.BOOKING_ID_NO); int custtype = br.REFERENCE_TYPE; BookingFor_NoOfPersonsTxt.Text = bkr.FOR_NO_OF_PERSONS.ToString(); var pkgr = WARPRO.Glob.Packages.Glob_Packages.Get_Select_Row_Package(bkr.PACKAGE_CODE); Package_InfoHeadTxt.Text = ("PACKAGE :" + pkgr.PACKAGE_NAME + "\nWITH PACKAGE ID # " + pkgr.PACKAGE_CODE.ToString() + "\nAND PACKAGE DAYS :" + pkgr.FOR_NO_OF_DAYS.ToString()).ToUpper(); if (custtype == 1) { var custrow = WARPRO.Glob.CustomersAndAgents.CustomersAndAgents_class.Select_Row_Customer(br.REFERENCE_CODE); BillingTo_Txt.Text = (custrow.FIRST_NAME + " " + custrow.LAST_NAME + "\n" + "CUSTOMER ID # " + custrow.ID.ToString() + "\n" + custrow.ADDRESS).ToUpper(); } else if (custtype == 2) { var custrow = WARPRO.Glob.CustomersAndAgents.Agents_Partial.Select_Row_Agent(br.REFERENCE_CODE); BillingTo_Txt.Text = (custrow.FIRST_NAME + " " + custrow.LAST_NAME + "\n" + "AGENT ID # " + custrow.ID.ToString() + "\n" + custrow.ADDRESS).ToUpper(); } }