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

            if (rowsCount > 0)
            {
                Maticsoft.Model.JobZijianType model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new Maticsoft.Model.JobZijianType();
                    if (dt.Rows[n]["JobTitleID"].ToString() != "")
                    {
                        model.JobTitleID = int.Parse(dt.Rows[n]["JobTitleID"].ToString());
                    }
                    model.JobTitleName = dt.Rows[n]["JobTitleName"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(Maticsoft.Model.JobZijianType model)
 {
     return(dal.Update(model));
 }
Exemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int  Add(Maticsoft.Model.JobZijianType model)
 {
     return(dal.Add(model));
 }