Esempio n. 1
0
        /// <summary>
        /// function to select one page's Department list.
        /// </summary>
        /// <param name="where">query condition</param>
        /// <param name="orderBy" ></param>
        /// <param name="ascOrDesc" ></param>
        /// <param name="recordCount">total Department count to fill query condition</param>
        /// <param name="pageIndex">required page</param>
        /// <param name="pageSize">record number per page</param>
        /// <returns>SqlDataReader with the result</returns>
        public SqlDataReader SelectDepartmentListPaged(string where, string orderBy, string ascOrDesc, int recordCount, int pageIndex, int pageSize)
        {
            string what = @" 
				[EmployeeID],
				[EmployeeName],
				[FullName],
				[EmployeeDescription],
				Employee.[DepartmentID],
				Department.DepartmentName,
				Employee.[Fax],
				Employee.[Tel],
				Employee.[Email],
				Employee.[Mobile],
				Employee.[PositionType],
				TypePosition.TypeDescription as Position,
				Employee.[Sex],
				Employee.[Status]
			"            ;
            string from = @"        
				Employee
				INNER JOIN Department ON Department.DepartmentID = Employee.DepartmentID
				INNER JOIN TypePosition ON  TypePosition.TypeID=Employee.PositionType
				"                ;

            //invoke CDACommon.SelectListPaged to return the SqlDataReader
            Business.CDACommon dac = new  CDACommon();
            return(dac.SelectListPaged(what, from, where, orderBy, ascOrDesc, recordCount, pageIndex, pageSize));
        }
Esempio n. 2
0
        /// <summary>
        /// function to select one page's Department list.
        /// </summary>
        /// <param name="where">query condition</param>
        /// <param name="orderBy" ></param>
        /// <param name="ascOrDesc" ></param>
        /// <param name="recordCount">total Department count to fill query condition</param>
        /// <param name="pageIndex">required page</param>
        /// <param name="pageSize">record number per page</param>
        /// <returns>SqlDataReader with the result</returns>
        public SqlDataReader SelectSystemLogListPaged(string where, string orderBy, string ascOrDesc, int recordCount, int pageIndex, int pageSize)
        {
            string what = @" 
					[ID],
					[SessionID],
					SystemLog.[UserID],
					[LogTime],
					[ModuleID],
					[LogType],
					[LogDescription],
					[LogIP],
					[Platform],
					[BrowserVersion],
					[Language],
					isnull(BI_Employee.FullName,SystemLog.UserID) as UserName,
					BI_Employee.IDKey as UserID2
			"            ;
            string from = @"        
				SystemLog
				left outer join BI_Employee on SystemLog.UserID=BI_Employee.IDKey
			"            ;

            //invoke CDACommon.SelectListPaged to return the SqlDataReader
            Business.CDACommon dac = new  CDACommon();
            return(dac.SelectListPaged(what, from, where, orderBy, ascOrDesc, recordCount, pageIndex, pageSize));
        }
Esempio n. 3
0
        /// <summary>
        /// get record count
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        public int SelectDepartmentListPagedTotalCount(string where)
        {
            string from = " Department ";

            //invoke CDACommon.SelectListPaged to return the SqlDataReader
            Business.CDACommon dac = new  CDACommon();
            return(dac.SelectListPagedTotalCount(from, where));
        }
Esempio n. 4
0
        /// <summary>
        /// get record count
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        public int SelectSystemLogListPagedTotalCount(string where)
        {
            string from = @"                
				SystemLog
				left outer join BI_Employee on SystemLog.UserID=BI_Employee.IDKey
				"                ;

            //invoke CDACommon.SelectListPaged to return the SqlDataReader
            Business.CDACommon dac = new  CDACommon();
            return(dac.SelectListPagedTotalCount(from, where));
        }
Esempio n. 5
0
        /// <summary>
        /// get record count
        /// </summary>
        /// <param name="where"></param>
        /// <returns></returns>
        public int SelectDepartmentListPagedTotalCount(string where)
        {
            string from = @"                
				Employee
				INNER JOIN Department ON Department.DepartmentID = Employee.DepartmentID
				INNER JOIN TypePosition ON  TypePosition.TypeID=Employee.PositionType
				"                ;

            //invoke CDACommon.SelectListPaged to return the SqlDataReader
            Business.CDACommon dac = new  CDACommon();
            return(dac.SelectListPagedTotalCount(from, where));
        }
Esempio n. 6
0
        /// <summary>
        /// function to select one page's Department list.
        /// </summary>
        /// <param name="where">query condition</param>
        /// <param name="orderBy" ></param>
        /// <param name="ascOrDesc" ></param>
        /// <param name="recordCount">total Department count to fill query condition</param>
        /// <param name="pageIndex">required page</param>
        /// <param name="pageSize">record number per page</param>
        /// <returns>SqlDataReader with the result</returns>
        public SqlDataReader SelectDepartmentListPaged(string where, string orderBy, string ascOrDesc, int recordCount, int pageIndex, int pageSize)
        {
            string what = @" 
			DepartmentID,
			DepartmentName,			
			Principal,
			Address,
			Fax,
			Tel,
			Email,
			Contact,
			[Status]
		"        ;
            string from = " Department ";

            //invoke CDACommon.SelectListPaged to return the SqlDataReader
            Business.CDACommon dac = new  CDACommon();
            return(dac.SelectListPaged(what, from, where, orderBy, ascOrDesc, recordCount, pageIndex, pageSize));
        }