Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            this.TreeView1.Load += TreeView1_Load;
            dbAccess             = new blAccess();

            String strUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.PathAndQuery, "/");

            DAL_Library.User connectedUser = Session["ConnectedUser"] as DAL_Library.User;


            if (Session["ConnectedUser"] == null)
            {
                MenuLoader.loadMenu(Menu1, strUrl, UserType.NONE);
            }
            else if (connectedUser.Right == dbAccess.getRight("Admin").Id)
            {
                MenuLoader.loadMenu(Menu1, strUrl, UserType.ADMIN);
            }
            else if (connectedUser.Status == dbAccess.getStatus("Active").Id)
            {
                MenuLoader.loadMenu(Menu1, strUrl, UserType.READER);
            }
            else
            {
                MenuLoader.loadMenu(Menu1, strUrl, UserType.NONE);
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String strUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.PathAndQuery, "/");

            MenuLoader.loadMenu(Menu1, strUrl, UserType.NONE);

            TextBoxPassword.TextMode = TextBoxMode.Password;
            dbAccess = new blAccess();
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String strUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.PathAndQuery, "/");

            MenuLoader.loadMenu(Menu1, strUrl, UserType.ADMIN);
            dbAccess = new BLL_Library.blAccess();

            LinqDataSource1.EnableUpdate = true;

            GridView1.RowCommand += GridView1_RowCommand;
        }
Example #4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            dbAccess = new BLL_Library.blAccess();

            MenuLoader.loadMenu(Menu1, strUrl, UserType.NONE);

            Wizard1.FinishButtonClick  += Wizard1_NextStep;
            Wizard1.NextButtonClick    += Wizard1_NextStep;
            Wizard1.SideBarButtonClick += Wizard1_NextStep;

            if (!IsPostBack)
            {
                RadioButtonList1.Items[0].Selected = true;
            }
        }
Example #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String strUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.PathAndQuery, "/");

            MenuLoader.loadMenu(Menu1, strUrl, UserType.ADMIN);
            dbAccess = new BLL_Library.blAccess();
            if (!IsPostBack)
            {
                MultiView1.SetActiveView(JournalistView);

                Session["fromDate"] = DateTime.MinValue;
                Session["toDate"]   = DateTime.MaxValue;
            }
            DropDownList1.SelectedIndexChanged += DropDownList1_SelectedIndexChanged;
            Calendar1.SelectionChanged         += fromCalendarChanged;
            Calendar2.SelectionChanged         += toCalendarChanged;
        }
Example #6
0
        protected void Page_Load(object sender, EventArgs e)
        {
            String strUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.PathAndQuery, "/");

            MenuLoader.loadMenu(Menu1, strUrl, UserType.ADMIN);

            dbAccess = new BLL_Library.blAccess();
            if (!IsPostBack)
            {
                MultiView1.SetActiveView(NewsView);
            }

            DropDownList1.SelectedIndexChanged += DropDownList1_SelectedIndexChanged;

            GridView1.RowCommand += GridView1_RowCommand;
            GridView2.RowCommand += GridView2_RowCommand;
            GridView3.RowCommand += GridView3_RowCommand;
        }
Example #7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            dbAccess = new blAccess();

            //ListBox1.SelectedIndexChanged += ListBox1_SelectedIndexChanged;
            ListBox1.AutoPostBack = true;


            //Create Menu
            String strUrl = HttpContext.Current.Request.Url.AbsoluteUri.Replace(HttpContext.Current.Request.Url.PathAndQuery, "/");

            MenuLoader.loadMenu(Menu1, strUrl, UserType.THEME);

            //Menu1.MenuItemClick += Menu1_MenuItemClick;


            if (Session["Theme"] == null)
            {
                Session["Theme"] = dbAccess.getThemes().First().Type1;
            }
            if (Session["ChangedTheme"] == null)
            {
                Session["ChangedTheme"] = true;
            }

            List <Article> articles = dbAccess.getArticles((string)Session["Theme"]);

            if ((Boolean)Session["ChangedTheme"] == true)
            {
                ListBox1.Items.Clear();
                foreach (Article item in articles)
                {
                    if (item.Status == dbAccess.getStatus("Active").Id)
                    {
                        ListBox1.Items.Add(new ListItem(item.Title, item.Id.ToString()));
                    }
                }
            }
            Session["ChangedTheme"] = false;
            Theme.Text           = (string)Session["Theme"];
            ArticleImage.Visible = false;
        }