Exemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["User"] != null) //Logged in
                {
                    Title = "My Profile";
                    user  = (UserData)(Session["User"]);
                    txtFirstName.Value = user.getFirstName();
                    txtLastName.Value  = user.getSurname();

                    txtDoB.Value        = user.getDoB().ToShortDateString();
                    txtgithublink.Value = user.getGitlink();

                    Dataservice.DatamanagementClient findata = new Dataservice.DatamanagementClient();
                    findata.Open();

                    skills = findata.getskills();



                    for (int i = 0; i < skills.Length; i++)
                    {
                        skilldrop.Items.Add(new ListItem((string)skills[i], i.ToString()));
                    }

                    skilldrop.SelectedIndex = Convert.ToInt32(user.getSkill().ToString());

                    findata.Close();
                }
                else
                {
                    Response.Redirect("Login.aspx");
                }
            }
        }