Esempio n. 1
0
        public void Remove(Models.UrlPageInfo item)
        {
            DbCommand comm = this.GetCommand("UrlPageInfo_Delete");



            comm.AddParameter <string>(this.Factory, "Url", item.Url);


            this.SafeExecuteNonQuery(comm);
        }
Esempio n. 2
0
        public void Add(Models.UrlPageInfo item)
        {
            DbCommand comm = this.GetCommand("UrlPageInfo_Insert");

            comm.AddParameter <string>(this.Factory, "Url", item.Url);
            comm.AddParameter <string>(this.Factory, "PageTitle", item.PageTitle);
            comm.AddParameter <string>(this.Factory, "MetaKeyword", item.MetaKeyword);
            comm.AddParameter <string>(this.Factory, "MetaDescription", item.MetaDescription);
            comm.AddParameter <string>(this.Factory, "MetaRobots", item.MetaRobots);

            this.SafeExecuteNonQuery(comm);
        }
Esempio n. 3
0
        public Models.UrlPageInfo Get(Models.UrlPageInfo dummy)
        {
            DbCommand comm = this.GetCommand("UrlPageInfo_Get");



            comm.AddParameter <string>(this.Factory, "Url", dummy.Url);


            DataTable dt = this.GetTable(comm);

            return(EntityBase.ParseListFromTable <UrlPageInfo>(dt).FirstOrDefault());
        }
Esempio n. 4
0
        public void Update(Models.UrlPageInfo @new, Models.UrlPageInfo old)
        {
            var item = @new;

            item.Url = old.Url;



            DbCommand comm = this.GetCommand("UrlPageInfo_Update");

            comm.AddParameter <string>(this.Factory, "Url", item.Url);
            comm.AddParameter <string>(this.Factory, "PageTitle", item.PageTitle);
            comm.AddParameter <string>(this.Factory, "MetaKeyword", item.MetaKeyword);
            comm.AddParameter <string>(this.Factory, "MetaDescription", item.MetaDescription);
            comm.AddParameter <string>(this.Factory, "MetaRobots", item.MetaRobots);



            this.SafeExecuteNonQuery(comm);
        }