Ejemplo n.º 1
0
        private common.clsPage SetWebPage(common.clsPage Page, common.clsUser User)
        {
            string strPageRoles = this.GetSqlSplitString(Page.Roles);

            // Try to insert/update WEB_PAGE
            common.clsPage clsPage = new common.clsPage();

            spParams = new object[13];
            spParams.SetValue(Page.PageID, 0);
            spParams.SetValue(Page.PageIDParent, 1);
            spParams.SetValue(Page.WebID, 2);
            spParams.SetValue(Page.SortOrder, 3);
            spParams.SetValue(Page.ShowOnMenu, 4);
            spParams.SetValue(Page.IsNewsPage, 5);
            spParams.SetValue(Page.IsNewsArchive, 6);
            spParams.SetValue(Page.Title, 7);
            spParams.SetValue(Page.Image, 8);
            spParams.SetValue(Page.ControlID, 9);
            spParams.SetValue(Page.Body, 10);
            spParams.SetValue(strPageRoles, 11);
            spParams.SetValue(User.UserID, 12);

            // Read data out to populate the return Page object
            dr = data.SqlHelper.ExecuteReader(this.strConn, "prc_WEB_PAGE_ins_upd", spParams);
            dr.Read();

            boolResult  = bool.Parse(dr["Result"].ToString());
            strMessage  = "\r\t\t" + dr["MessageOut"].ToString() + "<br>";
            Page.PageID = int.Parse(dr["page_id"].ToString());

            dr.Close();

            clsPage.PageID        = Page.PageID;
            clsPage.PageIDParent  = Page.PageIDParent;
            clsPage.WebID         = Page.WebID;
            clsPage.SortOrder     = Page.SortOrder;
            clsPage.ShowOnMenu    = Page.ShowOnMenu;
            clsPage.IsNewsPage    = Page.IsNewsPage;
            clsPage.IsNewsArchive = Page.IsNewsArchive;
            clsPage.Title         = Page.Title;
            clsPage.Image         = Page.Image;
            clsPage.ControlID     = Page.ControlID;
            clsPage.Body          = Page.Body;

            return(clsPage);
        }
Ejemplo n.º 2
0
 public common.clsPage WebPage_Update(common.clsPage Page, common.clsUser User)
 {
     return(this.SetWebPage(Page, User));
 }