public static bool checkLogin1(string masv, string psw) { string psw1 = PasswordUtil.HashPassword(psw); using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(false); } try { //Execute select command string strSql = string.Format(@"select 1 from [dbo].[dnn_Nuce_Eduweb_sv_pass] where [masv]='{0}' and [pass]='{1}' ", masv, psw1); DataTable dt = Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, CommandType.Text, strSql).Tables[0]; if (dt.Rows.Count > 0) { return(true); } else { return(false); } } catch { return(false); } } }
public static void OutputText_Batch_Statistics() { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } using (SqlCommand command = objConnection.CreateCommand()) { command.CommandType = CommandType.StoredProcedure; command.CommandTimeout = 300; command.CommandText = "dnn_Nuce_KS_OutputText_Batch_Statistics"; command.ExecuteNonQuery(); } } }
public static DataTable SinhVienRaTruong_GetTK() { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, CommandType.StoredProcedure, "dnn_Nuce_KS_SinhVienRaTruong_GetTK").Tables[0]); } catch { return(null); } } }
public static void update(string ID, string Value) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_ICO_Authen_update"); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(objConnection, strSql, ID, Value); } catch (System.Exception ex) { } } }
public static DataTable getByStatus(int Status) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_NuceCommon_NamHoc_get_byStatus"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql, Status).Tables[0]); } catch { return(null); } } }
public static DataSet TSCNganh_GetData() { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienRaTruong_TSCNganh_GetData"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql)); } catch { return(null); } } }
public static int insert34(string masv, string mamh, string manh, string diem1, string diem2, string diem3, float fdiem1, float fdiem2, float fdiem3, string namhoc) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(-1); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_DiemThi_13_14_Insert"); return((int)Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(objConnection, strSql, masv, mamh, manh, diem1, diem2, diem3, fdiem1, fdiem2, fdiem3, namhoc)); } catch { return(-1); } } }
public static DataSet getByMH(string code) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_NUCE_KS_DiemThi_LMH_StatisticsMH"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql, code)); } catch { return(null); } } }
public static DataTable Check34() { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_DiemThi_13_14_Check"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql).Tables[0]); } catch { return(null); } } }
public static void Insert(string KeyCheck, int Status, int Type, string Description) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } try { //Execute select command string strSql = string.Format(@"dnn_NuceQLPM_Log_Syn_insert"); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(objConnection, strSql, KeyCheck, Status, Type, Description); } catch { return; } } }
public static void SinhVien_THANGHN_insert1(int Value, string Desc) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_SinhVien_THANGHN_insert1"); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(objConnection, strSql, Value, Desc); } catch { return; } } }
public static string get(string ID) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_ICO_Authen_get"); return((string)Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(objConnection, strSql, ID)); } catch { return("-1"); } } }
public static DataTable getByStatus(int Status, int Type) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienRaTruong_BaiKhaoSat_SinhVien_GetByStatus"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql, Status, Type).Tables[0]); } catch { return(null); } } }
public static DataTable getByNgayCaPhong(DateTime Ngay, int Ca, int Phong) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_NuceQLPM_LichPhongMay_getByNgayCaPhong"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql, Ngay, Ca, Phong).Tables[0]); } catch { return(null); } } }
public static void deleteByNgayCaPhong(DateTime Ngay, int Ca, int Phong) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } try { //Execute select command string strSql = string.Format(@"dnn_NuceQLPM_LichPhongMay_deleteByNgayCaPhong"); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(objConnection, strSql, Ngay, Ca, Phong); } catch { return; } } }
public static void updateMac(int iID, string Mac) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } try { //Execute select command string strSql = string.Format(@"dnn_NuceCommon_May_update_mac"); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(objConnection, strSql, iID, Mac); } catch { return; } } }
public static int DoiMatKhau(string maCB, string OldPsw, string NewPsw) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(-1); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_CanBo_DoiMatKhau"); return((int)Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(objConnection, strSql, maCB, OldPsw, NewPsw)); } catch { return(-1); } } }
public static DataTable get(int ID) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_SinhVien_get"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql, ID).Tables[0]); } catch { return(null); } } }
public static DataTable checkLogin(string tendangnhap, string psw) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_CanBo_checkLogin"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql, tendangnhap, psw).Tables[0]); } catch { return(null); } } }
public static DataTable getXuatDuLieuSinhVienSauKhaoSatByMaCNganh(string maCnganh) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienRaTruong_XuatDuLieuSinhVienSauKhaoSatByMaCNganh"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql, maCnganh).Tables[0]); } catch { return(null); } } }
public static void update_bailam1(int iID, string BaiLam, DateTime NgayGioNopBai, string LogIP, int Status) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_BaiKhaoSat_SinhVien_update_bailam1"); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(objConnection, strSql, iID, BaiLam, NgayGioNopBai, LogIP, Status); } catch { return; } } }
public static DataTable update(string masv, string email, string email1, string email2, string mobile, string mobile1, string mobile2, string addinfo1, string addinfo2) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_SinhVien_update_email"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql, masv, email, email1, email2, mobile, mobile1, mobile2, addinfo1, addinfo2).Tables[0]); } catch { return(null); } } }
public static void update_Type(int iID, int Type) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_BaiKhaoSat_SinhVien_update_type"); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(objConnection, strSql, iID, Type); } catch { return; } } }
public static int updateByChecksum(string checksum, string email, string email1, string email2, string mobile, string mobile1, string mobile2, string addinfo1, string addinfo2) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(-1); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_SinhVien_update_emailbychecksum"); return((int)Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(objConnection, strSql, checksum, email, email1, email2, mobile, mobile1, mobile2, addinfo1, addinfo2)); } catch { return(-1); } } }
public static int Check78(string masv, string mamh, string manh) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(-1); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_DiemThi_17_18_Check"); return((int)Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(objConnection, strSql, masv, mamh, manh)); } catch { return(-1); } } }
public static int authen_email(string masv, string key, int status) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(-1); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_SinhVien_authen_email"); return((int)Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteScalar(objConnection, strSql, masv, key, status)); } catch { return(-1); } } }
public static void insertLogAccess(int UId, string UCode, int status, string strMessage) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_SinhVien_LogAccess_insert"); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(objConnection, strSql, UId, UCode, status, strMessage); } catch { return; } } }
public static DataSet GetKetQuaKhaoSatExportTongHop() { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienSapRaTruong_KetQuaKhaoSat_Export_TongHop"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql)); } catch { return(null); } } }
public static DataTable getByLopQDAndDotTotNghiep(string lop, int dotkhaosat) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return(null); } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienRaTruong_getByLopQDAndDotTotNghiep"); return(Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteDataset(objConnection, strSql, lop, dotkhaosat).Tables[0]); } catch { return(null); } } }
/* @SinhVienRaTruong_BaiKhaoSat_SinhVienID int, * @SinhVienRaTruong_BaiKhaoSatID int, * @SinhVienID int, * @QuestionType int, * @QuestionId int, * @AnswerId int, * @Total int , * @Value nvarchar(max)*/ public static void insert(int SinhVienRaTruong_BaiKhaoSat_SinhVienID, int SinhVienRaTruong_BaiKhaoSatID, int SinhVienID, string QuestionType, int QuestionID, int AnswerId, int Total, string Value) { using (SqlConnection objConnection = Nuce_Common.GetConnection()) { if (objConnection == null) { return; } try { //Execute select command string strSql = string.Format(@"dnn_Nuce_KS_SinhVienRaTruong_ReportTotal_insert"); Microsoft.ApplicationBlocks.Data.SqlHelper.ExecuteNonQuery(objConnection, strSql, SinhVienRaTruong_BaiKhaoSat_SinhVienID, SinhVienRaTruong_BaiKhaoSatID , SinhVienID, QuestionType, QuestionID, AnswerId, Total, Value); } catch (Exception ex) { return; } } }