예제 #1
0
        /// <summary>
        /// PostInfo职务的查询
        /// </summary>
        /// <returns></returns>
        public List <PostInfo> QueryPostInfo()
        {
            string    sql = "select * from PostInfo where State=1";
            DataTable dt  = SqlHelper.ExecuteDataTable(sql);

            List <PostInfo> piList = new List <PostInfo>();

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                PostInfo pi = new PostInfo();
                pi.Post_Id   = int.Parse(dt.Rows[i]["Post_Id"].ToString());
                pi.Post_name = dt.Rows[i]["Post_name"] as string;
                pi.Work_type = dt.Rows[i]["Work_type"] as string;
                piList.Add(pi);
            }

            return(piList);
        }
예제 #2
0
 /// <summary>
 /// 根据职务PostInfo的Id对职务的其他信息的修改
 /// </summary>
 /// <param name="pi">PostInfo对象</param>
 /// <returns></returns>
 public bool UpdatePostInfo(PostInfo pi)
 {
     return(piDal.UpdatePostInfo(pi) > 0);
 }
예제 #3
0
 /// <summary>
 /// PostInfo职务的添加
 /// </summary>
 /// <param name="pi">PostInfo对象</param>
 /// <returns></returns>
 public bool InsertPostInfo(PostInfo pi)
 {
     return(piDal.InsertPostInfo(pi) > 0);
 }