Initial code for add customer.
This commit is contained in:
parent
02421864b1
commit
4fe9f84f7e
|
@ -40,5 +40,25 @@ namespace QueueSys
|
|||
{
|
||||
MessageBox.Show("To-do: Generate excel report from SQL Database.");
|
||||
}
|
||||
|
||||
private void btnAdd_Click(object sender, EventArgs e)
|
||||
{
|
||||
SqliteDataAccess sda = new SqliteDataAccess();
|
||||
EmployeeView evNewCx = new EmployeeView();
|
||||
|
||||
evNewCx.customer_name = tbCustomerName.Text;
|
||||
evNewCx.num_bags = Int32.Parse(cbNumBags.Text);
|
||||
evNewCx.employee = tbEmployeeName.Text;
|
||||
|
||||
sda.SaveCustomer(evNewCx);
|
||||
|
||||
//sda.LoadEmployeeView();
|
||||
|
||||
tbCustomerName.Text = "";
|
||||
cbNumBags.Text = "";
|
||||
tbEmployeeName.Text = "";
|
||||
|
||||
MessageBox.Show("Customer has been added!", "Queue System", MessageBoxButtons.OK, MessageBoxIcon.Information);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue