示例#1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //cmbThemes.DataSource = DevExpress.Web.ASPxThemes.ThemesProviderEx.GetThemes();
            //cmbThemes.DataBind();

            //HttpCookie cTheme = Request.Cookies["theme"];
            //if (cTheme != null)
            //{
            //    cmbThemes.Text = cTheme.Value.ToString();
            //}
            //else
            //{
            //    cmbThemes.Text = "Default";
            //}

            ASPxSplitter1.GetPaneByName("Header").Size    = ASPxWebControl.GlobalTheme == "Moderno" ? 95 : 83;
            ASPxSplitter1.GetPaneByName("Header").MinSize = ASPxWebControl.GlobalTheme == "Moderno" ? 95 : 83;
            ASPxLabel2.Text = DateTime.Now.Year + Server.HtmlDecode(" © ");

            //string uid = "";
            //if (this.Session["UserID"] == null)
            //{
            //    MenuTop.Visible = false;
            //    btnLogOff.Visible = false;
            //    btnLogin.Visible = true;

            //}
            //else
            //{
            //    MenuTop.Visible = true;
            //    btnLogOff.Visible = false;
            //    btnLogin.Visible = false;
            //    btnLogOff.Text = "Log Off " + this.Session["UserName"].ToString();
            //}
        }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ASPxSplitter1.GetPaneByName("ContentUrlPane").ContentUrl = ASPxNavBar1.SelectedItem.NavigateUrl;
 }
示例#3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ASPxSplitter1.GetPaneByName("Header").Size    = ASPxWebControl.GlobalTheme == "Moderno" ? 95 : 83;
     ASPxSplitter1.GetPaneByName("Header").MinSize = ASPxWebControl.GlobalTheme == "Moderno" ? 95 : 83;
     //ASPxLabel2.Text = DateTime.Now.Year + Server.HtmlDecode(" © Copyright by MariaC");
 }
示例#4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     ASPxSplitter1.GetPaneByName("Header").Size    = ASPxWebControl.GlobalTheme == "Moderno" ? 95 : 83;
     ASPxSplitter1.GetPaneByName("Header").MinSize = ASPxWebControl.GlobalTheme == "Moderno" ? 95 : 83;
     ASPxLabel2.Text = "Empresa : " + Session["NOMBRE_USUARIO"] + "\nCuenta con : " + Session["HORAS_SOPORTE_USUARIO"] + " horas de soporte. \n" + DateTime.Now.Year + Server.HtmlDecode(" © Copyright Alfredo Paredes & Asociados Cia. Ltda.");
 }
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!((Page.User.IsInRole("Region_Managers")) || (Page.User.IsInRole("Administrators")) || (Page.User.IsInRole("Members")) || (Page.User.IsInRole("Area_Managers"))))
        {
            Response.Redirect("~/Default.aspx");
        }

        if (Page.User.IsInRole("Area_Managers"))
        {
            ASPxSplitter1.GetPaneByName("RightBox").Collapsed = true;
            if (NavigationMenu.Items.Count > 0)
            {
                NavigationMenu.Items.Clear();
            }
        }
        if (Page.User.IsInRole("Region_Managers"))
        {
            ASPxSplitter1.GetPaneByName("RightBox").Collapsed = false;
            if (NavigationMenu.Items.Count > 4)
            {
                NavigationMenu.Items.RemoveAt(5);
                NavigationMenu.Items.RemoveAt(4);
            }
        }

        if (Page.User.IsInRole("Members"))
        {
            ASPxSplitter1.GetPaneByName("RightBox").Collapsed = true;
            FilterLabel.Text          = "";
            FiltersTabControl.Visible = false;
            MembersInfo.Visible       = true;
            MembersInfo.Text          = "Для редактирования и просмотра информации по предприятию нажмите <Субъекты> в верхнем меню";
            if (NavigationMenu.Items.Count > 3)
            {
                NavigationMenu.Items.RemoveAt(5);
                NavigationMenu.Items.RemoveAt(4);
                NavigationMenu.Items.RemoveAt(3);
                NavigationMenu.Items.RemoveAt(2);
                ASPxHyperLink1.Visible = false;
            }
        }

        if (!IsPostBack)
        {
        }
        else
        {
            if (Page.User.IsInRole("Members"))
            {
                ASPxHyperLink1.Visible = false;
            }
            else
            {
                // с учетом фильтров
                if ((TreeCommand != "") && (TreeCommand != null))
                {
                    SqlDataSource22.SelectCommand = TreeCommand;
                }
                else
                {
                    SqlDataSource22.SelectCommand = String.Format("SELECT subject_id, subject_name, subject_type, subject_code, object_name, add_info, latitude, longitude FROM \"Subject\" order by subject_name");
                }
            }
        }
    }
示例#6
0
 protected void ASPxMenu1_ItemClick(object source, DevExpress.Web.ASPxMenu.MenuItemEventArgs e)
 {
     ASPxSplitter1.GetPaneByName("MainFrame").ContentUrl = ASPxMenu1.SelectedItem.NavigateUrl;
 }