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

            if (rowsCount > 0)
            {
                HM.Model.Qm.Tb_Qm_StandardDetail model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model                = new HM.Model.Qm.Tb_Qm_StandardDetail();
                    model.Id             = dt.Rows[n]["Id"].ToString();
                    model.StanId         = dt.Rows[n]["StanId"].ToString();
                    model.TaskLevelId    = dt.Rows[n]["TaskLevelId"].ToString();
                    model.TaskRoleId     = dt.Rows[n]["TaskRoleId"].ToString();
                    model.CheckFrequency = dt.Rows[n]["CheckFrequency"].ToString();
                    model.IsControlDate  = dt.Rows[n]["IsControlDate"].ToString();
                    if (dt.Rows[n]["PointCoverage"].ToString() != "")
                    {
                        model.PointCoverage = decimal.Parse(dt.Rows[n]["PointCoverage"].ToString());
                    }
                    if (dt.Rows[n]["IsDelete"].ToString() != "")
                    {
                        model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString());
                    }
                    if (dt.Rows[n]["Sort"].ToString() != "")
                    {
                        model.Sort = int.Parse(dt.Rows[n]["Sort"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Esempio n. 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(HM.Model.Qm.Tb_Qm_StandardDetail model)
 {
     dal.Update(model);
 }
Esempio n. 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(HM.Model.Qm.Tb_Qm_StandardDetail model)
 {
     dal.Add(model);
 }