private void SetTariffCategoryAndShowNumberOfDaysForm(string tariffCategory) { this.m_ParkingPermit.MachineName = Environment.MachineName; this.m_ParkingPermit.PermitType = TariffCategorySettings.DecidePermitType(tariffCategory); this.m_ParkingPermit.PaymentType = tariffCategory; this.m_ParkingPermit.AuthCode = ""; this.m_ParkingPermit.Amount = new Decimal(0); if (this._numberOfDaysChoiceEnabled) { new frmNumberOfDays(this.m_ParkingPermit, this.m_DisplayOption).Show(); this.Hide(); } else { this.m_ParkingPermit.EndDate = this.m_ParkingPermit.StartDate.AddDays(Settings.Default.MaxNumberOfDaysToPermitFor); this.GetFormPaidInFullSettings(); } }
private void LoginPassedOpenNextForm() { switch (this.m_DisplayOption) { case "ServiceStationPark": if (TariffCategorySettings.EnabledTariffCategories().Count > 1) { this.ShowTariffCategoryOptionForm(); break; } this.WriteTariffCategoryPermit(); break; case "PermitPark": if (this._numberOfDaysChoiceEnabled) { this.ShowNumberOfDaysForm(); break; } this.WritePermitToXMLAndOpenThankyouForm(); break; case "PermitPark2": if (this.m_ParkingPermit.PermitType == "VISITOR") { this.ShowNumberOfDaysForm(); break; } this.m_ParkingPermit.EndDate = DateTime.Parse("9999-12-31 23:59:59"); this.WritePermitToXMLAndOpenThankyouForm(); break; default: this.WritePermitToXMLAndOpenThankyouForm(); break; } this.lblWrongPasscode.Visible = false; }
private void WriteTariffCategoryPermit() { this.m_ParkingPermit.MachineName = Environment.MachineName; this.m_ParkingPermit.PermitType = "VISITOR"; string str = "CAR"; if (TariffCategorySettings.EnabledTariffCategories().Count == 1) { str = TariffCategorySettings.EnabledTariffCategories()[0]; } this.m_ParkingPermit.PaymentType = str; this.m_ParkingPermit.AuthCode = ""; this.m_ParkingPermit.Amount = new Decimal(0); if (this._numberOfDaysChoiceEnabled) { new frmNumberOfDays(this.m_ParkingPermit, this.m_DisplayOption).Show(); this.Hide(); } else { this.m_ParkingPermit.EndDate = this.m_ParkingPermit.StartDate.AddDays(Settings.Default.MaxNumberOfDaysToPermitFor); this.WritePermitToXMLAndOpenThankyouForm(); } }