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

            if (rowsCount > 0)
            {
                HM.Model.Eq.Tb_EQ_TaskEquipment model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model               = new HM.Model.Eq.Tb_EQ_TaskEquipment();
                    model.TaskEqId      = dt.Rows[n]["TaskEqId"].ToString();
                    model.TaskId        = dt.Rows[n]["TaskId"].ToString();
                    model.EquiId        = dt.Rows[n]["EquiId"].ToString();
                    model.PollingNote   = dt.Rows[n]["PollingNote"].ToString();
                    model.PollingResult = dt.Rows[n]["PollingResult"].ToString();
                    model.IsMend        = dt.Rows[n]["IsMend"].ToString();
                    model.BSBH          = dt.Rows[n]["BSBH"].ToString();
                    model.IsHandle      = dt.Rows[n]["IsHandle"].ToString();
                    model.HandlePId     = dt.Rows[n]["HandlePId"].ToString();
                    if (dt.Rows[n]["IsDelete"].ToString() != "")
                    {
                        model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString());
                    }
                    if (dt.Rows[n]["AddDate"].ToString() != "")
                    {
                        model.AddDate = DateTime.Parse(dt.Rows[n]["AddDate"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(HM.Model.Eq.Tb_EQ_TaskEquipment model)
 {
     dal.Update(model);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(HM.Model.Eq.Tb_EQ_TaskEquipment model)
 {
     dal.Add(model);
 }