Exemple #1
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(HM.Model.Qm.Tb_Qm_TaskAbarbeitung model)
 {
     dal.Add(model);
 }
Exemple #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(HM.Model.Qm.Tb_Qm_TaskAbarbeitung model)
 {
     dal.Update(model);
 }
Exemple #3
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <HM.Model.Qm.Tb_Qm_TaskAbarbeitung> DataTableToList(DataTable dt)
        {
            List <HM.Model.Qm.Tb_Qm_TaskAbarbeitung> modelList = new List <HM.Model.Qm.Tb_Qm_TaskAbarbeitung>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                HM.Model.Qm.Tb_Qm_TaskAbarbeitung model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model          = new HM.Model.Qm.Tb_Qm_TaskAbarbeitung();
                    model.Id       = dt.Rows[n]["Id"].ToString();
                    model.TaskId   = dt.Rows[n]["TaskId"].ToString();
                    model.PointIds = dt.Rows[n]["PointIds"].ToString();
                    model.AddPId   = dt.Rows[n]["AddPId"].ToString();
                    model.Pictures = dt.Rows[n]["Pictures"].ToString();
                    if (dt.Rows[n]["AddTime"].ToString() != "")
                    {
                        model.AddTime = DateTime.Parse(dt.Rows[n]["AddTime"].ToString());
                    }
                    if (dt.Rows[n]["CheckTime"].ToString() != "")
                    {
                        model.CheckTime = DateTime.Parse(dt.Rows[n]["CheckTime"].ToString());
                    }
                    model.CheckNote           = dt.Rows[n]["CheckNote"].ToString();
                    model.CheckRemark         = dt.Rows[n]["CheckRemark"].ToString();
                    model.CheckResult         = dt.Rows[n]["CheckResult"].ToString();
                    model.CheckResult1        = dt.Rows[n]["CheckResult1"].ToString();
                    model.ProblemType         = dt.Rows[n]["ProblemType"].ToString();
                    model.RectificationPeriod = dt.Rows[n]["RectificationPeriod"].ToString();
                    model.RectificationNote   = dt.Rows[n]["RectificationNote"].ToString();
                    model.AbarPId             = dt.Rows[n]["AbarPId"].ToString();
                    if (dt.Rows[n]["ReducePoint"].ToString() != "")
                    {
                        model.ReducePoint = decimal.Parse(dt.Rows[n]["ReducePoint"].ToString());
                    }
                    model.ReducePId    = dt.Rows[n]["ReducePId"].ToString();
                    model.AbarCheck    = dt.Rows[n]["AbarCheck"].ToString();
                    model.AbarCheckPId = dt.Rows[n]["AbarCheckPId"].ToString();
                    if (dt.Rows[n]["AbarCheckTime"].ToString() != "")
                    {
                        model.AbarCheckTime = DateTime.Parse(dt.Rows[n]["AbarCheckTime"].ToString());
                    }
                    model.Major        = dt.Rows[n]["Major"].ToString();
                    model.ReduceResult = dt.Rows[n]["ReduceResult"].ToString();
                    if (dt.Rows[n]["ReduceTime"].ToString() != "")
                    {
                        model.ReduceTime = DateTime.Parse(dt.Rows[n]["ReduceTime"].ToString());
                    }
                    model.ReduceCheckResult = dt.Rows[n]["ReduceCheckResult"].ToString();
                    if (dt.Rows[n]["ReduceCheckTime"].ToString() != "")
                    {
                        model.ReduceCheckTime = DateTime.Parse(dt.Rows[n]["ReduceCheckTime"].ToString());
                    }
                    if (dt.Rows[n]["IsInTime"].ToString() != "")
                    {
                        model.IsInTime = int.Parse(dt.Rows[n]["IsInTime"].ToString());
                    }
                    if (dt.Rows[n]["IsOk"].ToString() != "")
                    {
                        model.IsOk = int.Parse(dt.Rows[n]["IsOk"].ToString());
                    }
                    model.CheckStatus = dt.Rows[n]["CheckStatus"].ToString();
                    model.Files       = dt.Rows[n]["Files"].ToString();
                    model.Coordinate  = dt.Rows[n]["Coordinate"].ToString();
                    if (dt.Rows[n]["IsDelete"].ToString() != "")
                    {
                        model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }