private bool checkEmpty() { if (Fixbugs.emptyError(txb_Database.Text) && Fixbugs.emptyError(txb_Sever.Text) && Fixbugs.emptyError(txb_User.Text) && Fixbugs.emptyError(txb_Password.Password)) { return(true); } return(false); }
private void Connection(object sender, RoutedEventArgs e) { if (checkEmpty()) { string connectionString = ConfigurationManager.ConnectionStrings["QLGV"].ConnectionString; if (Fixbugs.duplicateErrors(xau())) { ConnecCSDL.conection(); Window1 window1 = new Window1(); window1.Show(); this.Close(); } else { MessageBox.Show("Kết Nối Không Thành Công Tài Khoảng Không Khớp"); } } else { MessageBox.Show("Bạn Chưa Nhập Thông Tin Đầy Đủ"); } }