public void SetPaymentAmountFor(ParkingPermitInfo parkingPermit) { this._ParkingPermit = parkingPermit; this._parkingCharges = new WeeklyParkingTariff(this._ParkingPermit.DurationOfStay, this.DayOfWeek); if (this._ParkingPermit.ShouldIssueParkingChargeNotice) { return; } this.SetPaymentAmountAndEndDate(); }
private void cmdYes_Click(object sender, EventArgs e) { this.ConfirmVehicle = true; this.Close(); Log.Write("Yes selected after image selection confirmation/vrm confirmation dialog close."); this.panel1.Visible = true; this.m_ParkingPermit.CaptureDate = DateTime.Now; switch (this.m_ApplicationType) { case "ServiceStationPark": this.Hide(); Log.Write("ServiceStationPark is the Application type in App Config."); int num1 = (int)new frmLogin(this.m_ParkingPermit, "ServiceStationPark", this.m_OverviewLocation, this.m_PlateLocation).ShowDialog(); break; case "PermitPark": this.Hide(); string displayOption1 = "PermitPark"; Log.Write("PermitPark is the Application type in App Config."); if (this.m_ParkingPermit.PermitType == "STAFF") { this.m_ParkingPermit.EndDate = DateTime.Parse("9999-12-30 23:59"); int num2 = (int)new frmLogin(this.m_ParkingPermit, "PermitPark", this.m_OverviewLocation, this.m_PlateLocation).ShowDialog(); break; } this.m_ParkingPermit.EndDate = this.m_ParkingPermit.StartDate.AddDays(1.0); CUpdateVehicleData cupdateVehicleData = new CUpdateVehicleData(); int num3 = (int)new frmThankYou(this.m_ParkingPermit, displayOption1, CCacheData.WriteParkingPermitToXmlFile(this.m_ParkingPermit)).ShowDialog(); break; case "PermitPark2": this.Hide(); int num4 = (int)new frmLogin(this.m_ParkingPermit, "PermitPark2", this.m_OverviewLocation, this.m_PlateLocation).ShowDialog(); break; default: this.Hide(); string displayOption2 = "SelectPayment"; WeeklyParkingTariff weeklyParkingTariff = new WeeklyParkingTariff(this.m_ParkingPermit.DurationOfStay); if (weeklyParkingTariff.MAX_PAYMENT_OPTIONS == 1 || weeklyParkingTariff.ValidOptionsCount == 1) { this.m_ParkingPermit.Amount = weeklyParkingTariff.GetFirstParkingCharge(); this.m_ParkingPermit.EndDate = this.m_ParkingPermit.StartDate.Add(weeklyParkingTariff.GetDurationFromTariff(0)); int num2 = (int)new PaymentForm(this.m_ParkingPermit, displayOption2).ShowDialog(); break; } PaymentManager.ProcessPayment(this.m_ParkingPermit); break; } }
private void cmdYes_Click(object sender, EventArgs e) { this.ConfirmVehicle = true; this.Close(); this.panel1.Visible = true; this.m_ParkingPermit.CaptureDate = DateTime.Now; this.m_ParkingPermit.StartDate = DateTime.Now; WeeklyParkingTariff weeklyParkingTariff = new WeeklyParkingTariff(this.m_ParkingPermit.DurationOfStay); if (weeklyParkingTariff.MAX_PAYMENT_OPTIONS == 1) { this.m_ParkingPermit.Amount = weeklyParkingTariff.GetFirstParkingCharge(); this.m_ParkingPermit.EndDate = this.m_ParkingPermit.StartDate.AddHours(Settings.Default.MaximumPermitHours); int num = (int)new PaymentForm(this.m_ParkingPermit, "DisplayPayment").ShowDialog(); } else { switch (this.m_ApplicationType) { case "ServiceStationPark": int num1 = (int)new frmLogin(this.m_ParkingPermit, "ServiceStationPark").ShowDialog(); break; case "PermitPark": this.Hide(); if (this.m_ParkingPermit.PermitType == "STAFF") { this.m_ParkingPermit.EndDate = DateTime.Parse("9999-12-30 23:59"); int num2 = (int)new frmLogin(this.m_ParkingPermit, "PermitPark").ShowDialog(); break; } this.m_ParkingPermit.EndDate = this.m_ParkingPermit.StartDate.AddDays(1.0); CUpdateVehicleData cupdateVehicleData = new CUpdateVehicleData(); int num3 = (int)new frmThankYou(this.m_ParkingPermit, "PermitPark", CCacheData.WriteParkingPermitToXmlFile(this.m_ParkingPermit)).ShowDialog(); break; case "PermitPark2": this.Hide(); int num4 = (int)new frmLogin(this.m_ParkingPermit, "PermitPark2", this.m_OverviewLocation, this.m_PlateLocation).ShowDialog(); break; default: ParkingChargesForm parkingChargesForm = new ParkingChargesForm(this.m_ParkingPermit); int num5 = (int)parkingChargesForm.ShowDialog(); parkingChargesForm.Dispose(); break; } } }