Exemplo n.º 1
0
 /// <summary>
 /// Metodo usado para carregar a pagina com estilo e preencher a treview
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 protected void Page_Load(object sender, EventArgs e) // load da pagina
 {
     if (!IsPostBack)                                 // testa c nao eh postback
     {
         FillTreeView(DBConfig);                      // chama a funçao para encher a treeview com o nome de xml q esta nas configs.
     }
     Utility.CheckAuthentication(this, true);
 }
Exemplo n.º 2
0
 protected override void OnInit(EventArgs e)
 {
     Utility.CheckAuthentication(this, true);
     if (!IsPostBack)
     {
     }
     base.OnInit(e);
 }
Exemplo n.º 3
0
 protected override void OnLoad(EventArgs e)
 {
     try
     {
         Utility.CheckAuthentication(this, true);
         InitializePageContent();
         Page.ClientScript.GetPostBackEventReference(new PostBackOptions(this));
     }
     catch (Exception ex)
     {
     }
 }
Exemplo n.º 4
0
        /// <summary>
        /// Declaraçao de variaveis e implementação de estilo na pagina
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            ErrorList = new Hashtable();
            ShowError();
            Utility.CheckAuthentication(this);
            if (!IsPostBack)
            {
                ClearGroupChecks();
                FillGroupsListBox();
                FillGridAccess();
                txtActualPassword.Focus();

                EnableGroupButtons(false, false, true, true);
                EnableUserButtons(false, false, true, true);
                EnablePasswordButtons(true, true);
            }
            vgGrupoLogado = HttpContext.Current.Session["vgGroupID"].ToString();
            CurrentGroup  = vgMembership.GetGroupByID(vgGrupoLogado);
            if (CurrentGroup != null)
            {
                if (!(bool)CurrentGroup.Fields["IsAdmin"].Value)
                {
                    ListBox5.Enabled  = false;
                    ListBox6.Enabled  = false;
                    TextBox7.Enabled  = false;
                    TextBox11.Enabled = false;
                    TextBox8.Enabled  = false;
                    TextBox9.Enabled  = false;
                    TextBox10.Enabled = false;
                    EnableUserButtons(false, false, false, false);

                    ListBox3.Enabled  = false;
                    TextBox6.Enabled  = false;
                    CheckBox1.Enabled = false;
                    ListBox4.Enabled  = false;
                    CheckBox5.Enabled = false;
                    CheckBox3.Enabled = false;
                    CheckBox2.Enabled = false;
                    CheckBox4.Enabled = false;

                    EnableGroupButtons(false, false, false, false);
                }
            }
            AjaxPanel1.AjaxRequest += new Telerik.Web.UI.RadAjaxControl.AjaxRequestDelegate(AjaxPanel1_AjaxRequest);
        }
Exemplo n.º 5
0
        protected override void OnLoad(EventArgs e)
        {
            try
            {
                ajxMainAjaxPanel.ResponseScripts.Add("setTimeout(\"resizeIframe();\",100);");

                string argument = Page.Request["__EVENTTARGET"];
                if (argument == "LOGOFF")
                {
                    SessionClose();
                }
                Utility.CheckAuthentication(this, true);
                InitializePageContent();
                Page.ClientScript.GetPostBackEventReference(new PostBackOptions(this));
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 6
0
        protected override void OnLoad(EventArgs e)
        {
            try
            {
                if (Session["ErrorCode"] != null)
                {
                    ErrorCode = Session["errorCode"].ToString();
                }
                if (Session["errorMessage"] != null)
                {
                    ErrorMessage = Session["errorMessage"].ToString();
                }

                AjaxPanel1.ResponseScripts.Add("setTimeout(\"resizeIframe();\",100);");

                Utility.CheckAuthentication(this, true);
                InitializePageContent();
                Page.ClientScript.GetPostBackEventReference(new PostBackOptions(this));
            }
            catch (Exception ex)
            {
            }
        }
Exemplo n.º 7
0
        protected void Page_Load(object sender, EventArgs e)
        {
            TableName    = HttpContext.Current.Request["TableName"];
            DatabaseName = HttpContext.Current.Request["DatabaseName"];
            PageName     = HttpContext.Current.Request["PageName"];
            ClientScript.RegisterHiddenField("__PAGENAME", PageName);
            Utility.CheckAuthentication(this, true);

            if (!IsPostBack)
            {
                rdAnd.Checked = true;
                FillOperatorsCombo();             //Preenchemos o combo com os devidos operadores
                FillFieldsCombo();                //Preenchemos a combo com os campos
                if (string.IsNullOrEmpty(PageName))
                {
                    ClientScript.RegisterStartupScript(this.GetType(), "SetExpressionField", "<script>Load();</script>");
                }
            }
            cboField.AutoPostBack          = true;
            cboField.SelectedIndexChanged += new RadComboBoxSelectedIndexChangedEventHandler(cboField_SelectedIndexChanged);
            FilterFieldsOperators(cboField.SelectedValue);
            ClientScript.RegisterClientScriptBlock(this.GetType(), "SetExpressionField", "<script>var ExpressionFieldName = \"" + txtExpression.ClientID + "\";</script>");
        }
Exemplo n.º 8
0
        /// <summary>
        /// Page load, apenas faz a autenticaçao para saber se esta logado
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        protected void Page_Load(object sender, EventArgs e)
        {
            Utility.CheckAuthentication(this, true);

            if (!Page.IsPostBack)
            {
                XmlDocument doc = new XmlDocument();
                if (!File.Exists(Server.MapPath("../Xmls/ViewsList.xml")))
                {
                    XmlDeclaration xmlDeclaration = doc.CreateXmlDeclaration("1.0", "UTF-8", null);
                    doc.InsertBefore(xmlDeclaration, doc.DocumentElement);
                    XmlNode ViewsNode = doc.CreateNode(XmlNodeType.Element, "Views", "");
                    doc.AppendChild(ViewsNode);
                }
                else
                {
                    doc.Load(Server.MapPath("../Xmls/ViewsList.xml"));
                }
                foreach (XmlNode Node in doc.FirstChild.NextSibling.ChildNodes)
                {
                    lstConsults.Items.Add(Node.Attributes["Name"].Value);
                }
            }
        }