Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            updateEntity = new Person();
            updateUser   = new UserAccount();
            proxyAuth    = new AuthenticationServiceClient("WSHttpBinding_IAuthenticationService");
            proxyPolicy  = new PolicyPasswordAdminServiceClient("WSHttpBinding_IPolicyPasswordAdminService");

            string cuenta = Request.Params["Account"].ToString();
            string pass   = Request.Params["Password"].ToString();

            long userID = proxyAuth.GetID(cuenta, pass);

            updateEntity = GetPerson(userID);
            updateUser   = GetUser(userID);

            if (!IsPostBack)
            {
                txt_Nombre.Text    = updateEntity.Name;
                txt_APaterno.Text  = updateEntity.FirstName;
                txt_AMaterno.Text  = updateEntity.LastName;
                txt_CI.Text        = updateEntity.IdentityCard.ToString();
                txt_Profesion.Text = updateEntity.Profession;
                txt_Email.Text     = updateEntity.Email;
                txt_Celular.Text   = updateEntity.MobilePhone.ToString();
                txt_Fono.Text      = updateEntity.HomePhone.ToString();
                txt_Domicilio.Text = updateEntity.HomeAddress;
                txt_CPostal.Text   = updateEntity.PostalCode.ToString();
                txt_Pass.Text      = updateUser.Password;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["rol"] != null)
            {
                int rol = int.Parse((string)Session["rol"]);

                switch (rol)
                {
                case 1:

                    string nombreUsuario = string.Empty;
                    string rolUsuario    = string.Empty;

                    string logIn    = (string)Session["Cuenta"];
                    string Password = (string)Session["ContraseƱa"];

                    proxyAuthent = new AuthenticationServiceClient("WSHttpBinding_IAuthenticationService");
                    UserID       = proxyAuthent.GetID(logIn, Password);

                    if (UserID != 0)
                    {
                        nombreUsuario    = proxyAuthent.GetPerson(UserID);
                        rolUsuario       = proxyAuthent.GetRole(1);
                        lbl_welcome.Text = rolUsuario + ":  " + nombreUsuario + " ";
                        Session["value"] = "false";
                        //Session["DocenteModulo"] = "deshabilitado";
                    }
                    else
                    {
                        Response.Redirect("Authentication.aspx");
                    }

                    break;

                case 2:

                    break;

                case 3:
                    Response.Redirect("MenuDocente.aspx");
                    break;

                case 4:
                    Response.Redirect("CalificacionesEstudiante.aspx");
                    break;
                }
            }
            else
            {
                Response.Redirect("Authentication.aspx");
            }
        }
Example #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            //userid = (long)Session["UserID"];
            proxy = new AuthenticationServiceClient("WSHttpBinding_IAuthenticationService");
            login = (string)Session["Cuenta"];
            pass  = (string)Session["ContraseƱa"];
            long UserID = proxy.GetID(login, pass);

            //long userid = long.Parse((string)Session["UserID"]);
            Nombre(UserID);
            Reporte(UserID);
            Totales(UserID);
        }