public frmAddStaff(Database database, DataTable staffTable, DataTable branchTable) { InitializeComponent(); mDatabase = database; dtbStaff = staffTable; dtbBranch = branchTable; cboStaffBranch.DataSource=dtbBranch; cboStaffBranch.DisplayMember = "branchID"; cboStaffBranch.BindingContext = this.BindingContext; }
public frmLogin(Database programDatabase) { InitializeComponent(); this.programDatabase = programDatabase; FormClosed += frmLogin_Closed; //Set for debug purposes, quicker login: /*txtUsername.Text = "admin01"; txtPassword.Text = "password";*/ }
//Opens connection to database, pulls initial data. static bool init(ref Database db, out string message) { message = "Unknown Error"; //Attempt to establish a connection to the database if (!db.initalise(ref message)) { return false; } return true; }
public frmAddProduct(Database database, ref DataTable categoryTable, ref DataTable supplierTable) { InitializeComponent(); mDatabase = database; dtbCategory = categoryTable; dtbSupplier = supplierTable; cboCategory.DataSource = dtbCategory; cboCategory.DisplayMember = "name"; cboCategory.ValueMember = "categoryID"; cboSupplier.DataSource = dtbSupplier; cboSupplier.DisplayMember = "name"; cboSupplier.ValueMember = "supplierID"; }
public frmMain(Database programDatabase, User currentuser) { InitializeComponent(); this.mDatabase = programDatabase; this.muser = currentuser; pullData(); //Prepare the tabs initialiseMemberData(); initialiseProductData(); initialiseStaffData(); initialiseBranchData(); initialiseSupplierData(); }
public frmAddRental(Database database, DataTable product, DataTable stock, DataTable branch, int memberID) { InitializeComponent(); mDatabase = database; dtbProduct = product; dtbBranch = branch; dtbStock = stock; this.memberID = memberID; items = new List<RentalItem>(); dtpReturnDate.Value = DateTime.Today.AddDays(1); txtTotal.Text = "£0.00"; cboBranch.DataSource = dtbBranch; cboBranch.DisplayMember = "branchID"; cboBranch.ValueMember = "branchID"; }
public frmAddRentalItem(Database database, DataTable stock, DataTable product, int branchID) { InitializeComponent(); mDatabase = database; dtbStock = stock; dtbProduct = product; numAmount.Enabled = false; btnSubmit.Enabled = false; cboProduct.DataSource = mDatabase.selectData("SELECT * FROM Product WHERE productID IN (SELECT productID FROM Stock Where branchID = " + branchID + ")"); cboProduct.ValueMember = "productID"; cboProduct.DisplayMember = "name"; this.branchID = branchID; cboProduct.SelectedIndexChanged += cboProduct_SelectedIndexChanged; cboProduct.SelectedIndex = -1; }
public frmAddMember(Database database) { InitializeComponent(); mDatabase = database; }
public frmAddBranch(Database database) { InitializeComponent(); mDatabase = database; }
public frmAddSupplier(Database database) { InitializeComponent(); mDatabase = database; }