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

            if (rowsCount > 0)
            {
                HM.Model.Qm.Tb_Qm_TaskLevel model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model               = new HM.Model.Qm.Tb_Qm_TaskLevel();
                    model.Id            = dt.Rows[n]["Id"].ToString();
                    model.TaskLevelName = dt.Rows[n]["TaskLevelName"].ToString();
                    model.TaskRoleId    = dt.Rows[n]["TaskRoleId"].ToString();
                    model.CheckRoleId   = dt.Rows[n]["CheckRoleId"].ToString();
                    if (dt.Rows[n]["IsDelete"].ToString() != "")
                    {
                        model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString());
                    }
                    model.Remark = dt.Rows[n]["Remark"].ToString();
                    if (dt.Rows[n]["Sort"].ToString() != "")
                    {
                        model.Sort = int.Parse(dt.Rows[n]["Sort"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Beispiel #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(HM.Model.Qm.Tb_Qm_TaskLevel model)
 {
     dal.Update(model);
 }
Beispiel #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(HM.Model.Qm.Tb_Qm_TaskLevel model)
 {
     dal.Add(model);
 }