コード例 #1
0
        public Task <int> SaveVehiclesParkingFeesDetailOnLogin(string accessToken, int LocationParkingLotID)
        {
            Task <int> output        = null;
            DALCheckIn objdalCheckIn = new DALCheckIn();

            try
            {
                bool istableexist = IsTableExists(db, "VehicleParkingFee");
                if (!istableexist)
                {
                    db.CreateTableAsync <VehicleParkingFee>();
                }
                Task <int> deleted = db.ExecuteAsync("DELETE FROM VehicleParkingFee");
                var        lstfees = objdalCheckIn.GetLotVehiclesParkingFeesDetailOnLogin(accessToken, LocationParkingLotID);
                for (var item = 0; item < lstfees.Count; item++)
                {
                    output = db.InsertAsync(lstfees[item]);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(output);
        }
コード例 #2
0
 public WeeklyPassPage()
 {
     InitializeComponent();
     dal_Exceptionlog = new DALExceptionManagment();
     dal_Pass         = new DALPass();
     objCustomerPass  = new CustomerVehiclePass();
     dal_DALCheckIn   = new DALCheckIn();
 }
コード例 #3
0
 public MonthlyPassPage(string monthlyPassStationType)
 {
     InitializeComponent();
     dal_Exceptionlog = new DALExceptionManagment();
     dal_Pass         = new DALPass();
     dal_DALCheckIn   = new DALCheckIn();
     slAllStationMessage.IsVisible = false;
     objCustomerPass = new CustomerVehiclePass();
 }
コード例 #4
0
 public MonthlyPassCashPaymentPage()
 {
     InitializeComponent();
     slNFCCard.IsVisible = false;
     slCashPaymentGeneratePass.IsVisible = false;
     slBARCode.IsVisible = false;
     dal_CustomerPass    = new DALPass();
     dal_DALCheckIn      = new DALCheckIn();
 }
コード例 #5
0
 public ConfirmationPage(VehicleCheckIn obj)
 {
     InitializeComponent();
     dal_DALCheckIn             = new DALCheckIn();
     dal_Exceptionlog           = new DALExceptionManagment();
     ObjblueToothDevicePrinting = new BlueToothDevicePrinting();
     LoadVehicleChekInDetails(obj);
     printerName = ObjblueToothDevicePrinting.GetBlueToothDevices();
 }
コード例 #6
0
 public void SendSMS(string PhoneNumber, string resultmsg)
 {
     try
     {
         DALCheckIn dal_DALCheckIn = new DALCheckIn();
         dal_DALCheckIn.SendReceiptToMobile(resultmsg, PhoneNumber, "1407161890458311579");
     }
     catch (Exception ex)
     {
         ShowLoading(false);
         dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "PassPaymentReceiptPage.xaml.cs", "", "SendSMS");
     }
 }
コード例 #7
0
 public LotViolationTestPage()
 {
     InitializeComponent();
     ObjblueToothDevicePrinting = new BlueToothDevicePrinting();
     dal_Exceptionlog           = new DALExceptionManagment();
     dal_ViolationClamp         = new DALViolationandClamp();
     dal_DALCheckIn             = new DALCheckIn();
     lstparkingbay                  = new List <ParkingBay>();
     btnCheckIn.IsVisible           = false;
     checkBoxClampVehicle.IsChecked = true;
     chkWarning.IsVisible           = true;
     chkWarning.IsChecked           = true;
     LoadLotVehicleType();
     LoadLocationBayNumbers();
 }
コード例 #8
0
        public ReNewPassPage()
        {
            InitializeComponent();

            lstCustomerVehicle           = new List <CustomerVehicle>();
            objResultCustomerVehiclePass = new CustomerVehiclePass();
            dal_DALCheckIn   = new DALCheckIn();
            dal_Exceptionlog = new DALExceptionManagment();
            if (App.Current.Properties.ContainsKey("ReNewPassCustomerVehicle"))
            {
                App.Current.Properties.Remove("ReNewPassCustomerVehicle");
            }
            GetAllPassedVehicles();
            BtnChoosePass.IsEnabled = false;
        }
コード例 #9
0
        void CurrentHome_OnMessageReceived(ITagInfo tagInfo)
        {
            string checkInmsg = string.Empty;

            try
            {
                if (tagInfo == null)
                {
                    DisplayAlert("Alert", "No tag found", "Ok");
                    return;
                }
                // Customized serial number
                var identifier   = tagInfo.Identifier;
                var serialNumber = tagInfo.SerialNumber;
                if (serialNumber != "")
                {
                    DALCheckIn dal_ChckeIn = new DALCheckIn();
                    if (App.Current.Properties.ContainsKey("LoginUser") && App.Current.Properties.ContainsKey("apitoken"))
                    {
                        VehicleCheckIn objNFCCardVehicle = new VehicleCheckIn();
                        User           objloginuser      = (User)App.Current.Properties["LoginUser"];
                        objNFCCardVehicle.UserID               = objloginuser.UserID;
                        objNFCCardVehicle.LocationID           = objloginuser.LocationParkingLotID.LocationID.LocationID;
                        objNFCCardVehicle.LocationParkingLotID = objloginuser.LocationParkingLotID.LocationParkingLotID;
                        objNFCCardVehicle.NFCCardNumber        = serialNumber;
                        checkInmsg = dal_ChckeIn.SaveNFCCardVehicleCheckIn(Convert.ToString(App.Current.Properties["apitoken"]), objNFCCardVehicle);
                        if (checkInmsg != "Success")
                        {
                            DisplayAlert("Alert", checkInmsg, "Ok");
                        }
                        else
                        {
                            LoadParkedVehicle(null);
                        }
                    }
                    else
                    {
                        DisplayAlert("Alert", "NFC Card serial number unable to found.", "Ok");
                        return;
                    }
                }
            }
            catch (Exception ex)
            {
                DisplayAlert("Alert", "Unable to proceed,Please contact Admin" + ex.Message, "Ok");
                dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "MasterDetailHomePage.xaml.cs", "", "CurrentHome_OnMessageReceived");
            }
        }
コード例 #10
0
        public bool IsVehiclePassVerification(string apitoken, int LocationID, string RegistrationNumber, string PassType, int PassTypeID, string VehicleTypeCode, DateTime startDate)
        {
            bool IsVehiclehasPass = false;

            try
            {
                User       objloginuser   = (User)App.Current.Properties["LoginUser"];
                DALCheckIn dal_DALCheckIn = new DALCheckIn();
                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)
                {
                    IsVehiclehasPass = true;
                }
            }
            catch (Exception ex)
            {
                dal_Exceptionlog.InsertException(Convert.ToString(App.Current.Properties["apitoken"]), "Operator App", ex.Message, "DailyPass.xaml.cs", "", "DailyPass");
            }
            return(IsVehiclehasPass);
        }
コード例 #11
0
        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");
            }
        }
コード例 #12
0
        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");
            }
        }
コード例 #13
0
        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();
        }