Пример #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <MobileSoft.Model.HSPR.Tb_HSPR_ParkingOpt> DataTableToList(DataTable dt)
        {
            List <MobileSoft.Model.HSPR.Tb_HSPR_ParkingOpt> modelList = new List <MobileSoft.Model.HSPR.Tb_HSPR_ParkingOpt>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                MobileSoft.Model.HSPR.Tb_HSPR_ParkingOpt model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.HSPR.Tb_HSPR_ParkingOpt();
                    if (dt.Rows[n]["SCode"].ToString() != "")
                    {
                        model.SCode = new Guid(dt.Rows[n]["SCode"].ToString());
                    }
                    //model.ParkID=dt.Rows[n]["ParkID"].ToString();
                    model.OptUserCode = dt.Rows[n]["OptUserCode"].ToString();
                    if (dt.Rows[n]["OptCode"].ToString() != "")
                    {
                        model.OptCode = new Guid(dt.Rows[n]["OptCode"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Пример #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.HSPR.Tb_HSPR_ParkingOpt model)
 {
     dal.Update(model);
 }
Пример #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.HSPR.Tb_HSPR_ParkingOpt model)
 {
     dal.Add(model);
 }