public Homepage(Database db, AddBillForm abf, ViewBillsForm vbf) { InitializeComponent(); database = db; billForm = abf; viewForm = vbf; PopulateGraph(); }
private void ViewMenuButton_Click(object sender, EventArgs e) { ViewBillsForm viewForm = new ViewBillsForm(this, database); viewForm.Show(); Bill_Name_Text.Text = ""; BillPrice.Value = 0; ViewMenuButton.Enabled = false; }
static void Main() { //db.EmptyBillTable(); Application.EnableVisualStyles(); Application.SetCompatibleTextRenderingDefault(false); Database db = new Database(); AddBillForm abf = new AddBillForm(db); ViewBillsForm vbf = new ViewBillsForm(abf, db); Homepage hp = new Homepage(db, abf, vbf); Application.Run(hp); }