private void btnInventory_Click(object sender, EventArgs e) { splitCont.Panel2.Controls.Clear(); uCInventory usercontrol = new uCInventory(); splitCont.Panel2.Controls.Add(usercontrol); }
private void picWarning_Click(object sender, EventArgs e) { string num = contObj.SelectStocksRunningOut(); MessageBox.Show(num + " products are running out of stocks", "ALG Autocare", MessageBoxButtons.OK, MessageBoxIcon.Information); uCInventoryStocksProduct.showRunningOut = true; splitCont.Panel2.Controls.Clear(); uCInventory usercontrol = new uCInventory(); splitCont.Panel2.Controls.Add(usercontrol); usercontrol.tabInventory.SelectedIndex = 1; }
void Login() { this.Hide(); login.ShowDialog(); if (clsUsers.userID == null) { this.Close(); } else if (clsUsers.userType == "admin") { clerkPanel.Visible = false; splitCont.Visible = true; btnCollapse.Visible = true; timerCritStock.Enabled = true; picWarning.Visible = lblWarning.Visible = true; //timer1.Enabled = true; -for idle program in the future, logsout btnLogout.Visible = true; this.Show(); } else if (clsUsers.userType == "cashier") { btnCollapse.Visible = false; uCPointOfSale ucpointofsale = new uCPointOfSale(); clerkPanel.Controls.Clear(); clerkPanel.Controls.Add(ucpointofsale); btnCollapse.Visible = false; splitCont.Visible = false; timerCritStock.Enabled = false; picWarning.Visible = lblWarning.Visible = false; //timer1.Enabled = true; -for idle program in the future, logsout btnLogout.Visible = true; this.Show(); } else if (clsUsers.userType == "encoder") { btnCollapse.Visible = false; uCInventory ucinventory = new uCInventory(); clerkPanel.Controls.Clear(); clerkPanel.Controls.Add(ucinventory); btnCollapse.Visible = false; splitCont.Visible = false; timerCritStock.Enabled = true; picWarning.Visible = lblWarning.Visible = true; //timer1.Enabled = true; -for idle program in the future, logsout btnLogout.Visible = true; this.Show(); } else { Close(); } }