示例#1
0
 private static EasyOne.Model.Collection.CollectionListRuleInfo CollectionListRuleInfo(NullableDataReader rdr)
 {
     EasyOne.Model.Collection.CollectionListRuleInfo info = new EasyOne.Model.Collection.CollectionListRuleInfo();
     info.ItemId                = rdr.GetInt32("ItemId");
     info.ListBeginCode         = rdr.GetString("ListBeginCode");
     info.ListEndCode           = rdr.GetString("ListEndCode");
     info.LinkBeginCode         = rdr.GetString("LinkBeginCode");
     info.LinkEndCode           = rdr.GetString("LinkEndCode");
     info.IsLinkSpecialSolution = rdr.GetBoolean("IsLinkSpecialSolution");
     info.RedirectUrl           = rdr.GetString("RedirectUrl");
     info.UsePaging             = rdr.GetBoolean("UsePaging");
     return(info);
 }
示例#2
0
        private static Parameters GetParameters(EasyOne.Model.Collection.CollectionListRuleInfo collectionListRuleInfo)
        {
            Parameters parameters = new Parameters();

            parameters.AddInParameter("@ItemId", DbType.Int32, collectionListRuleInfo.ItemId);
            parameters.AddInParameter("@ListBeginCode", DbType.String, collectionListRuleInfo.ListBeginCode);
            parameters.AddInParameter("@ListEndCode", DbType.String, collectionListRuleInfo.ListEndCode);
            parameters.AddInParameter("@LinkBeginCode", DbType.String, collectionListRuleInfo.LinkBeginCode);
            parameters.AddInParameter("@LinkEndCode", DbType.String, collectionListRuleInfo.LinkEndCode);
            parameters.AddInParameter("@IsLinkSpecialSolution", DbType.Boolean, collectionListRuleInfo.IsLinkSpecialSolution);
            parameters.AddInParameter("@RedirectUrl", DbType.String, collectionListRuleInfo.RedirectUrl);
            parameters.AddInParameter("@UsePaging", DbType.Boolean, collectionListRuleInfo.UsePaging);
            return(parameters);
        }
示例#3
0
        public bool Update(EasyOne.Model.Collection.CollectionListRuleInfo collectionListRuleInfo)
        {
            string strSql = "UPDATE PE_CollectionListRules SET ItemId = @ItemId, ListBeginCode = @ListBeginCode, ListEndCode = @ListEndCode, LinkBeginCode = @LinkBeginCode, LinkEndCode = @LinkEndCode, IsLinkSpecialSolution = @IsLinkSpecialSolution, RedirectUrl = @RedirectUrl, UsePaging = @UsePaging WHERE ItemId = @ItemId";

            return(DBHelper.ExecuteSql(strSql, GetParameters(collectionListRuleInfo)));
        }
示例#4
0
        public bool Add(EasyOne.Model.Collection.CollectionListRuleInfo collectionListRuleInfo)
        {
            string strSql = "INSERT INTO PE_CollectionListRules (ItemId, ListBeginCode, ListEndCode, LinkBeginCode, LinkEndCode, IsLinkSpecialSolution, RedirectUrl, UsePaging) VALUES (@ItemId, @ListBeginCode, @ListEndCode, @LinkBeginCode, @LinkEndCode, @IsLinkSpecialSolution, @RedirectUrl, @UsePaging)";

            return(DBHelper.ExecuteSql(strSql, GetParameters(collectionListRuleInfo)));
        }