private void btn_Employee_Click(object sender, EventArgs e) { Panel_SideBar.Location = new Point(0, 504); FrmMDI frmMDI = new FrmMDI(); this.Hide(); frmMDI.ShowDialog(); this.Dispose(); this.Close(); }
public void btn_Login_Click(object sender, EventArgs e) { PerformValidation(); if (result == true) { string status = LoginService.LoginServices(txt_UserName.Text, txt_Password.Text); if (status == "Login Success") { MessageBox.Show("Login Success, Welcome: " + txt_UserName.Text); //-- Show form kedua -- FrmMDI FormMdi = new FrmMDI(); this.Hide(); FormMdi.ShowDialog(); this.Close(); } else if (status != "Login Success") { MessageBox.Show("Invalid User Name / Password"); } } }
private void txt_Password_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Enter) { PerformValidation(); if (result == true) { string status = LoginService.LoginServices(txt_UserName.Text, txt_Password.Text); if (status == "Login Success") { MessageBox.Show("Login Success, Welcome: " + txt_UserName.Text); //-- Show form kedua -- FrmMDI FormMdi = new FrmMDI(); this.Hide(); FormMdi.ShowDialog(); this.Close(); } else if (status != "Login Success") { MessageBox.Show("Invalid User Name / Password"); } } } }