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

            if (rowsCount > 0)
            {
                LPWeb.Model.MarketingSettings model;
                for (int n = 0; n < rowsCount; n++)
                {
                    model = new LPWeb.Model.MarketingSettings();
                    model.WebServiceURL     = dt.Rows[n]["WebServiceURL"].ToString();
                    model.CampaignDetailURL = dt.Rows[n]["CampaignDetailURL"].ToString();
                    if (dt.Rows[n]["ReconcileInterval"].ToString() != "")
                    {
                        model.ReconcileInterval = int.Parse(dt.Rows[n]["ReconcileInterval"].ToString());
                    }
                    modelList.Add(model);
                }
            }
            return(modelList);
        }
Ejemplo n.º 2
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(LPWeb.Model.MarketingSettings model)
 {
     return(dal.Update(model));
 }
Ejemplo n.º 3
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public void Add(LPWeb.Model.MarketingSettings model)
 {
     dal.Add(model);
 }