private void SimpleButton1_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtUsername.Text.Trim())) { MessageBox.Show("Không được bỏ trống " + lblUsername.Text.ToLower()); this.txtUsername.Focus(); return; } if (string.IsNullOrEmpty(this.txtPassword.Text)) { MessageBox.Show("Không được bỏ trống " + lblPassword.Text.ToLower()); this.txtPassword.Focus(); return; } if (CauHinh.Check_Config() == 0) { ProcessLogin();// Cấu hình phù hợp xử lý đăng nhập //KT_GhiNhoMK(); } if (CauHinh.Check_Config() == 1) { MessageBox.Show("Chuỗi cấu hình không tồn tại", "Thông báo");// Xử lý cấu hình ProcessConfig(); } if (CauHinh.Check_Config() == 2) { MessageBox.Show("Chuỗi cấu hình không phù hợp", "Thông báo");// Xử lý cấu hình ProcessConfig(); } }
private void btnDangNhap_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtUsername.Text.Trim())) { MessageBox.Show("Không được bỏ trống" + lblUsername.Text.ToLower()); this.txtUsername.Focus(); return; } if (string.IsNullOrEmpty(txtPassword.Text.Trim())) { MessageBox.Show("Không được bỏ trống" + lblPassword.Text.ToLower()); this.txtPassword.Focus(); return; } if (CauHinh.Check_Config() == 0) { ProcessLogin(); } if (CauHinh.Check_Config() == 1) { MessageBox.Show("Chuỗi cấu hình không tồn tại"); ProcessConfig(); } if (CauHinh.Check_Config() == 2) { MessageBox.Show("CHuỗi cấu hình không phù hợp"); ProcessConfig(); } }
private void btnDangnhap_Click_1(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtUser.Text.Trim())) { MessageBox.Show("Không được bỏ trống " + lblUser.Text.ToLower()); this.txtUser.Focus(); return; } if (string.IsNullOrEmpty(txtPass.Text.Trim())) { MessageBox.Show("Không được bỏ trống " + lblPass.Text.ToLower()); this.txtPass.Focus(); return; } if (Cauhinh.Check_Config() == 0) { ProcessLogin(); } else if (Cauhinh.Check_Config() == 1) { MessageBox.Show("Chuỗi cấu hình không tồn tại"); //xử lý cấu hinh ProcessConfig(); } else { MessageBox.Show("Chuỗi cấu hình không phù hợp"); //xử lý cấu hinh ProcessConfig(); } }
private void simpleButton1_Click(object sender, EventArgs e) { if (string.IsNullOrEmpty(txtmatkhaucu.Text.Trim())) { MessageBox.Show("Không được bỏ trống" + lblmatkhaucu.Text.ToLower()); this.txtmatkhaucu.Focus(); return; } if (string.IsNullOrEmpty(txtmatkhaumoi.Text.Trim())) { MessageBox.Show("Không được bỏ trống" + lblmatkhaumoi.Text.ToLower()); this.txtmatkhaumoi.Focus(); return; } if (CauHinh.Check_Config() == 0) { ProcessLogin(); } if (CauHinh.Check_Config() == 1) { MessageBox.Show("Chuỗi cấu hình không tồn tại"); ProcessConfig(); } if (CauHinh.Check_Config() == 2) { MessageBox.Show("CHuỗi cấu hình không phù hợp"); ProcessConfig(); } }
private void btnDangNhap_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(txtTenTaiKhoan.Text.Trim())) { MessageBox.Show("Không được bỏ trống tài khoản"); this.txtTenTaiKhoan.Focus(); return; } if (String.IsNullOrEmpty(txtMatKhau.Text.Trim())) { MessageBox.Show("Không được bỏ trống mật khẩu"); this.txtMatKhau.Focus(); return; } int kq = QL_NguoiDung.Check_Config(); if (kq == 0) { try { nv = dn.getNV(txtTenTaiKhoan.Text); if (nv != null) { MessageBox.Show("ĐĂNG NHẬP THÀNH CÔNG"); FormMenu from = new FormMenu(); from.nv = nv; this.Hide(); from.Show(); } else { MessageBox.Show("ĐĂNG NHẬP THẤT BẠI"); } } catch (Exception ex) { MessageBox.Show("Lỗi kết nối"); } } else if (kq == 1) { MessageBox.Show("Chuỗi cấu hình không tồn tại"); frmConfig cn = new frmConfig(); cn.Show(); this.Hide(); } else { MessageBox.Show("Chuỗi cấu hình không phù hợp"); frmConfig cn = new frmConfig(); cn.Show(); this.Hide(); } }