private void LoadLocationLotActiveOperators(VMLocationLots objVMLocationLot, int UserID) { try { if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { DALHome dal_Home = new DALHome(); objReportUser.UserID = UserID; objReportUser.LocationParkingLotID.LocationID.LocationID = objVMLocationLot.LocationID; objReportUser.LocationParkingLotID.LocationParkingLotID = objVMLocationLot.LocationParkingLotID; lstOperators = dal_Home.GetLocationLotActiveOperators(Convert.ToString(App.Current.Properties["apitoken"]), objReportUser); var loginuser = (User)App.Current.Properties["LoginUser"]; if ((loginuser.UserTypeID.UserTypeName).ToUpper() == "OPERATOR".ToUpper()) { lstOperators.RemoveAll(item => item.UserID != loginuser.UserID); } if (lstOperators.Count > 0) { pickerOperator.ItemsSource = lstOperators; pickerOperator.SelectedIndex = 1; GetLotOccupancy(objReportUser); } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "LotOccupancy.xaml.cs", "", "LoadLocationLotActiveOperators"); } }
public ActivatePassReciptPage(string generatedPassType, string StationType) { InitializeComponent(); ObjblueToothDevicePrinting = new BlueToothDevicePrinting(); dal_Exceptionlog = new DALExceptionManagment(); dal_home = new DALHome(); }
private void LoadLocationLotActiveOperators(VMLocationLots objVMLocationLot, int UserID) { try { if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { DALHome dal_Home = new DALHome(); User objselectedlocationlot = new User(); objselectedlocationlot.UserID = UserID; objselectedlocationlot.LocationParkingLotID.LocationID.LocationID = objVMLocationLot.LocationID; objselectedlocationlot.LocationParkingLotID.LocationParkingLotID = objVMLocationLot.LocationParkingLotID; lstOperators = dal_Home.GetLocationLotActiveOperators(Convert.ToString(App.Current.Properties["apitoken"]), objselectedlocationlot); if (lstOperators.Count > 0) { pickerOperator.ItemsSource = lstOperators; pickerOperator.SelectedIndex = 1; } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "ReportPage.xaml.cs", "", "LoadLocationLotActiveOperators"); } }
public void LoadDeSyncVehicle() { try { LstDeSyncVehicle.ItemsSource = null; DALHome dal_Home = new DALHome(); VMLocationLotParkedVehicles vmVehicles = dal_Home.GetAllDeSyncVehiclesOffline(); if (vmVehicles.CustomerParkingSlotID != null && vmVehicles.CustomerParkingSlotID.Count > 0) { lstofflinevehicles = vmVehicles.CustomerParkingSlotID; LstDeSyncVehicle.ItemsSource = vmVehicles.CustomerParkingSlotID; labelTotalTwoWheeler.Text = Convert.ToString(vmVehicles.TotalTwoWheeler) + "(" + Convert.ToString(vmVehicles.TotalOutTwoWheeler) + ")"; labelTotalFourWheeler.Text = Convert.ToString(vmVehicles.TotalFourWheeler) + "(" + Convert.ToString(vmVehicles.TotalOutFourWheeler) + ")"; labelTotalHVWheeler.Text = Convert.ToString(vmVehicles.TotalHVWheeler) + "(" + Convert.ToString(vmVehicles.TotalOutHVWheeler) + ")"; labelTotalThreeWheeler.Text = Convert.ToString(vmVehicles.TotalThreeWheeler) + "(" + Convert.ToString(vmVehicles.TotalOutThreeWheeler) + ")"; } else { labelTotalTwoWheeler.Text = labelTotalFourWheeler.Text = labelTotalHVWheeler.Text = labelTotalThreeWheeler.Text = string.Empty; } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "MasterDetailHomePage.xaml.cs", "", "LoadParkedVehicle"); } }
public NFCCardPaymentReceiptPagae() { InitializeComponent(); ObjblueToothDevicePrinting = new BlueToothDevicePrinting(); dal_Exceptionlog = new DALExceptionManagment(); dal_home = new DALHome(); }
private void GetAllStations() { try { if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { User objloginuser = (User)App.Current.Properties["LoginUser"]; DALHome dal_Home = new DALHome(); if (PassType == "ReNew Pass") { if (App.Current.Properties.ContainsKey("ReNewPassCustomerVehicle")) { var objReNewVehicle = (CustomerVehiclePass)App.Current.Properties["ReNewPassCustomerVehicle"]; List <VMMultiLocations> renewPassLocations = dal_Home.GetAllPassLocationsByVehicleType(Convert.ToString(App.Current.Properties["apitoken"]), objResultVMPass.VehicleTypeID.VehicleTypeCode, objReNewVehicle.CustomerVehiclePassID); lstStations.ItemsSource = renewPassLocations; } } else { lstStations.ItemsSource = dal_Home.GetAllLocationsByVehicleType(Convert.ToString(App.Current.Properties["apitoken"]), objResultVMPass.VehicleTypeID.VehicleTypeCode); } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "MultiStationPassPage.xaml.cs", "", "GetAllStations"); } }
public ViolationVehicleInformation() { InitializeComponent(); dal_Home = new DALHome(); dal_violation = new DALViolationandClamp(); slFOC.IsVisible = false; imageViolation.IsVisible = false; }
public ActivatePassReciptPage(CustomerVehiclePass objReceiptDetails) { InitializeComponent(); ObjblueToothDevicePrinting = new BlueToothDevicePrinting(); dal_Exceptionlog = new DALExceptionManagment(); dal_home = new DALHome(); LoadCustomerPassPaymentDetails(objReceiptDetails); }
public ViolationVehicleInformation(int CustomerParkingSlotID) { InitializeComponent(); dal_Home = new DALHome(); dal_violation = new DALViolationandClamp(); dal_Exceptionlog = new DALExceptionManagment(); slFOC.IsVisible = false; imageViolation.IsVisible = false; GetViolationVehcileInformation(CustomerParkingSlotID); }
private async void LoadLoginUserLocationLots() { try { if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { DALHome dal_Home = new DALHome(); User objLoginUser = (User)App.Current.Properties["LoginUser"]; if (DeviceInternet.InternetConnected()) { lstlots = dal_Home.GetUserAllocatedLocationAndLots(Convert.ToString(App.Current.Properties["apitoken"]), objLoginUser); } else { lstlots = dal_Home.GetUserAllocatedLocationAndLotsOffline(objLoginUser); } if (lstlots.Count > 0) { pickerLocationLot.ItemsSource = lstlots; for (int x = 0; x < lstlots.Count; x++) { if (objLoginUser.LocationParkingLotID.LocationParkingLotID == null || objLoginUser.LocationParkingLotID.LocationParkingLotID == 0) { if (lstlots[x].LocationID == objLoginUser.LocationParkingLotID.LocationID.LocationID) { IsTodayHoliday = lstlots[x].IsActive; todayLotOpenTime = lstlots[x].LotOpenTime; todayLotCloseTime = lstlots[x].LotCloseTime; pickerLocationLot.SelectedIndex = x; } } else { if (lstlots[x].LocationParkingLotID == objLoginUser.LocationParkingLotID.LocationParkingLotID) { IsTodayHoliday = lstlots[x].IsActive; todayLotOpenTime = lstlots[x].LotOpenTime; todayLotCloseTime = lstlots[x].LotCloseTime; pickerLocationLot.SelectedIndex = x; } } } } } else { await DisplayAlert("Alert", "Lost API Token,Please login agin", "Ok"); } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "MasterDetailHomePage.xaml.cs", "", "LoadLoginUserLocationLots"); } }
public OverstayVehicleInformation() { InitializeComponent(); slClampVehicle.IsVisible = false; slFOC.IsVisible = false; BtnCheckOut.IsVisible = false; dal_Exceptionlog = new DALExceptionManagment(); objHome = new DALHome(); dal_ViolationClamp = new DALViolationandClamp(); lstReasons = new List <ViolationReason>(); }
public PassCheckInVehicleInformation(int CustomerParkingLotID) { InitializeComponent(); objHome = new DALHome(); slClampReason.IsVisible = false; slFOC.IsVisible = false; dal_ViolationClamp = new DALViolationandClamp(); dal_Exceptionlog = new DALExceptionManagment(); ObjblueToothDevicePrinting = new BlueToothDevicePrinting(); LoadGetViolationReasons(); LoadParkedVehicleDetails(CustomerParkingLotID); }
public FiltersPage() { InitializeComponent(); dal_Exceptionlog = new DALExceptionManagment(); objFilter = new ParkedVehiclesFilter(); objSelectedAppTypes = new List <ApplicationType>(); objSelectedStatus = new List <Status>(); dal_Home = new DALHome(); GetAllApplicationTypes(); GetAllStatus(); GetAllVehicleType(); }
string[] receiptlines = new string[17]; // Receipt Lines public PassCheckInVehicleInformation() { InitializeComponent(); objHome = new DALHome(); slClampReason.IsVisible = false; slFOC.IsVisible = false; slCashAndEpay.IsVisible = false; dal_ViolationClamp = new DALViolationandClamp(); dal_Exceptionlog = new DALExceptionManagment(); lstReasons = new List <ViolationReason>(); ObjblueToothDevicePrinting = new BlueToothDevicePrinting(); }
public OverstayVehicleInformation(int CustomerParkingSlotID) { InitializeComponent(); slClampVehicle.IsVisible = false; slFOC.IsVisible = false; slCash.IsVisible = false; slEPay.IsVisible = false; objHome = new DALHome(); dal_ViolationClamp = new DALViolationandClamp(); lstReasons = new List <ViolationReason>(); LoadGetViolationReasons(); LoadParkingVehicleDetails(CustomerParkingSlotID); }
private void LoadLoginUserLocationLots() { try { if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { DALHome dal_Home = new DALHome(); var objLoginUser = (User)App.Current.Properties["LoginUser"]; lstlots = dal_Home.GetUserAllocatedLocationAndLots(Convert.ToString(App.Current.Properties["apitoken"]), objLoginUser); // Include ALL VMLocationLots objlotAll = new VMLocationLots(); objlotAll.LocationParkingLotID = 0; objlotAll.LotName = "ALL"; objlotAll.LocationParkingLotName = "ALL"; objlotAll.LocationID = 0; objlotAll.LocationName = "ALL"; objlotAll.IsActive = true; lstlots.Insert(0, objlotAll); if (lstlots.Count > 0) { pickerLocationLot.ItemsSource = lstlots; for (int x = 0; x < lstlots.Count; x++) { if (objLoginUser.LocationParkingLotID.LocationParkingLotID == null || objLoginUser.LocationParkingLotID.LocationParkingLotID == 0) { if (lstlots[x].LocationID != null && lstlots[x].LocationID != 0) { if (lstlots[x].LocationID == objLoginUser.LocationParkingLotID.LocationID.LocationID) { pickerLocationLot.SelectedIndex = x; } } } else { if (lstlots[x].LocationParkingLotID == objLoginUser.LocationParkingLotID.LocationParkingLotID) { pickerLocationLot.SelectedIndex = x; } } } } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "ReportPage.xaml.cs", "", "LoadLoginUserLocationLots"); } }
public void LoadParkedVehicle(ParkedVehiclesFilter objinput) { try { LstVWParkingVehicle.ItemsSource = null; if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { DALHome dal_Home = new DALHome(); if (objinput == null) { User objLoginUser = (User)App.Current.Properties["LoginUser"]; objinput = new ParkedVehiclesFilter(); VMLocationLots objVMLocations = (VMLocationLots)pickerLocationLot.SelectedItem; objinput.LocationID = objLoginUser.LocationParkingLotID.LocationID.LocationID; objinput.LocationParkingLotID = objLoginUser.LocationParkingLotID.LocationParkingLotID; if (objLoginUser.LocationParkingLotID.LocationParkingLotID == null || objLoginUser.LocationParkingLotID.LocationParkingLotID == 0) { if (objVMLocations != null) { objinput.LocationParkingLotID = objVMLocations.LocationParkingLotID; } } } VMLocationLotParkedVehicles vmVehicles = null; if (DeviceInternet.InternetConnected()) { vmVehicles = dal_Home.GetAllParkedVehicles(Convert.ToString(App.Current.Properties["apitoken"]), objinput); } else { vmVehicles = dal_Home.GetAllParkedVehiclesOffline(); } lstdayvehicles = vmVehicles.CustomerParkingSlotID; LstVWParkingVehicle.ItemsSource = vmVehicles.CustomerParkingSlotID; labelTotalTwoWheeler.Text = Convert.ToString(vmVehicles.TotalTwoWheeler) + "(" + Convert.ToString(vmVehicles.TotalOutTwoWheeler) + ")"; labelTotalFourWheeler.Text = Convert.ToString(vmVehicles.TotalFourWheeler) + "(" + Convert.ToString(vmVehicles.TotalOutFourWheeler) + ")"; labelTotalHVWheeler.Text = Convert.ToString(vmVehicles.TotalHVWheeler) + "(" + Convert.ToString(vmVehicles.TotalOutHVWheeler) + ")"; labelTotalThreeWheeler.Text = Convert.ToString(vmVehicles.TotalThreeWheeler) + "(" + Convert.ToString(vmVehicles.TotalOutThreeWheeler) + ")"; } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "MasterDetailHomePage.xaml.cs", "", "LoadParkedVehicle"); } }
private void LoadAllOperators(User objLoginUser) { try { if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { DALHome dal_Home = new DALHome(); lstOperators = dal_Home.GetAllOperatorsOfSupervisor(Convert.ToString(App.Current.Properties["apitoken"]), objLoginUser); if (lstOperators.Count > 0) { pickerOperator.ItemsSource = lstOperators; pickerOperator.SelectedIndex = 1; } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "ReportPage.xaml.cs", "", "LoadLoginUserLocationLots"); } }
public async void ViolationVehicleValidations() { try { chkWarning.IsChecked = true; if (entryRegistrationNumber.Text.Length >= 6 && SelectedVehicle != string.Empty) { if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken")) { User objloginuser = (User)App.Current.Properties["LoginUser"]; objCustomerPass = dal_DALCheckIn.GetVerifyVehicleHasPass(Convert.ToString(App.Current.Properties["apitoken"]), entryRegistrationNumber.Text, objloginuser.LocationParkingLotID.LocationID.LocationID, objloginuser.LocationParkingLotID.LocationParkingLotID, objloginuser.UserID, ""); if ((objCustomerPass.CustomerVehiclePassID != 0) && ((Convert.ToDateTime(objCustomerPass.StartDate).Date <= DateTime.Now.Date) && (Convert.ToDateTime(objCustomerPass.ExpiryDate).Date >= DateTime.Now.Date))) { if (SelectedVehicle == objCustomerPass.CustomerVehicleID.VehicleTypeID.VehicleTypeCode.ToUpper()) { if ((objCustomerPass.PassPriceID.StationAccess == "All Stations" || objCustomerPass.PassPriceID.StationAccess == "All Station")) { btnCheckIn.IsVisible = true; BtnViolation.IsVisible = false; await DisplayAlert("Alert", "" + entryRegistrationNumber.Text + " This vehicle has a valid pass", "Ok"); } else if (objCustomerPass.IsMultiLot) { DALHome dal_Home = new DALHome(); List <VMMultiLocations> passLocations = dal_Home.GetAllPassLocationsByVehicleType(Convert.ToString(App.Current.Properties["apitoken"]), SelectedVehicle, objCustomerPass.CustomerVehiclePassID); var isvalid = passLocations.Where(p => p.LocationID == objloginuser.LocationParkingLotID.LocationID.LocationID); if (isvalid != null) { btnCheckIn.IsVisible = true; BtnViolation.IsVisible = false; await DisplayAlert("Alert", "" + entryRegistrationNumber.Text + " This vehicle has a valid pass", "Ok"); } } else if (objCustomerPass.LocationID.LocationID == objloginuser.LocationParkingLotID.LocationID.LocationID) { btnCheckIn.IsVisible = true; BtnViolation.IsVisible = false; await DisplayAlert("Alert", "" + entryRegistrationNumber.Text + " This vehicle has a valid pass", "Ok"); } } else { string passvehicletype = string.Empty; btnCheckIn.IsVisible = true; BtnViolation.IsVisible = false; if (objCustomerPass.CustomerVehicleID.VehicleTypeID.VehicleTypeCode.ToUpper() == "2W") { passvehicletype = "two wheeler"; } else if (objCustomerPass.CustomerVehicleID.VehicleTypeID.VehicleTypeCode.ToUpper() == "4W") { passvehicletype = "four wheeler"; } await DisplayAlert("Alert", "" + entryRegistrationNumber.Text + " This vehicle has a " + passvehicletype + " pass,Please select valid vehicle type", "Ok"); } } else { btnCheckIn.IsVisible = false; BtnViolation.IsVisible = true; } if (!IsVehicleViolationsCompleted()) { slVehicleWarning.IsVisible = true; } else { slVehicleWarning.IsVisible = false; chkWarning.IsChecked = false; } } } } catch (Exception ex) { dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "ViolationPage.xaml.cs", "", "ViolationVehicleValidations"); } }
public DynamicVehiclePage() { dal_Home = new DALHome(); InitializeComponent(); }