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

            if (rowsCount > 0)
            {
                MobileSoft.Model.HSPR.Tb_HSPR_CommunityActivities model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new MobileSoft.Model.HSPR.Tb_HSPR_CommunityActivities();
                    //model.InfoID=dt.Rows[n]["InfoID"].ToString();
                    if (dt.Rows[n]["CommID"].ToString() != "")
                    {
                        model.CommID = int.Parse(dt.Rows[n]["CommID"].ToString());
                    }
                    model.ActHeading = dt.Rows[n]["ActHeading"].ToString();
                    model.ActPlace   = dt.Rows[n]["ActPlace"].ToString();
                    model.Moderator  = dt.Rows[n]["Moderator"].ToString();
                    model.ActDate    = dt.Rows[n]["ActDate"].ToString();
                    model.ActPeople  = dt.Rows[n]["ActPeople"].ToString();
                    if (dt.Rows[n]["IsAudit"].ToString() != "")
                    {
                        model.IsAudit = int.Parse(dt.Rows[n]["IsAudit"].ToString());
                    }
                    model.ActContent = dt.Rows[n]["ActContent"].ToString();
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Esempio n. 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public void Update(MobileSoft.Model.HSPR.Tb_HSPR_CommunityActivities model)
 {
     dal.Update(model);
 }
Esempio n. 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public long Add(MobileSoft.Model.HSPR.Tb_HSPR_CommunityActivities model)
 {
     return(dal.Add(model));
 }