Exemple #1
0
        /// <summary>
        /// 得到一个对象实体
        /// </summary>
        public JobModel DataRowToModel(DataRow row)
        {
            JobModel model = new JobModel();

            if (row != null)
            {
                if (row["job_id"] != null)
                {
                    model.job_id = row["job_id"].ToString();
                }
                if (row["job_name"] != null)
                {
                    model.job_name = row["job_name"].ToString();
                }
                if (row["if_leader"] != null && row["if_leader"].ToString() != "")
                {
                    model.if_leader = int.Parse(row["if_leader"].ToString());
                }
            }
            return(model);
        }
Exemple #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(JobModel model)
 {
     return(dal.Update(model));
 }
Exemple #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public bool Add(JobModel model)
 {
     return(dal.Add(model));
 }