public frmRefund(int salespersonID) { InitializeComponent(); handlerRefund = new Handler_Refund(); handlerCompany = new Handler_Company(); this.salespersonID = salespersonID; }
private void frmSettings_Load(object sender, EventArgs e) { metroTabControl1.SelectedTab = tabGeneral; handlerSalesperson = new Handler_Salesperson(); handlerPayment = new Handler_Payment(); handlerCompany = new Handler_Company(); handlerProduct = new Handler_Product(); handlerSize = new Handler_Size(); handlerMedium = new Handler_Medium(); try { BindData_Payments(); BindData_Size(); BindData_Medium(); BindData_Product(); BindData_Company(); BindData_Size_Grid(); BindData_Medium_Grid(); } catch (Exception ex) { MessageBox.Show("Error occured connecting to the database!" + Environment.NewLine + Environment.NewLine + ex.Message); } try { BindData_Email(); BindData_VAT(); BindData_SMS(); } catch (Exception ex) { MessageBox.Show("Error occured when retrieving settings!" + Environment.NewLine + Environment.NewLine + ex.Message); } }
public PrintReceipt(List <OrderLine> orderItems, string date, string time, string orderNumber, double total, double cash, double change, double discount, string customer) { handlerCompany = new Handler_Company(); company = handlerCompany.GetCompanyDetails(); this.orderItems = orderItems; this.date = date.Substring(0, 10); this.time = time.Substring(11); this.orderNumber = orderNumber; this.total = total; this.cash = cash; this.change = change; this.discount = discount; this.customer = customer; VAT = VAT / 100; discountTotal = total - (total / 100 * discount); //===http://vatcalconline.com/ ===// totalVat = discountTotal - (((discountTotal / (1 + VAT)) - discountTotal) / -1); }