Beispiel #1
0
 private void CancelBtn_Click(object sender, EventArgs e)
 {
     CancelReasonTxt.Text = "";
     CancelReasonTxt.Focus();
     pg.offenceForm.Show();
     this.Hide();
 }
Beispiel #2
0
        private void SubmitBtn_Click(object sender, EventArgs e)
        {
            CancelReasonTxt.Focus();
            DBHelp dbh = new DBHelp();

            if (CancelReasonTxt.Text != "")
            {
                Ticket.Notes      = "CANCELED: " + CancelReasonTxt.Text;
                Ticket.StatusCode = "C";

                try
                {
                    if (Ticket.PrintError)
                    {
                        dbh.CancelExistingTicket(Ticket.TicketNumber);
                    }
                    else
                    {
                        if (!inserted)
                        {
                            dbh.InsertTicket();
                            inserted = true;
                        }
                    }

                    if (dbh.IsNetConnected())
                    {
                        dbh.PostTicket();
                    }

                    pg.locationForm.Show();
                    this.Hide();
                    CancelReasonTxt.Text = "";
                    CurrentCharge.Charge = null;
                    inserted             = false;
                }
                catch (Exception er) { }
            }
            else
            {
                CancelReasonTxt.Focus();


                PopUpForm pf = new PopUpForm("Cancel Reason not entered.");
                pf.ShowDialog();
            }
        }
Beispiel #3
0
 void CancelForm_Activated(object sender, EventArgs e)
 {
     CancelReasonTxt.Focus();
     ticketCount.Text = dbh.TicketCount().ToString();
 }