예제 #1
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            TicketListBoxItem TicketLbi = (TicketListBoxItem)lstbxTickets.SelectedItem;
            int ticketNumber = -1;
            try
            {
                ticketNumber = TicketLbi.TicketNumber;
            }
            catch (Exception)
            {
                throw; //Ticket Not set.
            }

            Ticket t = dbInterface.SelectTicket(ticketNumber);
            frmTicket frm = new frmTicket(t, this);
            frm.Show();
        }
예제 #2
0
 private void btnNew_Click(object sender, EventArgs e)
 {
     InputBox iBox = new InputBox();
     string tagNumber = iBox.Show("Please Enter the Tag Number:", typeof(ucKeypadQwerty));
     if (tagNumber != null)
     {
         //int newID;
         //newID = dbInterface.CreateTicket(tagNumber);
         frmTicket frm = new frmTicket(tagNumber, this); //Create new Ticket.
         frm.Show();
     }
 }