Exemple #1
0
        /// <summary>
        /// 获得数据列表
        /// </summary>
        public List <lgk.Model.tb_InviteInfo> DataTableToList(DataTable dt)
        {
            List <lgk.Model.tb_InviteInfo> modelList = new List <lgk.Model.tb_InviteInfo>();
            int rowsCount = dt.Rows.Count;

            if (rowsCount > 0)
            {
                lgk.Model.tb_InviteInfo model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new lgk.Model.tb_InviteInfo();
                    if (dt.Rows[n]["Id"].ToString() != "")
                    {
                        model.Id = int.Parse(dt.Rows[n]["Id"].ToString());
                    }
                    model.InviteInfo = dt.Rows[n]["InviteInfo"].ToString();
                    model.InviteRule = dt.Rows[n]["InviteRule"].ToString();
                    model.AppDownUrl = dt.Rows[n]["AppDownUrl"].ToString();
                    if (dt.Rows[n]["ModifyTime"].ToString() != "")
                    {
                        model.ModifyTime = DateTime.Parse(dt.Rows[n]["ModifyTime"].ToString());
                    }


                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Exemple #2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(lgk.Model.tb_InviteInfo model)
 {
     return(dal.Update(model));
 }
Exemple #3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(lgk.Model.tb_InviteInfo model)
 {
     return(dal.Add(model));
 }