/// <summary> /// Gets an IDataReader with all rows in the UserProfile table. /// </summary> public static IDataReader GetAll(string q) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "UserProfile_hoadm01082015_SelectAll", 1); sph.DefineSqlParameter("@KeySearch", SqlDbType.NVarChar, 256, ParameterDirection.Input, q); return sph.ExecuteReader(); }
/// <summary> /// Gets an IDataReader with one row from the gv_MonHoc table. /// </summary> /// <param name="monHocGuid"> monHocGuid </param> public IDataReader GetOne( Guid monHocGuid) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "gv_MonHoc_Chuongtv31072015_GetOne", 1); sph.DefineSqlParameter("@MonHocGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, monHocGuid); return sph.ExecuteReader(); }
/// <summary> /// Gets an IDataReader with one row from the gv_BuoiGiangDay table. /// </summary> /// <param name="buoiGiangGuid"> buoiGiangGuid </param> public IDataReader GetOne( Guid buoiGiangGuid) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "gv_BuoiGiangDay_SelectOne", 1); sph.DefineSqlParameter("@BuoiGiangGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, buoiGiangGuid); return sph.ExecuteReader(); }
/// <summary> /// Gets an IDataReader with one row from the doc_FileSystem table. /// </summary> /// <param name="fileSystemGuid"> fileSystemGuid </param> //doanh nghiep public static IDataReader GetOne( Guid fileSystemGuid) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "doc_FileSystem_DN_SelectOne", 1); sph.DefineSqlParameter("@FileSystemGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, fileSystemGuid); return sph.ExecuteReader(); }
public static IDataReader GetByItemGuid(Guid itemGuid,Guid userGuid,string controlID) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "doc_FileSystem_SelectByItemGuid",3); sph.DefineSqlParameter("@ItemGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, itemGuid); sph.DefineSqlParameter("@UserGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, userGuid); sph.DefineSqlParameter("@ControlID", SqlDbType.NVarChar, 256, ParameterDirection.Input, controlID); return sph.ExecuteReader(); }
public static IDataReader GetPage( Guid rootGuid, int isActive, int pageNumber, int pageSize, out int totalPages) { totalPages = 1; int totalRows = GetCount(rootGuid, isActive); if (pageSize > 0) totalPages = totalRows / pageSize; if (totalRows <= pageSize) { totalPages = 1; } else { int remainder; Math.DivRem(totalRows, pageSize, out remainder); if (remainder > 0) { totalPages += 1; } } SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "cont_Catologies_ngocnv10052014_SelectPage_4para", 4); sph.DefineSqlParameter("@RootGuid", SqlDbType.NVarChar, 256, ParameterDirection.Input, rootGuid.ToString()); sph.DefineSqlParameter("@IsActive", SqlDbType.Int, ParameterDirection.Input, isActive); sph.DefineSqlParameter("@PageNumber", SqlDbType.Int, ParameterDirection.Input, pageNumber); sph.DefineSqlParameter("@PageSize", SqlDbType.Int, ParameterDirection.Input, pageSize); return sph.ExecuteReader(); }
public static IDataReader GetOne( int catologyID) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "cont_Catologies_ngocnv10052014_SelectOne_ByID", 1); sph.DefineSqlParameter("@CatologyID", SqlDbType.UniqueIdentifier, ParameterDirection.Input, catologyID); return sph.ExecuteReader(); }
internal static IDataReader GetDanhMucGuid_ByLoaiDanhMucGuid(Guid ValueGuid) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "cont_Catologies_ngocnv10052014_GetDanhMucGuid_ByLoaiDanhMucGuid", 1); sph.DefineSqlParameter("@KindCatologyGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, ValueGuid); return sph.ExecuteReader(); }
public static IDataReader GetPageByItemGuid(int pageNumber, int pageSize, out int totalRows, Guid catGuid, string q) { totalRows = 0; totalRows = GetCountByItemGuid(catGuid, q); SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "doc_FileSystem_DN_SelectPageByItemGuid", 4); sph.DefineSqlParameter("@PageNumber", SqlDbType.Int, ParameterDirection.Input, pageNumber); sph.DefineSqlParameter("@PageSize", SqlDbType.Int, ParameterDirection.Input, pageSize); sph.DefineSqlParameter("@ItemGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, catGuid); sph.DefineSqlParameter("@KeySearch", SqlDbType.NVarChar, 256, ParameterDirection.Input, q); return sph.ExecuteReader(); }
internal static IDataReader GetAllCatologiesByUserIDNotChilrend(int user, Guid q) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "cont_Catologies_GetAllCatologiesByUserIDNotChilrend", 2); sph.DefineSqlParameter("@UserID", SqlDbType.Int, ParameterDirection.Input, user); sph.DefineSqlParameter("@CatGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, q); return sph.ExecuteReader(); }
internal static IDataReader GetAllCatologiesByUserID(int user) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "cont_Catologies_GetAllCatologiesByUserID", 1); sph.DefineSqlParameter("@UserID", SqlDbType.NVarChar, 256, ParameterDirection.Input, user); return sph.ExecuteReader(); }
/// <summary> /// Gets a page of data from the UserProfile table. /// </summary> /// <param name="pageNumber">The page number.</param> /// <param name="pageSize">Size of the page.</param> /// <param name="totalPages">total pages</param> public static IDataReader GetPage( int pageNumber, int pageSize, out int totalrow, string q) { totalrow = 0; totalrow = GetCount(q); SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "UserProfile_hoadm01082015_SelectPage", 3); sph.DefineSqlParameter("@PageNumber", SqlDbType.Int, ParameterDirection.Input, pageNumber); sph.DefineSqlParameter("@PageSize", SqlDbType.Int, ParameterDirection.Input, pageSize); sph.DefineSqlParameter("@KeySearch", SqlDbType.NVarChar, 256, ParameterDirection.Input, q); return sph.ExecuteReader(); }
/// <summary> /// Gets an IDataReader with one row from the UserProfile table. /// </summary> /// <param name="userGuid"> userGuid </param> public static IDataReader GetOne( int userID) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "UserProfile_hoadm01082015_SelectOne", 1); sph.DefineSqlParameter("@UserID", SqlDbType.Int, ParameterDirection.Input, userID); return sph.ExecuteReader(); }
internal static IDataReader GetAllCatologies(Guid valueGuid, int active) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "cont_Catologies_ngocnv10052014_GetAllCatologies", 2); sph.DefineSqlParameter("@ValueGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, valueGuid); sph.DefineSqlParameter("@Active", SqlDbType.Int, ParameterDirection.Input, active); return sph.ExecuteReader(); }
/// <summary> /// Gets a page of data from the doc_FileSystem table. /// </summary> /// <param name="pageNumber">The page number.</param> /// <param name="pageSize">Size of the page.</param> /// <param name="totalPages">total pages</param> public static IDataReader GetPage( int pageNumber, int pageSize, out int totalPages) { totalPages = 1; int totalRows = GetCount(); if (pageSize > 0) totalPages = totalRows / pageSize; if (totalRows <= pageSize) { totalPages = 1; } else { int remainder; Math.DivRem(totalRows, pageSize, out remainder); if (remainder > 0) { totalPages += 1; } } SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "doc_FileSystem_SelectPage", 2); sph.DefineSqlParameter("@PageNumber", SqlDbType.Int, ParameterDirection.Input, pageNumber); sph.DefineSqlParameter("@PageSize", SqlDbType.Int, ParameterDirection.Input, pageSize); return sph.ExecuteReader(); }
internal static IDataReader GetAllDanhMuc_TheoDanhMucCha(Guid ValueGuid, int IsActive) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "cont_Catologies_ngocnv10052014_GetAllDanhMuc_TheoDanhMucCha", 2); sph.DefineSqlParameter("@GuidDanhMucCha", SqlDbType.UniqueIdentifier, ParameterDirection.Input, ValueGuid); sph.DefineSqlParameter("@IsActive", SqlDbType.Int, ParameterDirection.Input, IsActive); return sph.ExecuteReader(); }
internal static IDataReader GetAllByDoanhNghiepFull(Guid doanhNghiepGuid) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "doc_nam051815_FileSystem_SelectAllFileByDoanhNghiepFull", 1); sph.DefineSqlParameter("@DoanhNghiepGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, doanhNghiepGuid); return sph.ExecuteReader(); }
internal IDataReader GetAllMonHocTheoGiangVien(int Userid) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "gv_MonHoc_Chuongtv31072015_GetAllMonHocTheoGiangVien", 1); sph.DefineSqlParameter("@Userid", SqlDbType.Int, ParameterDirection.Input, Userid); return sph.ExecuteReader(); }
internal static IDataReader GetAllByItemGuidAndTableNameWithAttach(Guid guidFile, string tableName) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "doc_FileSystem_SelectAllByItemGuidAndTableNameWithAttach", 2); sph.DefineSqlParameter("@ItemGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, guidFile); sph.DefineSqlParameter("@TableName", SqlDbType.NVarChar, 256, ParameterDirection.Input, tableName); return sph.ExecuteReader(); }
internal IDataReader GetAllByMonGuidAndUser(Guid MonGuida, int UserID) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "gv_BuoiGiangDay_tsandtm_GetAllByMonGuidAndUser", 2); sph.DefineSqlParameter("@MonHocGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, MonGuida); sph.DefineSqlParameter("@UserID", SqlDbType.Int, ParameterDirection.Input, UserID); return sph.ExecuteReader(); }
internal static IDataReader GetTrashFileByUserGuidLogError(Guid userguid, string tableName) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "doc_FileSystem_SelectAllTrashFileByUserGuidLogLoi", 2); sph.DefineSqlParameter("@UserGuid", SqlDbType.UniqueIdentifier, ParameterDirection.Input, userguid); sph.DefineSqlParameter("@TableName", SqlDbType.NVarChar, 256, ParameterDirection.Input, tableName); return sph.ExecuteReader(); }
/// <summary> /// Gets a page of data from the gv_BuoiGiangDay table. /// </summary> /// <param name="pageNumber">The page number.</param> /// <param name="pageSize">Size of the page.</param> /// <param name="totalPages">total pages</param> public IDataReader GetPage( int pageNumber, int pageSize, out int totalrow ) { totalrow = GetCount(); SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetReadConnectionString(), "gv_BuoiGiangDay_SelectPage", 2); sph.DefineSqlParameter("@PageNumber", SqlDbType.Int, ParameterDirection.Input, pageNumber); sph.DefineSqlParameter("@PageSize", SqlDbType.Int, ParameterDirection.Input, pageSize); return sph.ExecuteReader(); }
internal static IDataReader GetListFollowerById(int userlogin) { SqlParameterHelper sph = new SqlParameterHelper(ConnectionStringStatic.GetWriteConnectionString(), "UserProfile_chuongtv01082015_GetFollowerlist", 1); sph.DefineSqlParameter("@UserID", SqlDbType.Int, ParameterDirection.Input, userlogin); return sph.ExecuteReader(); }