Example #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <Maticsoft.Model.JobZiJianInfo> DataTableToList(DataTable dt)
        {
            List <Maticsoft.Model.JobZiJianInfo> modelList = new List <Maticsoft.Model.JobZiJianInfo>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                Maticsoft.Model.JobZiJianInfo model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Maticsoft.Model.JobZiJianInfo();
                    if (dt.Rows[n]["JobInfoID"].ToString() != "")
                    {
                        model.JobInfoID = int.Parse(dt.Rows[n]["JobInfoID"].ToString());
                    }
                    model.Usersname = dt.Rows[n]["Usersname"].ToString();
                    if (dt.Rows[n]["Sex"].ToString() != "")
                    {
                        model.Sex = int.Parse(dt.Rows[n]["Sex"].ToString());
                    }
                    model.Xueli = dt.Rows[n]["Xueli"].ToString();
                    if (dt.Rows[n]["datatime"].ToString() != "")
                    {
                        model.datatime = DateTime.Parse(dt.Rows[n]["datatime"].ToString());
                    }
                    model.Monery = dt.Rows[n]["Monery"].ToString();
                    model.Jiguan = dt.Rows[n]["Jiguan"].ToString();
                    if (dt.Rows[n]["Britday"].ToString() != "")
                    {
                        model.Britday = DateTime.Parse(dt.Rows[n]["Britday"].ToString());
                    }
                    model.Zhuanye  = dt.Rows[n]["Zhuanye"].ToString();
                    model.Jiaoyu   = dt.Rows[n]["Jiaoyu"].ToString();
                    model.Jingyan  = dt.Rows[n]["Jingyan"].ToString();
                    model.Pingjia  = dt.Rows[n]["Pingjia"].ToString();
                    model.Jobtitle = dt.Rows[n]["Jobtitle"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Example #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.JobZiJianInfo model)
 {
     return(dal.Update(model));
 }
Example #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Maticsoft.Model.JobZiJianInfo model)
 {
     return(dal.Add(model));
 }