예제 #1
0
        /// <summary>
        /// 通过职位id返回职位对象
        /// </summary>
        /// <param name="iPostID">职位id</param>
        /// <returns></returns>
        public static Position GetPosition(int iPostID)
        {
            ViewPost vwPost = new ViewPost(true);

            vwPost.BaseCondition = "a.ID='" + iPostID + "'";
            return(vwPost.Count > 0 ? vwPost.GetItem(0) as Position : null);
        }
예제 #2
0
        /// <summary>
        /// 通过职位名返回职位对象
        /// </summary>
        /// <param name="strPostName">职位名</param>
        /// <returns></returns>
        public static Position GetPosition(string strPostName)
        {
            ViewPost vwPost = new ViewPost(true);

            vwPost.BaseCondition = "a.Name='" + strPostName + "'";
            return(vwPost.Count > 0 ? vwPost.GetItem(0) as Position : null);
        }
예제 #3
0
        /// <summary>
        /// 获取默认职位ID
        /// </summary>
        /// <returns></returns>
        public static int GetDefaultPost()
        {
            ViewPost vbPost = new ViewPost();

            vbPost.BaseCondition = "a.Name = '员工'";
            return(vbPost.Count > 0 ? vbPost.GetItem(0).ID : -1);
        }