Exemple #1
0
        private void displayTescoStaff()
        {
            Utilites.WriteToLog("displayTescoStaff entered");
            this.FormatThankYouMessage();
            int width1 = this.Width;
            int width2 = this.lblThankYou.Width;

            this.lblThankYou.Location = new Point((width1 - width2) / 2, 40);
            int width3 = this.lblVehicleAdded.Width;

            this.lblVehicleAdded.Location = new Point((width1 - width3) / 2, 95);
            int width4 = this.lblStaff.Width;

            this.lblStaff.Location       = new Point((width1 - width4) / 2, 130);
            this.cmdClose.Location       = new Point((width1 - this.cmdClose.Width) / 2, 260);
            this.lblThankYou.Visible     = true;
            this.lblVehicleAdded.Visible = true;
            this.cmdClose.Visible        = true;
            this.lblStaff.Visible        = true;
            this.m_PaidInFullDisplayed   = true;
            this.PaidInFullTimer.Enabled = true;
            Utilites.WriteToLog("displayTescoStaff exited");
        }
Exemple #2
0
 private void cmdEnter_Click(object sender, EventArgs e)
 {
     if (StringTools.IsNumeric(this.txtDays.Text))
     {
         if (Settings.Default.MaxNumberOfDaysToPermitFor >= double.Parse(this.txtDays.Text + ".0"))
         {
             this.m_ParkingPermit.EndDate = this.m_ParkingPermit.StartDate.AddDays(double.Parse(this.txtDays.Text + ".0"));
             bool xml = Utilites.WriteParkingPermitToXML(this.m_ParkingPermit);
             this.Hide();
             new frmThankYou(this.m_ParkingPermit, this.m_DisplayOption, xml).Show();
             this.Close();
         }
         else
         {
             this.lblTooManyDays.Visible = true;
             this.lblError.Visible       = true;
         }
     }
     else
     {
         this.lblError.Visible = true;
     }
 }
Exemple #3
0
        private void displayTescoVistor()
        {
            Utilites.WriteToLog("displayTescoVistor entered");
            this.FormatThankYouMessage();
            int width1 = this.Width;
            int width2 = this.lblThankYou.Width;

            this.lblThankYou.Location = new Point((width1 - width2) / 2, 40);
            int width3 = this.lblVehicleAdded.Width;

            this.lblVehicleAdded.Location = new Point((width1 - width3) / 2, 95);
            this.lblDate.Text             = "FOR TODAY ONLY " + DateTime.Now.ToLongDateString();
            int width4 = this.lblDate.Width;

            this.lblDate.Location        = new Point((width1 - width3) / 2, 120);
            this.cmdClose.Location       = new Point((width1 - this.cmdClose.Width) / 2, 250);
            this.lblThankYou.Visible     = true;
            this.lblVehicleAdded.Visible = true;
            this.cmdClose.Visible        = true;
            this.lblDate.Visible         = true;
            this.m_PaidInFullDisplayed   = true;
            this.PaidInFullTimer.Enabled = true;
            Utilites.WriteToLog("displayTescoVistor exited");
        }
Exemple #4
0
 public frmThankYou(
     ParkingPermitInfo parkingPermit,
     string displayOption,
     bool updateSuccessful,
     CardDeviceResponse response)
 {
     Utilites.WriteToLog("frmThankYou entered");
     this.m_receiptID = "A" + DateTime.Now.ToString("MMHH") + Environment.GetEnvironmentVariable("RSSITECODE") + DateTime.Now.ToString("ddmmyy");
     if (string.IsNullOrEmpty(this.ThankYouCode))
     {
         this.ThankYouCode = Settings.Default.ThankYouCode;
     }
     this.InitializeComponent();
     this.Region = Region.FromHrgn(frmThankYou.CreateRoundRectRgn(0, 0, this.Width - 10, this.Height - 10, 20, 20));
     this.m_ParkingPermit.copy(parkingPermit);
     this.m_DisplayOption = displayOption;
     this.m_PaidInFull    = updateSuccessful;
     if (this.ThankYouCode == null)
     {
         this.ThankYouCode = "NONE";
     }
     this.m_responseFile = response;
     Utilites.WriteToLog("frmThankYou exited");
 }
Exemple #5
0
 private void cmdPrint_Click(object sender, EventArgs e)
 {
     Utilites.WriteToLog("cmdPrint_Click entered");
     this.PrintReceipt();
     Utilites.WriteToLog("cmdPrint_Click exited");
 }
Exemple #6
0
 private void cmdClose_Click(object sender, EventArgs e)
 {
     Utilites.WriteToLog("cmdClose_Click entered");
     this.Close();
     Utilites.WriteToLog("cmdClose_Click exited");
 }
Exemple #7
0
        private void frmPayment_Load(object sender, EventArgs e)
        {
            Utilites.WriteToLog("frmPayment_Load entered");
            if (this.m_PaidInFull)
            {
                if (this.m_DisplayOption.ToUpper().Equals("PERMITPARK2"))
                {
                    switch (this.m_ParkingPermit.PermitType)
                    {
                    case "STAFF":
                        this.displayNormal();
                        break;

                    case "VISITOR":
                        this.displayTravelodge();
                        break;

                    default:
                        this.displayNormal();
                        break;
                    }
                }
                else if (this.ThankYouCode.ToString().ToUpper().Equals("TESCO"))
                {
                    switch (this.m_ParkingPermit.PermitType)
                    {
                    case "STAFF":
                        this.displayTescoStaff();
                        break;

                    case "VISITOR":
                        this.displayTescoVistor();
                        break;

                    default:
                        this.displayNormal();
                        break;
                    }
                }
                else if (this.ThankYouCode.ToUpper().Equals("TRAVELODGE"))
                {
                    this.displayTravelodge();
                }
                else if (this.ThankYouCode.ToString().ToUpper().Equals("TYNORMAL"))
                {
                    switch (this.m_ParkingPermit.PermitType)
                    {
                    case "STAFF":
                        this.displayNormal();
                        break;

                    case "VISITOR":
                        this.displayTescoVistor();
                        break;

                    default:
                        this.displayNormal();
                        break;
                    }
                }
                else
                {
                    this.displayNormal();
                }
            }
            else
            {
                int width1 = this.Width;
                this.lblLeavingMessage.Text = "There was a problem issusing a permit";
                int width2 = this.lblLeavingMessage.Width;
                this.lblLeavingMessage.Location = new Point((width1 - width2) / 2 - 10, 40);
                this.lblForParking.Text         = ConfigurationManager.AppSettings["PaymentErrorMessage"].ToString();
                int width3 = this.lblForParking.Width;
                this.lblForParking.Location    = new Point((width1 - width3) / 2 - 10, 120);
                this.cmdClose.Location         = new Point((width1 - this.cmdClose.Width) / 2 - 10, 150);
                this.lblLeavingMessage.Visible = true;
                this.lblForParking.Visible     = true;
                this.cmdClose.Visible          = true;
            }
            this.m_PaidInFull = false;
            Utilites.WriteToLog("frmPayment_Load exited");
        }
Exemple #8
0
 private void cardPayment_Click(object sender, EventArgs e)
 {
     Utilites.WriteToLog("cmdCCard_Click entered");
     this.StartCardPayment();
     Utilites.WriteToLog("cmdCCard_Click Exited");
 }
Exemple #9
0
 internal static void WriteToLog(string message, TraceEventType severity)
 {
     Utilites.WriteToLog("Unspecified Log Entry", message, severity);
 }
Exemple #10
0
 internal static void WriteToLog(string message)
 {
     Utilites.WriteToLog(message, TraceEventType.Information);
 }