private void btn_new_Click(object sender, EventArgs e) { MyTicket tc = new MyTicket(); tc.btn_send.Visible = true; tc.btn_edit.Visible = false; tc.Show(); }
public TicketControl AddTicket(Ticket ticket) { TicketControl ticketControl = new TicketControl(); ticketControl.lbl_name.Text = ticket.Name; ticketControl.lbl_short.Text = ticket.ShortDescription; ticketControl.lblDetail.Text = ticket.Detail; ticketControl.lblStatus.Text = ticket.Status; ticketControl.btn_edit.Click += (a, b) => { MyTicket tc = new MyTicket(); tc.btn_edit.Visible = true; tc.btn_send.Visible = false; TicketsList.chancedTicketID = ticket.ID; tc.Show(); }; ticketControl.Location = new Point(0, y); y += 60; return(ticketControl); }