public void mbtnBorrow_Click(object sender, EventArgs e) { this.Hide(); frm6BorrowBook f = new frm6BorrowBook(); f.Name = this.Name; f.Location = this.Location; f.ShowDialog(); this.Close(); }
private void btnBorrow_Click(object sender, EventArgs e) { //launch form Borrow //fill all required the customer informations this.Hide(); frm6BorrowBook f = new frm6BorrowBook(); f.Location = this.Location; f.SetMemberID(m.MemberID.ToString()); f.ShowDialog(); this.Close(); }
private void btnLogin_Click(object sender, EventArgs e) { username = Username_txt.Text; string password = Password_text.Text; Username_txt.Text.Trim(); using (GalaxyEntities context = new GalaxyEntities()) { var user = context.Staffs.FirstOrDefault(u => u.Username == username); if (user != null) { if (user.Password == password) { this.Hide(); //this.DialogResult = DialogResult.OK; //proceed to new form = frm6BorrowBook f = new frm6BorrowBook(); //frmTemplate temp = new frmTemplate(); //temp.LbUserName = username; f.Name = user.Name; f.Location = this.Location; f.ShowDialog(); this.Close(); //label4.Text = "Login successful"; //if (user.Username == "Venkat") { // checkBoss = true; //} } else { label4.Text = "Wrong password"; } } else { label4.Text = "No User Called " + username + " found"; } } }