Exemplo n.º 1
0
        public ActionResult AddNewChartPage(string text_AddNewChart_ChartName, string text_AddNewChart_chartGuid)
        {
            if (Session["Roles"] != null && Session["Roles"].Equals("Admin"))
            {
                hypster_tv_DAL.Hypster_Entities hyDB    = new hypster_tv_DAL.Hypster_Entities();
                hypster_tv_DAL.DynamicContent   dynCont = new hypster_tv_DAL.DynamicContent();

                dynCont.DynCont_Name          = text_AddNewChart_ChartName;
                dynCont.DynCont_isNameVisible = false;

                dynCont.DynCont_BoxCont     = generate_Chart(text_AddNewChart_chartGuid);
                dynCont.DynCont_ButtonText  = "Listen Now";
                dynCont.DynCont_Href        = "";
                dynCont.DynCont_isNewWindow = false;
                dynCont.DynCont_PageType    = 1;

                hyDB.DynamicContents.AddObject(dynCont);
                hyDB.SaveChanges();

                return(RedirectPermanent("/WebsiteManagement/hypDynamicContent"));
            }
            else
            {
                return(RedirectPermanent("/home/"));
            }
        }
Exemplo n.º 2
0
        public ActionResult AddNewDynPage(int dr_dynPageType, string text_BoxName, string text_BoxCont)
        {
            if (Session["Roles"] != null && Session["Roles"].Equals("Admin"))
            {
                hypster_tv_DAL.Hypster_Entities hyDB    = new hypster_tv_DAL.Hypster_Entities();
                hypster_tv_DAL.DynamicContent   dynCont = new hypster_tv_DAL.DynamicContent();
                dynCont.DynCont_Name          = text_BoxName;
                dynCont.DynCont_isNameVisible = false;

                dynCont.DynCont_BoxCont     = text_BoxCont;
                dynCont.DynCont_ButtonText  = "Listen Now";
                dynCont.DynCont_Href        = "http://hypster.com";
                dynCont.DynCont_isNewWindow = false;
                dynCont.DynCont_PageType    = dr_dynPageType;

                hyDB.DynamicContents.AddObject(dynCont);
                hyDB.SaveChanges();

                return(RedirectPermanent("/WebsiteManagement/hypDynamicContent"));
            }
            else
            {
                return(RedirectPermanent("/home/"));
            }
        }