//Form loads... private void frmOrder_Load(object sender, EventArgs e) { //BLL Access handlerOrder = new Handler_Order(); handlerOrderLine = new Handler_OrderLine(); handlerCustomer = new Handler_Customer(); handlerProduct = new Handler_Product(); handlerPayment = new Handler_Payment(); handlerDiscount = new Handler_Discount(); //Bind Data try { BindData_Product(); BindData_Payment(); BindData_Discount(); } catch (Exception ex) { MessageBox.Show("Error connection to the database!" + Environment.NewLine + Environment.NewLine + ex.Message); this.Close(); } //Focus controls tabCtrlOrder.SelectedTab = tabCustomer; tbxName.Focus(); }
private void frmMain_Load(object sender, EventArgs e) { timer1.Start(); //Limit access to features according to user rights... if (privileges == "Limited") { tileReports.Enabled = false; tsiAdmin.Enabled = false; tileSettings.Enabled = false; } if (employeeType == "Temp") { tileRefund.Enabled = false; tsiRefund.Enabled = false; } //Load orders of the current day... handlerOrder = new Handler_Order(); handlerCustomer = new Handler_Customer(); try { btnToday.PerformClick(); } catch (Exception ex) { MessageBox.Show("Error occured when retrieving orders data!" + Environment.NewLine + Environment.NewLine + ex.Message); } cbxCompleted.Checked = true; cbxCollectedOrders.Checked = false; }
private void frmOrder_Load(object sender, EventArgs e) { handlerOrder = new Handler_Order(); }