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

            if (rowsCount > 0)
            {
                LPWeb.Model.MailChimpLists model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new LPWeb.Model.MailChimpLists();
                    if (dt.Rows[n]["LID"] != null && dt.Rows[n]["LID"].ToString() != "")
                    {
                        model.LID = dt.Rows[n]["LID"].ToString();
                    }
                    if (dt.Rows[n]["Name"] != null && dt.Rows[n]["Name"].ToString() != "")
                    {
                        model.Name = dt.Rows[n]["Name"].ToString();
                    }
                    if (dt.Rows[n]["BranchId"] != null && dt.Rows[n]["BranchId"].ToString() != "")
                    {
                        model.BranchId = dt.Rows[n]["BranchId"].ToString();
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
示例#2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(LPWeb.Model.MailChimpLists model)
 {
     return(dal.Update(model));
 }
示例#3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(LPWeb.Model.MailChimpLists model)
 {
     dal.Add(model);
 }