public Task <int> SaveAllVehicleTypesInSQLLite(string apitoken, int LocationID) { Task <int> output = null; DALPass objDALPass = new DALPass(); try { bool istableexist = IsTableExists(db, "VehicleType"); if (!istableexist) { db.CreateTableAsync <VehicleType>(); } Task <int> deleted = db.ExecuteAsync("DELETE FROM VehicleType"); var lstVehicleType = objDALPass.GetAllVehicleTypes(apitoken, LocationID); for (var item = 0; item < lstVehicleType.Count; item++) { output = db.InsertAsync(lstVehicleType[item]); } } catch (Exception ex) { throw ex; } return(output); }
public DayPassPaymentConfirmationPage() { InitializeComponent(); stLayoutDailyPassGeneratePassReceipt.IsVisible = false; dal_CustomerPass = new DALPass(); dal_Exceptionlog = new DALExceptionManagment(); }
public async Task GetAllVehicleType() { try { DALPass objDALPass = new DALPass(); if (App.Current.Properties.ContainsKey("apitoken")) { var lstVehicleType = await App.SQLiteDb.GetAllVehicleTypesInSQLLite(); if (lstVehicleType != null && lstVehicleType.Count > 0) { lstVehicleType = lstVehicleType.OrderBy(i => i.VehicleTypeID).ToList(); _vehicleType = new ObservableCollection <VehicleType>(lstVehicleType); collstviewVehicleTye.WidthRequest = 300; collstviewVehicleTye.ItemsSource = _vehicleType; collstviewVehicleTye.SelectedItem = _vehicleType[0]; SelectedVehicle = _vehicleType[0].VehicleTypeCode; } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "NewPassPage.xaml.cs", "", "GetAllVehicleType"); } }
private void LoadPasseTypesAndPriceDetails(string SelectedVehicle) { try { ShowLoading(true); if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { User objloginuser = (User)App.Current.Properties["LoginUser"]; VMPass vm_Pass = new VMPass(); DALPass dal_Pass = new DALPass(); VehicleLotPassPrice objVehicleLotPassPrice = new VehicleLotPassPrice(); objVehicleLotPassPrice.VehicleTypeCode = SelectedVehicle; objVehicleLotPassPrice.LocationID = objloginuser.LocationParkingLotID.LocationID.LocationID; objVehicleLotPassPrice.LocationParkingLotID = objloginuser.LocationParkingLotID.LocationParkingLotID; List <PassPrice> lstVMPass = dal_Pass.GetPassPriceDetails(Convert.ToString(App.Current.Properties["apitoken"]), objVehicleLotPassPrice); if (objReNewVehicle != null && objReNewVehicle.CustomerVehiclePassID != 0) { List <PassPrice> renewSelectedPass = lstVMPass.Where(p => (p.PassTypeID.PassTypeCode.ToUpper() == objReNewVehicle.PassPriceID.PassTypeID.PassTypeCode.ToUpper()) && p.StationAccess.ToUpper() == objReNewVehicle.PassPriceID.StationAccess.ToUpper()).ToList(); LstVehiclePasses.ItemsSource = renewSelectedPass; } else { LstVehiclePasses.ItemsSource = lstVMPass; } } ShowLoading(false); } catch (Exception ex) { ShowLoading(false); dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "NewPassPage.xaml.cs", "", "LoadPasseTypesAndPriceDetails"); } }
public DailyPass() { InitializeComponent(); dal_Exceptionlog = new DALExceptionManagment(); dal_Pass = new DALPass(); objCustomerPass = new CustomerVehiclePass(); }
public async void GetSelectedVehicleType(string VehicleTypeCode) { try { DALPass objDALPass = new DALPass(); if (App.Current.Properties.ContainsKey("apitoken")) { var lstVehicleType = await App.SQLiteDb.GetAllVehicleTypesInSQLLite(); if (lstVehicleType.Count > 0) { var resultvehihcle = lstVehicleType.Where(v => v.VehicleTypeCode == VehicleTypeCode).ToList(); if (resultvehihcle != null & resultvehihcle.Count > 0) { _vehicleType = new ObservableCollection <VehicleType>(resultvehihcle); if (_vehicleType.Count > 0) { for (var item = 0; item < _vehicleType.Count; item++) { _vehicleType[item].VehicleDisplayImage = _vehicleType[item].VehicleActiveImage; _vehicleType[item] = _vehicleType[item]; } collstviewVehicleTye.WidthRequest = 110; collstviewVehicleTye.ItemsSource = _vehicleType; SelectedVehicle = _vehicleType[0].VehicleTypeCode; } } } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "NewPassPage.xaml.cs", "", "GetSelectedVehicleType"); } }
public WeeklyPassPage() { InitializeComponent(); dal_Exceptionlog = new DALExceptionManagment(); dal_Pass = new DALPass(); objCustomerPass = new CustomerVehiclePass(); dal_DALCheckIn = new DALCheckIn(); }
public MonthlyPassCashPaymentPage() { InitializeComponent(); slNFCCard.IsVisible = false; slCashPaymentGeneratePass.IsVisible = false; slBARCode.IsVisible = false; dal_CustomerPass = new DALPass(); dal_DALCheckIn = new DALCheckIn(); }
public MonthlyPassPage(string monthlyPassStationType) { InitializeComponent(); dal_Exceptionlog = new DALExceptionManagment(); dal_Pass = new DALPass(); dal_DALCheckIn = new DALCheckIn(); slAllStationMessage.IsVisible = false; objCustomerPass = new CustomerVehiclePass(); }
public MyPasses() { InitializeComponent(); ShowLoading(true); dal_Vehicle = new DALVehicle(); dal_Pass = new DALPass(); GetListOfPassesByCustomerID(); ShowLoading(false); }
public async Task GetSelectedVehicleDetails(CustomerVehicle selectedVehicle) { try { string IsPassInOverstay = string.Empty; if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { User objloginuser = (User)App.Current.Properties["LoginUser"]; DALPass dal_Pass = new DALPass(); objResultCustomerVehiclePass = dal_Pass.GetCustomerVehicleDetailsByVehicle(Convert.ToString(App.Current.Properties["apitoken"]), selectedVehicle); if (objResultCustomerVehiclePass != null) { IsPassInOverstay = VerifyPassVehicleCheckInStatus(objResultCustomerVehiclePass.CustomerVehicleID.VehicleTypeID.VehicleTypeCode, objResultCustomerVehiclePass.CustomerVehicleID.RegistrationNumber); if (IsPassInOverstay == string.Empty) { entryCustomerName.Text = objResultCustomerVehiclePass.CustomerVehicleID.CustomerID.Name; entryPhoneNumber.Text = objResultCustomerVehiclePass.CustomerVehicleID.CustomerID.PhoneNumber; entryRegistrationNumber.Text = objResultCustomerVehiclePass.CustomerVehicleID.RegistrationNumber; labelNFCCardAmount.Text = objResultCustomerVehiclePass.PassPriceID.CardPrice == 0 ? "0.00" : " ( ₹ " + objResultCustomerVehiclePass.PassPriceID.CardPrice.ToString("N2") + " EXTRA )"; BtnChoosePass.IsEnabled = true; // Verify Customer Vehicle Type imgCustomerVehcileType.Source = objResultCustomerVehiclePass.CustomerVehicleID.VehicleTypeID.VehicleIcon; if (objResultCustomerVehiclePass.PassPriceID.PassTypeID.PassTypeCode.ToUpper() == "WP" || objResultCustomerVehiclePass.PassPriceID.PassTypeID.PassTypeCode.ToUpper() == "EP") { slNFC.IsVisible = false; } else { slNFC.IsVisible = true; } if (objResultCustomerVehiclePass.PassPriceID.PassTypeID.PassTypeCode.ToUpper() == "EP") { string alertmsg = objResultCustomerVehiclePass.CustomerVehicleID.RegistrationNumber + ": " + objResultCustomerVehiclePass.PassPriceID.PassTypeID.PassTypeName + "Unable to renew,Please contact Admin"; await DisplayAlert("Alert", alertmsg, "Ok"); BtnChoosePass.IsEnabled = false; } } else { await DisplayAlert("Alert", "Please clear due amount to Buy/Renew Pass", "Ok"); } } } } catch (Exception ex) { await DisplayAlert("", "" + ex, "Ok"); } }
public ExtendSession(CustomerParkingSlotDetails customerParkingSlotDetails) { InitializeComponent(); ShowLoading(true); objCustomerParkingSlotDetails = customerParkingSlotDetails; VehicleTypeID = customerParkingSlotDetails.VehicleTypeID; CustomerID = customerParkingSlotDetails.CustomerID; CustomerVehicleID = customerParkingSlotDetails.CustomerVehicleID; CustomerParkingSlotID = customerParkingSlotDetails.CustomerParkingSlotID; LocationParkingLotID = customerParkingSlotDetails.LocationParkingLotID; LocationParkingLotName = customerParkingSlotDetails.LocationParkingLotName; dal_LocationParkingLot = new DALLocationParkingLots(); dal_Customer = new DALCustomer(); dal_Vehicle = new DALVehicle(); dal_Pass = new DALPass(); objCustomerParkingSlotDetails.LotOpenCloseTime = ("(" + objCustomerParkingSlotDetails.LotOpeningTime + " - " + objCustomerParkingSlotDetails.LotClosingTime + ")").ToLower(); if (VehicleTypeID == Convert.ToInt32(VehicleTypeCodes.TwoWheelerTypeID)) { imgVehicle.Source = "resource://InstaConsumer.Resources." + VehicleTypeCodes.TwoWheelerGreenSpots; } else if (VehicleTypeID == Convert.ToInt32(VehicleTypeCodes.FourWheelerTypeID)) { imgVehicle.Source = "resource://InstaConsumer.Resources." + VehicleTypeCodes.FourWheelerGreenSpots; } this.BindingContext = objCustomerParkingSlotDetails; VehicleTypeID = customerParkingSlotDetails.VehicleTypeID; CustomerID = customerParkingSlotDetails.CustomerID; CustomerVehicleID = customerParkingSlotDetails.CustomerVehicleID; RegistrationNumber = customerParkingSlotDetails.RegistrationNumber; CustomerParkingSlotID = customerParkingSlotDetails.CustomerParkingSlotID; LocationID = customerParkingSlotDetails.LocationID; LocationParkingLotID = customerParkingSlotDetails.LocationParkingLotID; LocationParkingLotName = customerParkingSlotDetails.LocationParkingLotName; dal_LocationParkingLot = new DALLocationParkingLots(); dal_Customer = new DALCustomer(); dal_Vehicle = new DALVehicle(); dal_Pass = new DALPass(); ParkingBayRange = customerParkingSlotDetails.ParkingBayRange; ParkingBayID = customerParkingSlotDetails.ParkingBayID; Duration = 1; IsFullDay = false; ShowLoading(false); }
public BuyAPass(OCustomerVehicle obj_OCustomerVehicle) { InitializeComponent(); ShowLoading(true); dal_Pass = new DALPass(); dal_Vehicle = new DALVehicle(); dal_Customer = new DALCustomer(); dal_LocationParkingLots = new DALLocationParkingLots(); objOCustomerVehicle = obj_OCustomerVehicle; VehicleTypeID = obj_OCustomerVehicle.VehicleTypeID; LocationID = obj_OCustomerVehicle.LocationID; CustomerID = obj_OCustomerVehicle.CustomerID; ShowLoading(false); }
public async Task GetSelectedVehicleDetails(CustomerVehicle selectedVehicle) { try { ShowLoading(true); if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { User objloginuser = (User)App.Current.Properties["LoginUser"]; dal_Pass = new DALPass(); await Task.Run(() => { objResultCustomerVehiclePass = dal_Pass.GetCustomerVehicleDetailsByVehicle(Convert.ToString(App.Current.Properties["apitoken"]), selectedVehicle); }); if (objResultCustomerVehiclePass != null && objResultCustomerVehiclePass.CustomerVehiclePassID != 0) { entryCustomerName.Text = objResultCustomerVehiclePass.CustomerVehicleID.CustomerID.Name; entryPhoneNumber.Text = objResultCustomerVehiclePass.CustomerVehicleID.CustomerID.PhoneNumber; entryRegistrationNumber.Text = objResultCustomerVehiclePass.CustomerVehicleID.RegistrationNumber; // Verify Customer Vehicle Type imgCustomerVehcileType.Source = objResultCustomerVehiclePass.CustomerVehicleID.VehicleTypeID.VehicleIcon; if (objResultCustomerVehiclePass.PassPriceID.PassTypeID.PassTypeCode.ToUpper() == "WP") { slContinue.IsVisible = false; stlayoutNFCCardPayment.IsVisible = false; await DisplayAlert("Alert", "NFC card not valid for this Pass type.", "Ok"); } if (objResultCustomerVehiclePass.CardNumber != null && objResultCustomerVehiclePass.CardNumber != "") { await DisplayAlert("Alert", "This vehicle already has NFC card.", "Ok"); } } else { await DisplayAlert("Alert", "No records found,Please contact Admin.", "Ok"); } } ShowLoading(false); } catch (Exception ex) { ShowLoading(false); dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "ActivatePassPage.xaml.cs", "", "GetSelectedVehicleDetails)"); } }
public NFCCardCashPaymentPage(CustomerVehiclePass objNewNFC) { InitializeComponent(); dal_CustomerPass = new DALPass(); dal_Exceptionlog = new DALExceptionManagment(); stLayoutNFCCard.IsVisible = false; try { objCustomerPassNewNFC = objNewNFC; ImgVehicleType.Source = objCustomerPassNewNFC.CustomerVehicleID.VehicleTypeID.VehicleIcon; labelVehicleRegNumber.Text = objCustomerPassNewNFC.CustomerVehicleID.RegistrationNumber; labelParkingLocation.Text = objCustomerPassNewNFC.CreatedBy.LocationParkingLotID.LocationID.LocationName + "-" + objCustomerPassNewNFC.PassPriceID.StationAccess; labelNFCCardAmount.Text = objCustomerPassNewNFC.PassPriceID.CardPrice.ToString("N2"); } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "NFCCardCashPaymentPage.xaml.cs", "", "NFCCardCashPaymentPage"); } }
public ActivatePassPage() { InitializeComponent(); slContinue.IsVisible = false; stlayoutNFCCardPayment.IsVisible = false; slNFCBarCodeSection.IsVisible = false; dal_Pass = new DALPass(); dal_Exceptionlog = new DALExceptionManagment(); GetAllPassedVehicles(); try { CheckNFCSupported(); } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "ActivatePassPage.xaml.cs", "", "ActivatePassPage()"); DisplayAlert("Alert", "Unable to proceed,Please contact Admin" + ex.Message, "Ok"); } }
public DayPassPaymentConfirmationPage(string NewOrReNew, CustomerVehiclePass objCustomerPass) { InitializeComponent(); dal_CustomerPass = new DALPass(); IsNewOrReNew = NewOrReNew; try { stLayoutDailyPassGeneratePassReceipt.IsVisible = false; objCustomerDayPass = objCustomerPass; ImgVehicleType.Source = objCustomerDayPass.CustomerVehicleID.VehicleTypeID.VehicleIcon; labelPassType.Text = "( " + objCustomerDayPass.PassPriceID.PassTypeID.PassTypeName + " )"; labelVehicleRegNumber.Text = objCustomerDayPass.CustomerVehicleID.RegistrationNumber; labelParkingLocation.Text = objCustomerDayPass.LocationID.LocationName + "-" + objCustomerDayPass.PassPriceID.StationAccess; labelPassAmount.Text = (objCustomerDayPass.Amount + objCustomerDayPass.DueAmount).ToString("N2") + "/-"; } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "DayPassPaymentConfirmationPage.xaml.cs", "", "DayPassPaymentConfirmationPage"); } }
public WeeklyPassCashPaymentPage(string NewOrReNew, CustomerVehiclePass objCustomerPass) { InitializeComponent(); dal_CustomerPass = new DALPass(); dal_Exceptionlog = new DALExceptionManagment(); IsNewOrReNew = NewOrReNew; try { stLayoutDailyPassGeneratePassReceipt.IsVisible = false; objCustomerweeklyPass = objCustomerPass; ImgVehicleType.Source = objCustomerPass.CustomerVehicleID.VehicleTypeID.VehicleIcon; labelVehicleRegNumber.Text = objCustomerweeklyPass.CustomerVehicleID.RegistrationNumber; labelParkingLocation.Text = objCustomerweeklyPass.LocationID.LocationName + "-" + "Single Station"; labelPassAmount.Text = (objCustomerweeklyPass.Amount + objCustomerweeklyPass.DueAmount).ToString("N2") + "/-"; labelAmountDetails.Text = (objCustomerweeklyPass.Amount).ToString("N2") + " Rs Pass +" + (objCustomerweeklyPass.DueAmount).ToString("N2") + " Rs Due Amount"; } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "WeeklyPassCashPaymentPage.xaml.cs", "", "WeeklyPassCashPaymentPage"); } }
public async void GetAllVehicleType() { try { DALPass objDALPass = new DALPass(); if (App.Current.Properties.ContainsKey("apitoken")) { var lstVehicleType = await App.SQLiteDb.GetAllVehicleTypesInSQLLite(); _vehicleType = new ObservableCollection <VehicleType>(lstVehicleType); if (_vehicleType.Count > 0) { collstviewVehicleTye.ItemsSource = _vehicleType; collstviewVehicleTye.SelectedItem = _vehicleType[0]; } } } catch (Exception ex) { } }
public MonthlyPassCashPaymentPage(CustomerVehiclePass objmonthlyPass) { InitializeComponent(); dal_Exceptionlog = new DALExceptionManagment(); dal_CustomerPass = new DALPass(); slNFCCard.IsVisible = false; slBARCode.IsVisible = false; dal_DALCheckIn = new DALCheckIn(); slCashPaymentGeneratePass.IsVisible = false; try { objInputMonthlyPass = objmonthlyPass; ImgVehicleType.Source = objInputMonthlyPass.CustomerVehicleID.VehicleTypeID.VehicleIcon; labelVehicleRegNumber.Text = objInputMonthlyPass.CustomerVehicleID.RegistrationNumber; labelParkingLocation.Text = objInputMonthlyPass.LocationID.LocationName + "-" + objInputMonthlyPass.PassPriceID.StationAccess; labelPassAmount.Text = (objInputMonthlyPass.TotalAmount + objInputMonthlyPass.DueAmount).ToString("N2") + "/-"; if (objInputMonthlyPass.IssuedCard) { labelAmountDetails.Text = "( " + (objInputMonthlyPass.Amount).ToString("N2") + " Rs Pass + " + objInputMonthlyPass.CardAmount.ToString("N2") + " Rs Card +" + objInputMonthlyPass.DueAmount.ToString("N2") + "Rs Due Amount )"; } else { labelAmountDetails.Text = "( " + (objInputMonthlyPass.Amount).ToString("N2") + " Rs Pass +" + objInputMonthlyPass.DueAmount.ToString("N2") + "Rs Due Amount )"; } try { CheckNFCSupported(); } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "MonthlyPassCashPaymentPage.xaml.cs", "", "CheckNFCSupported"); DisplayAlert("Alert", "Unable to proceed,Please contact Admin" + ex.Message, "Ok"); } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "MonthlyPassCashPaymentPage.xaml.cs", "", "MonthlyPassCashPaymentPage"); } }
private void LoadPasseTypesAndPriceDetails(string SelectedVehicle) { try { if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { User objloginuser = (User)App.Current.Properties["LoginUser"]; DALPass dal_Pass = new DALPass(); VehicleLotPassPrice objVehicleLotPassPrice = new VehicleLotPassPrice(); objVehicleLotPassPrice.VehicleTypeCode = SelectedVehicle; objVehicleLotPassPrice.LocationParkingLotID = objloginuser.LocationParkingLotID.LocationParkingLotID; var lstVMPass = dal_Pass.GetPassPriceDetails(Convert.ToString(App.Current.Properties["apitoken"]), objVehicleLotPassPrice); } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "NewPassPage.xaml.cs", "", "LoadPasseTypesAndPriceDetails"); } }
public WeeklyPassPage(string NewOrReNew, PassPrice objvmPass) { InitializeComponent(); dal_Exceptionlog = new DALExceptionManagment(); dal_Pass = new DALPass(); objCustomerPass = new CustomerVehiclePass(); dal_DALCheckIn = new DALCheckIn(); IsNewORReNew = NewOrReNew; objResultVMPass = objvmPass; int daystoexpire = 0; int passduration = 0; try { passduration = objResultVMPass.Duration == "" || objResultVMPass.Duration == null ? 0 : (Convert.ToInt32(objResultVMPass.Duration) - 1); objResultVMPass.EndDate = Convert.ToDateTime(objResultVMPass.StartDate).AddDays(passduration); if (NewOrReNew == "New Pass") { labelGeneratePassPageTitle.Text = "GENERATE PASS"; } else if (NewOrReNew == "ReNew Pass") { labelGeneratePassPageTitle.Text = "RENEW PASS"; //Get ReNew Customer Details From APP Properties if (App.Current.Properties.ContainsKey("ReNewPassCustomerVehicle")) { CustomerVehiclePass objReNewVehicle = (CustomerVehiclePass)App.Current.Properties["ReNewPassCustomerVehicle"]; objCustomerPass.CustomerVehiclePassID = objReNewVehicle.CustomerVehiclePassID; objCustomerPass.CustomerVehicleID = objReNewVehicle.CustomerVehicleID; objCustomerPass.CustomerVehicleID.CustomerID.CustomerID = objReNewVehicle.CustomerVehicleID.CustomerID.CustomerID; entryRegistrationNumber.Text = objReNewVehicle.CustomerVehicleID.RegistrationNumber; entryPhoneNumber.Text = objReNewVehicle.CustomerVehicleID.CustomerID.PhoneNumber; entryName.Text = objReNewVehicle.CustomerVehicleID.CustomerID.Name; entryRegistrationNumber.IsReadOnly = true; entryPhoneNumber.IsReadOnly = true; entryName.IsReadOnly = true; daystoexpire = (Convert.ToDateTime(objReNewVehicle.ExpiryDate).Date - DateTime.Now.Date).Days; if (daystoexpire >= 0) { daystoexpire = (daystoexpire + 1); passduration = (passduration + daystoexpire); labelValidTo.Text = Convert.ToDateTime(objResultVMPass.StartDate).AddDays(passduration).ToString("dd MMM yyyy"); objResultVMPass.EndDate = Convert.ToDateTime(objResultVMPass.StartDate).AddDays(passduration); } else { objResultVMPass.EndDate = Convert.ToDateTime(objResultVMPass.StartDate).AddDays(passduration); } GetVehiceDueAmont(objReNewVehicle.CustomerVehicleID.RegistrationNumber, objResultVMPass.VehicleTypeID.VehicleTypeCode); } } labelPassType.Text = objResultVMPass.PassTypeID.PassTypeName.ToUpper(); labelPassStationAccess.Text = objResultVMPass.StationAccess.ToUpper(); labelPassAmount.Text = String.Format("{0:0.#}", objResultVMPass.Price); labelValidFrom.Text = Convert.ToDateTime(objResultVMPass.StartDate).ToString("dd MMM yyyy"); labelValidTo.Text = Convert.ToDateTime(objResultVMPass.EndDate).ToString("dd MMM yyyy"); imgCustomerVehcileType.Source = objResultVMPass.VehicleTypeID.VehicleIcon; if (App.Current.Properties.ContainsKey("LoginUser")) { User objloginuser = (User)App.Current.Properties["LoginUser"]; labelParkingLocation.Text = objloginuser.LocationParkingLotID.LocationID.LocationName + " Station Only"; if (!string.IsNullOrEmpty(objloginuser.LocationParkingLotID.LotCloseTime)) { objResultVMPass.EndDate = Convert.ToDateTime((Convert.ToDateTime(objResultVMPass.EndDate).ToString("dd MMM yyyy")) + " " + objloginuser.LocationParkingLotID.LotCloseTime); } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "WeeklyPassPage.xaml.cs", "", "WeeklyPassPage"); } }
public RazorPayment(CustomerParkingSlot customerParkingSlot, CustomerVehiclePass customerVehiclePass) { InitializeComponent(); dal_Customer = new DALCustomer(); dal_Pass = new DALPass(); obj_CustomerParkingSlot = customerParkingSlot; obj_CustomerVehiclePass = customerVehiclePass; if (App.Current.Properties.ContainsKey("UserName")) { UserName = Convert.ToString(App.Current.Properties["UserName"]); } if (App.Current.Properties.ContainsKey("Email")) { Email = Convert.ToString(App.Current.Properties["Email"]); } if (App.Current.Properties.ContainsKey("PhoneNumber")) { PhoneNumber = Convert.ToString(App.Current.Properties["PhoneNumber"]); } if (obj_CustomerParkingSlot != null && obj_CustomerVehiclePass == null) { string Source = "http://35.202.198.25:81/RazorPayAPI/Payment.aspx?" + "name=" + UserName + "" + "&email=" + Email + "&contact=" + PhoneNumber + "" + "&description=" + Convert.ToString(obj_CustomerParkingSlot.LocationParkingLotName) + "&amount=" + Convert.ToString(obj_CustomerParkingSlot.PaidAmount) + "&receiptID=" + 0 + ""; CookieContainer cookieContainer = new CookieContainer(); Uri uri = new Uri(Source, UriKind.RelativeOrAbsolute); Cookie cookie = new Cookie { Name = "CustomerID", Expires = DateTime.Now.AddDays(1), Value = Convert.ToString(obj_CustomerParkingSlot.CustomerID), Domain = uri.Host, Path = "/" }; cookieContainer.Add(uri, cookie); webView.Cookies = cookieContainer; webView.Source = new UrlWebViewSource { Url = uri.ToString() }; } else if (obj_CustomerParkingSlot == null && obj_CustomerVehiclePass != null) { string Source = "http://35.202.198.25:81/RazorPayAPI/Payment.aspx?" + "name=" + UserName + "" + "&email=" + Email + "&contact=" + PhoneNumber + "" + "&description=" + Convert.ToString(obj_CustomerVehiclePass.StationAccess) + "&amount=" + Convert.ToString(obj_CustomerVehiclePass.TotalAmount + obj_CustomerVehiclePass.PaidDueAmount) + "&receiptID=" + 0 + ""; CookieContainer cookieContainer = new CookieContainer(); Uri uri = new Uri(Source, UriKind.RelativeOrAbsolute); Cookie cookie = new Cookie { Name = "CustomerID", Expires = DateTime.Now.AddDays(1), Value = Convert.ToString(obj_CustomerVehiclePass.CustomerID), Domain = uri.Host, Path = "/" }; cookieContainer.Add(uri, cookie); webView.Cookies = cookieContainer; webView.Source = new UrlWebViewSource { Url = uri.ToString() }; } }
public MonthlyPassPage(string NewOrReNew, PassPrice objvmPass) { InitializeComponent(); dal_Exceptionlog = new DALExceptionManagment(); dal_Pass = new DALPass(); objCustomerPass = new CustomerVehiclePass(); dal_DALCheckIn = new DALCheckIn(); objResultVMPass = objvmPass; IsNewORReNew = NewOrReNew; int passduration = 0; passduration = objResultVMPass.Duration == "" || objResultVMPass.Duration == null ? 0 : (Convert.ToInt32(objResultVMPass.Duration) - 1); if (NewOrReNew == "New Pass") { labelGeneratePassPageTitle.Text = "GENERATE PASS"; slADDNFC.IsVisible = true; objResultVMPass.EndDate = Convert.ToDateTime(objResultVMPass.StartDate).AddDays(passduration); } else if (NewOrReNew == "ReNew Pass") { labelGeneratePassPageTitle.Text = "RENEW PASS"; slADDNFC.IsVisible = false; //Get ReNew Customer Details From APP Properties if (App.Current.Properties.ContainsKey("ReNewPassCustomerVehicle")) { CustomerVehiclePass objReNewVehicle = (CustomerVehiclePass)App.Current.Properties["ReNewPassCustomerVehicle"]; objCustomerPass.CustomerVehiclePassID = objReNewVehicle.CustomerVehiclePassID; objCustomerPass.CustomerVehicleID = objReNewVehicle.CustomerVehicleID; objCustomerPass.CustomerVehicleID.CustomerID.CustomerID = objReNewVehicle.CustomerVehicleID.CustomerID.CustomerID; objCustomerPass.IssuedCard = objReNewVehicle.IssuedCard; entryRegistrationNumber.Text = objReNewVehicle.CustomerVehicleID.RegistrationNumber; entryPhoneNumber.Text = objReNewVehicle.CustomerVehicleID.CustomerID.PhoneNumber; entryName.Text = objReNewVehicle.CustomerVehicleID.CustomerID.Name; entryRegistrationNumber.IsReadOnly = true; entryPhoneNumber.IsReadOnly = true; entryName.IsReadOnly = true; lblCardType.Text = "ADD TAG"; //+ objResultVMPass.CardTypeID.CardTypeName; if (objReNewVehicle.IssuedCard) { checkAddNFCCard.IsChecked = true; labelInclude.Text = "(Including Tag)"; labelPassAmount.Text = String.Format("{0:0.#}", (objReNewVehicle.PassPriceID.Price + objReNewVehicle.PassPriceID.CardPrice)); } else { labelInclude.Text = ""; labelPassAmount.Text = (objReNewVehicle.PassPriceID.Price).ToString("N2"); } int daystoexpire = (Convert.ToDateTime(objReNewVehicle.ExpiryDate).Date - DateTime.Now.Date).Days; if (daystoexpire >= 0) { daystoexpire = (daystoexpire + 1); passduration = (passduration + daystoexpire); objResultVMPass.EndDate = Convert.ToDateTime(objResultVMPass.StartDate).AddDays(passduration); } else { objResultVMPass.EndDate = Convert.ToDateTime(objResultVMPass.StartDate).AddDays(passduration); } GetVehiceDueAmont(objReNewVehicle.CustomerVehicleID.RegistrationNumber, objResultVMPass.VehicleTypeID.VehicleTypeCode); } } FillPassDetails(); }
public WeeklyPassCashPaymentPage() { InitializeComponent(); dal_CustomerPass = new DALPass(); dal_Exceptionlog = new DALExceptionManagment(); }
public GeneratePass(PassPrice obj_passPrice, List <Location> location, OCustomerVehicle obj_CustomerVehicle, bool isMulti) { InitializeComponent(); ShowLoading(true); lst_Location = new List <Location>(); objCustomerVehicle = obj_CustomerVehicle; objLocation = location; objpassPrice = obj_passPrice; lblPriceDisplay.Text = "₹ " + Convert.ToString(Convert.ToDouble(objpassPrice.Price + objpassPrice.DueAmount)) + " /-"; this.BindingContext = objpassPrice; PassType = obj_passPrice.PassTypeName.ToUpper(); dal_Pass = new DALPass(); IsMulti = isMulti; if (isMulti) { string str = string.Empty; for (int i = 0; i < location.Count; i++) { str = str + location[i].LocationName + ", "; objLoc = new Location(); objLoc.LocationNumber = i + 1; objLoc.LocationName = location[i].LocationName; lst_Location.Add(objLoc); } LocationName = str.Substring(0, str.Length - 2).Trim(); } else { LocationName = location[0].LocationName; objLoc = new Location(); objLoc.LocationNumber = 1; objLoc.LocationName = location[0].LocationName; lst_Location.Add(objLoc); } lstLocation.ItemsSource = lst_Location; lblModel.Text = obj_CustomerVehicle.Model; lblRegistrationNumber.Text = obj_CustomerVehicle.RegistrationNumber; imgVehicle.Source = obj_CustomerVehicle.VehicleImage; DateTime startDate = DateTime.Now; if (obj_passPrice.PassCode.ToUpper() == "DP") { lblLineStation.IsVisible = true; lblStation.IsVisible = true; lblAllStation.IsVisible = false; lstLocation.IsVisible = true; StartDate = startDate; ExpiryDate = startDate; } else if (obj_passPrice.PassCode.ToUpper() == "2W WP" || obj_passPrice.PassCode.ToUpper() == "4W WP") { lblLineStation.IsVisible = true; lblStation.IsVisible = true; lblAllStation.IsVisible = false; lstLocation.IsVisible = true; StartDate = startDate; ExpiryDate = startDate.AddDays((Convert.ToInt32(obj_passPrice.Duration) - 1)); } else if (obj_passPrice.PassCode.ToUpper() == "2W ALL STATION" || obj_passPrice.PassCode.ToUpper() == "4W ALL STATION") { IsMultiLot = true; lblLineStation.IsVisible = false; lblStation.IsVisible = false; lblAllStation.IsVisible = true; lstLocation.IsVisible = false; StartDate = startDate; ExpiryDate = startDate.AddDays((Convert.ToInt32(obj_passPrice.Duration) - 1)); } else { lblLineStation.IsVisible = true; lblStation.IsVisible = true; lblAllStation.IsVisible = false; lstLocation.IsVisible = true; StartDate = startDate; ExpiryDate = startDate.AddDays((Convert.ToInt32(obj_passPrice.Duration) - 1)); } if (obj_passPrice.PassTypeCode == "EP")// Event Pass { lblLineStation.IsVisible = true; lblStation.IsVisible = true; lblAllStation.IsVisible = false; obj_passPrice.Duration = (obj_passPrice.Duration == null || obj_passPrice.Duration == "0" || obj_passPrice.Duration == "") ? "0" : obj_passPrice.Duration; // EP Start Date Validation if (DateTime.Now.Date >= Convert.ToDateTime(obj_passPrice.StartDate).Date&& DateTime.Now.Date <= Convert.ToDateTime(obj_passPrice.EndDate).Date) { obj_passPrice.StartDate = DateTime.Now.Date; } StartDate = Convert.ToDateTime(obj_passPrice.StartDate); ExpiryDate = Convert.ToDateTime(obj_passPrice.EndDate); } lblFrom.Text = StartDate.ToString("d MMM yyyy, hh:mm tt", CultureInfo.CreateSpecificCulture("en-US")); lblTo.Text = ExpiryDate.ToString("d MMM yyyy, hh:mm tt", CultureInfo.CreateSpecificCulture("en-US")); string fromdatesplit = lblFrom.Text.Split(',')[0]; string fromtimesplit = lblFrom.Text.Split(',')[1]; lblFrom.Text = fromdatesplit; lblFromTime.Text = "06:00 AM"; string toDatesplit = lblTo.Text.Split(',')[0]; string toTimesplit = lblTo.Text.Split(',')[1]; lblTo.Text = toDatesplit; lblToTime.Text = "10:00 PM"; price = obj_passPrice.Price; ShowLoading(false); }
public DailyPass(string NewOrReNew, PassPrice objvmPass) { InitializeComponent(); dal_Exceptionlog = new DALExceptionManagment(); dal_Pass = new DALPass(); IsNewORReNew = NewOrReNew; objResultVMPass = objvmPass; objCustomerPass = new CustomerVehiclePass(); try { if (NewOrReNew == "New Pass") { labelGeneratePassPageTitle.Text = "GENERATE PASS"; } else if (NewOrReNew == "ReNew Pass") { labelGeneratePassPageTitle.Text = "RENEW PASS"; //Get ReNew Customer Details From APP Properties if (App.Current.Properties.ContainsKey("ReNewPassCustomerVehicle")) { CustomerVehiclePass objReNewVehicle = (CustomerVehiclePass)App.Current.Properties["ReNewPassCustomerVehicle"]; objCustomerPass.CustomerVehiclePassID = objReNewVehicle.CustomerVehiclePassID; objCustomerPass.CustomerVehicleID = objReNewVehicle.CustomerVehicleID; objCustomerPass.CustomerVehicleID.CustomerID.CustomerID = objReNewVehicle.CustomerVehicleID.CustomerID.CustomerID; entryRegistrationNumber.Text = objReNewVehicle.CustomerVehicleID.RegistrationNumber; entryPhoneNumber.Text = objReNewVehicle.CustomerVehicleID.CustomerID.PhoneNumber; entryName.Text = objReNewVehicle.CustomerVehicleID.CustomerID.Name; entryRegistrationNumber.IsReadOnly = true; entryPhoneNumber.IsReadOnly = true; entryName.IsReadOnly = true; GetVehiceDueAmont(objReNewVehicle.CustomerVehicleID.RegistrationNumber, objResultVMPass.VehicleTypeID.VehicleTypeCode); } } labelPassType.Text = objResultVMPass.PassTypeID.PassTypeName.ToUpper(); labelPassStationAccess.Text = objResultVMPass.StationAccess.ToUpper(); labelPassAmount.Text = String.Format("{0:0.#}", objResultVMPass.Price); imgCustomerVehcileType.Source = objResultVMPass.VehicleTypeID.VehicleIcon; if (objResultVMPass.PassTypeID.PassTypeCode == "EP")// Event Pass { objResultVMPass.Duration = (objResultVMPass.Duration == null || objResultVMPass.Duration == "0" || objResultVMPass.Duration == "") ? "0" : objResultVMPass.Duration; // EP Start Date Validation if (DateTime.Now.Date >= Convert.ToDateTime(objResultVMPass.StartDate).Date&& DateTime.Now.Date <= Convert.ToDateTime(objResultVMPass.EndDate).Date) { objResultVMPass.StartDate = DateTime.Now.Date; } labelValidFrom.Text = Convert.ToDateTime(objResultVMPass.StartDate).ToString("dd MMM yyyy"); labelValidTo.Text = Convert.ToDateTime(objResultVMPass.EndDate).ToString("dd MMM yyyy"); } else if (objResultVMPass.PassTypeID.PassTypeCode == "DP") { labelValidFrom.Text = Convert.ToDateTime(objResultVMPass.StartDate).ToString("dd MMM yyyy, hh:mm tt"); labelValidTo.Text = Convert.ToDateTime(objResultVMPass.EndDate).ToString("dd MMM yyyy, hh:mm tt"); } if (App.Current.Properties.ContainsKey("LoginUser")) { User objloginuser = (User)App.Current.Properties["LoginUser"]; labelParkingLocation.Text = objloginuser.LocationParkingLotID.LocationID.LocationName + " Station Only"; if (!string.IsNullOrEmpty(objloginuser.LocationParkingLotID.LotCloseTime)) { objResultVMPass.EndDate = Convert.ToDateTime((Convert.ToDateTime(objResultVMPass.EndDate).ToString("dd MMM yyyy")) + " " + objloginuser.LocationParkingLotID.LotCloseTime); } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "DailyPass.xaml.cs", "", "DailyPass"); } }
public void GetSelectedVehicleDetails(CustomerVehicle selectedVehicle) { string Locations = string.Empty; string vehicleType = string.Empty; try { if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { User objloginuser = (User)App.Current.Properties["LoginUser"]; DALPass dal_Pass = new DALPass(); List <CustomerVehiclePass> lstResultPasses = dal_Pass.GetCustomerValidateVehiclePassesDetailsByVehicle(Convert.ToString(App.Current.Properties["apitoken"]), selectedVehicle); if (lstResultPasses.Count > 0) { objResultCustomerVehiclePass = lstResultPasses[0]; if (lstResultPasses[0].IsMultiLot) { for (var i = 0; i < lstResultPasses.Count; i++) { if (i == 0) { Locations = lstResultPasses[i].LocationID.LocationName; } else { Locations = Locations + "," + lstResultPasses[i].LocationID.LocationName; } } } else { Locations = objResultCustomerVehiclePass.LocationID.LocationName; } labelParkingReceiptTitle.Text = "InstaParking-" + objResultCustomerVehiclePass.PassPriceID.PassTypeID.PassTypeName;; labelParkingLot.Text = Locations + "-" + objResultCustomerVehiclePass.PassPriceID.StationAccess; labelValidFrom.Text = Convert.ToDateTime(objResultCustomerVehiclePass.StartDate).ToString("dd MMM yyyy"); labelValidTo.Text = Convert.ToDateTime(objResultCustomerVehiclePass.ExpiryDate).ToString("dd MMM yyyy "); vehicleType = objResultCustomerVehiclePass.CustomerVehicleID.VehicleTypeID.VehicleTypeDisplayName; imageVehicleImage.Source = objResultCustomerVehiclePass.CustomerVehicleID.VehicleTypeID.VehicleIcon; labelCustomerName.Text = objResultCustomerVehiclePass.CustomerVehicleID.CustomerID.Name; labelVehicleDetails.Text = objResultCustomerVehiclePass.CustomerVehicleID.RegistrationNumber; labelParkingFeesDetails.Text = objResultCustomerVehiclePass.TotalAmount.ToString("N2") + "/-"; if (objResultCustomerVehiclePass.IssuedCard) { labelParkingPaymentType.Text = "Paid (Including " + objResultCustomerVehiclePass.CardTypeID.CardTypeName + ") - By " + objResultCustomerVehiclePass.PaymentTypeID.PaymentTypeName; } else { labelParkingPaymentType.Text = "Paid - By " + objResultCustomerVehiclePass.PaymentTypeID.PaymentTypeName; } if (objResultCustomerVehiclePass.CreatedBy.UserName != "") { imageOperatorProfile.IsVisible = true; labelOperatorName.Text = objResultCustomerVehiclePass.CreatedBy.UserName; labelOperatorID.Text = "- #" + Convert.ToString(objResultCustomerVehiclePass.CreatedBy.UserCode); } else { imageOperatorProfile.IsVisible = false; } if (objResultCustomerVehiclePass.PassPriceID.PassTypeID.PassTypeCode == "MP") { lableCardType.Text = "TAG: "; labelNFCCard.Text = objResultCustomerVehiclePass.CardNumber; } try { if (receiptlines != null && receiptlines.Length > 0) { if (objResultCustomerVehiclePass.PassPriceID.StationAccess == "All Station" || objResultCustomerVehiclePass.PassPriceID.StationAccess == "All Stations") { Locations = "All Metro Stations"; } receiptlines[0] = "\x1B\x21\x08" + " " + "HMRL PARKING" + "\x1B\x21\x00" + "\n"; receiptlines[1] = "\x1B\x21\x01" + " " + objResultCustomerVehiclePass.CreatedBy.LocationParkingLotID.LocationID.LocationName + "\x1B\x21\x00\n"; receiptlines[3] = "" + "\n"; receiptlines[4] = "\x1B\x21\x08" + vehicleType + " " + objResultCustomerVehiclePass.CustomerVehicleID.RegistrationNumber + "\x1B\x21\x00\n"; receiptlines[5] = "\x1B\x21\x01" + "Valid From:" + Convert.ToDateTime(objResultCustomerVehiclePass.StartDate).ToString("dd MMM yyyy") + "\x1B\x21\x00" + "\n"; receiptlines[6] = "\x1B\x21\x01" + "Valid Till:" + Convert.ToDateTime(objResultCustomerVehiclePass.ExpiryDate).ToString("dd MMM yyyy") + "\x1B\x21\x00" + "\n"; receiptlines[7] = "\x1B\x21\x01" + "(Pass Type :" + objResultCustomerVehiclePass.PassPriceID.PassTypeID.PassTypeName + ")" + "\x1B\x21\x00\n"; receiptlines[8] = "\x1B\x21\x01" + "Station(s):" + Locations + "\x1B\x21\x01" + "\n"; receiptlines[9] = "\x1B\x21\x01" + "Paid: Rs" + (objResultCustomerVehiclePass.IssuedCard ? objResultCustomerVehiclePass.TotalAmount.ToString("N2") + "(TAG Rs" + objResultCustomerVehiclePass.PassPriceID.CardPrice.ToString("N2") + ")" : objResultCustomerVehiclePass.Amount.ToString("N2")) + "\x1B\x21\x01" + "\n"; receiptlines[10] = "\x1B\x21\x06" + "Operator Id:" + objResultCustomerVehiclePass.CreatedBy.UserCode + "\x1B\x21\x00\n"; receiptlines[11] = "\x1B\x21\x01" + "(Supervisor Mobile:" + objResultCustomerVehiclePass.SuperVisorID.PhoneNumber + ")" + "\x1B\x21\x00\n"; receiptlines[12] = "\x1B\x21\x01" + "We are not responsible for your valuable items like laptop, wallet,helmet etc." + "\x1B\x21\x00\n"; receiptlines[13] = "\x1B\x21\x06" + "GST Number 36AACFZ1015E1ZL" + "\x1B\x21\x00\n"; receiptlines[14] = "\x1B\x21\x06" + "Amount includes 18% GST" + "\x1B\x21\x00\n"; receiptlines[15] = "" + "\n"; receiptlines[16] = "" + "\n"; } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "ValidatePassPage.xaml.cs", "", "receiptlines"); } } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "ValidatePassPage.xaml.cs", "", "GetSelectedVehicleDetails"); } }