private DataTable LayDS_Query(string query) { SqlCommand sqlCommand = new SqlCommand(); sqlCommand.CommandText = query; return(Exec_Class.GetData(sqlCommand)); }
private DataTable LayDS_Query(string query) { //string query = @"EXEC dbo.LayDS_MonHoc"; SqlCommand sqlCommand = new SqlCommand(); sqlCommand.CommandText = query; return(Exec_Class.GetData(sqlCommand)); }
private DataTable LayDS_TonGiao() { string query = @"EXEC dbo.LayDS_TonGiao"; SqlCommand sqlCommand = new SqlCommand(); sqlCommand.CommandText = query; return(Exec_Class.GetData(sqlCommand)); }
private DataTable LayDS_LoaiNguoiDung() { string query = @"EXEC dbo.LayDS_LoaiNguoiDung"; SqlCommand sqlCommand = new SqlCommand(); sqlCommand.CommandText = query; return(Exec_Class.GetData(sqlCommand)); }
public DataTable Backup() { string query = @"Backup database QLHocSinhTHPT to disk ='f:\BackUp.bak'"; SqlCommand sqlCommand = new SqlCommand(); sqlCommand.CommandText = query; return(Exec_Class.GetData(sqlCommand)); }
private DataTable LayDS_TimGiaoVien(string value) { string query = @"EXEC dbo.Tim_GiaoVien @value"; SqlCommand sqlCommand = new SqlCommand(); sqlCommand.Parameters.AddWithValue("@value", value); sqlCommand.CommandText = query; return(Exec_Class.GetData(sqlCommand)); }
private void CapNhat_MatKhau() { if (txt_MatKhauMoi.Password.Trim().EndsWith(txt_XacNhan.Password.Trim()) && txt_MatKhauMoi.Password.Trim() != "") { string query = @"EXEC dbo.CapNhat_MatKhau @ten_DangNhap, @matKhau_Moi"; SqlCommand sqlCommand = new SqlCommand(); sqlCommand.CommandText = query; sqlCommand.Parameters.AddWithValue("@ten_DangNhap", ten_DangNhap); sqlCommand.Parameters.AddWithValue("@matKhau_Moi", txt_MatKhauMoi.Password.Trim()); if (Exec_Class.QueryData(sqlCommand)) { MessageBox.Show("Cập nhật thành công!", "Thông báo", MessageBoxButton.OK, MessageBoxImage.Information); } this.Close(); } else { MessageBox.Show("Mật khẩu xác thực và mật khẩu mới không khớp!" + "\nVui lòng nhập lại.", "Thông báo", MessageBoxButton.OK, MessageBoxImage.Warning); } }