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

            if (rowsCount > 0)
            {
                MobileSoft.Model.HSPR.Tb_HSPR_CommActivitiesPerson model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.HSPR.Tb_HSPR_CommActivitiesPerson();
                    model.ActivitiesPersonID = dt.Rows[n]["ActivitiesPersonID"].ToString();
                    model.ActivitiesID       = dt.Rows[n]["ActivitiesID"].ToString();
                    model.CustName           = dt.Rows[n]["CustName"].ToString();
                    //model.CustID=dt.Rows[n]["CustID"].ToString();
                    model.RoomName = dt.Rows[n]["RoomName"].ToString();
                    //model.RoomID=dt.Rows[n]["RoomID"].ToString();
                    model.LinkPhone = dt.Rows[n]["LinkPhone"].ToString();
                    if (dt.Rows[n]["PersonCount"].ToString() != "")
                    {
                        model.PersonCount = int.Parse(dt.Rows[n]["PersonCount"].ToString());
                    }
                    //model.CommID=dt.Rows[n]["CommID"].ToString();
                    if (dt.Rows[n]["IsDelete"].ToString() != "")
                    {
                        model.IsDelete = int.Parse(dt.Rows[n]["IsDelete"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.HSPR.Tb_HSPR_CommActivitiesPerson model)
 {
     dal.Update(model);
 }
Exemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(MobileSoft.Model.HSPR.Tb_HSPR_CommActivitiesPerson model)
 {
     dal.Add(model);
 }