// Add a new constructor for passing in the main menu form and currently logged in user. public FormAdmin(Form callingForm, User user) { mainMenu = callingForm as FormMainMenu; currentUser = user; InitializeComponent(); LoadData(); }
public FormDashboard(FormMainMenu formMainMenu) { InitializeComponent(); emailBox.Focus(); this.formMainMenu = formMainMenu; Text = "Dashboard"; }
private void buttonDN_Click(object sender, EventArgs e) { try { if (String.IsNullOrEmpty(textBoxTK.Text)) { MessageBox.Show("Ban chua nhap ten tai khoan!!"); this.ActiveControl = textBoxTK; } else if (String.IsNullOrEmpty(textBoxMK.Text)) { MessageBox.Show("Ban chua nhap mat khau!!"); this.ActiveControl = textBoxMK; } else { NguoiDung ndCheck = db.NguoiDungs.SingleOrDefault(x => x.TenUser == textBoxTK.Text && x.MatKhau == textBoxMK.Text); if (ndCheck != null) { FormMainMenu formMain = new FormMainMenu(); formMain.ShowDialog(); } else { MessageBox.Show("Tai khoan hoac mat khau sai!!"); textBoxTK.Clear(); textBoxMK.Clear(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public FormCheckin(FormMainMenu fmm) { InitializeComponent(); this.formMainMenu = fmm; LoadCheckedoutEquipment(); Text = "Check In"; }
// *************************************************** // Start [Monobehavior] // --------------------------------------------------- void Start() { mInstance = this; Hide(); Show(); GuiMall(); }
public FormProfile(Form callingForm, User user) { mainMenu = callingForm as FormMainMenu; currentUser = user; InitializeComponent(); this.Text = user.Username; // Populate fields with current user passed to the form. lbl_usernameData.Text = user.Username; lbl_emailData.Text = user.Email; }
public FormLogin(Form callingForm, string message = "") { mainMenu = callingForm as FormMainMenu; InitializeComponent(); // If a message is sent when opening the form, display it. if (message != "") { lbl_errorMessage.Text = message; panel_error.Visible = true; } }
private void timer1_Tick(object sender, EventArgs e) { panel2.Width += 5; if (panel2.Width >= 700) { timer1.Stop(); FormMainMenu mainMenu = new FormMainMenu(); mainMenu.Show(); this.Hide(); } }
public FormAccountSettings(FormMainMenu fmm) { InitializeComponent(); this.formMainMenu = fmm; UserIDLabel.Text = formMainMenu.id; FirstNameLabel.Text = formMainMenu.fname; LastNameLabel.Text = formMainMenu.lname; EmailLabel.Text = formMainMenu.UserEmail; PhoneNumberLabel.Text = formMainMenu.phone; CurrentFineLabel.Text = "$" + formMainMenu.fine; Text = "Account"; }
public FormStock(FormMainMenu fmm) { InitializeComponent(); LoadEquipmentList(); Text = "Stock"; this.formMainMenu = fmm; activeFilter = "All"; if (formMainMenu.isLoggedIn == false) { CheckOutBtn.Hide(); } else { CheckOutBtn.Show(); } }
private void buttonDangNhap_Click(object sender, EventArgs e) { FormMainMenu fm = new FormMainMenu(); try { if (String.IsNullOrEmpty(textBoxTK.Text)) { MessageBox.Show("Ban chua nhap ten tai khoan!!"); this.ActiveControl = textBoxTK; } else if (String.IsNullOrEmpty(textBoxMK.Text)) { MessageBox.Show("Ban chua nhap mat khau!!"); this.ActiveControl = textBoxMK; } else { UserTaiKhoan user = db.UserTaiKhoans.SingleOrDefault(x => x.TaiKhoan == textBoxTK.Text && x.MatKhau == textBoxTK.Text); if (user != null) { this.Hide(); fm.ShowDialog(); this.Close(); } else { MessageBox.Show("Tai khoan hoac mat khau khong dung!!!"); textBoxTK.Clear(); textBoxMK.Clear(); } } } catch (Exception ex) { MessageBox.Show(ex.Message); } }
private void button1_Click(object sender, EventArgs e) { FormMainMenu frm; if (passText.Text == "admin" && radioButton1.Checked) { frm = new FormMainMenu("YÖNETİCİ"); frm.Show(); this.Hide(); } else if (passText.Text == "kasa1" && radioButton2.Checked) { frm = new FormMainMenu("KASA1"); frm.Show(); this.Hide(); } else if (passText.Text == "kasa2" && radioButton3.Checked) { frm = new FormMainMenu("KASA2"); frm.Show(); this.Hide(); } else if (passText.Text == "kasa3" && radioButton4.Checked) { frm = new FormMainMenu("KASA3"); frm.Show(); this.Hide(); } else if (passText.Text == "kasa4" && radioButton5.Checked) { frm = new FormMainMenu("KASA4"); frm.Show(); this.Hide(); } else { MessageBox.Show("Hatalı Giriş!"); } }
public FormRegister(Form callingForm) { mainMenu = callingForm as FormMainMenu; InitializeComponent(); }
// *************************************************** // OnDestroy [Monobehavior] // --------------------------------------------------- void OnDestroy() { mInstance = null; }
public FormCheckout(FormMainMenu formMainMenu) { InitializeComponent(); this.formMainMenu = formMainMenu; }
/*public FormRegister() * { * InitializeComponent(); * }*/ public FormRegister(FormMainMenu formMainMenu) { InitializeComponent(); firstNameBox.Focus(); this.formMainMenu = formMainMenu; }
public FormAddEquipment(FormMainMenu fmm) { InitializeComponent(); this.formMainMenu = fmm; }