Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["User"] != null)
            {
                Response.Redirect("Default.aspx");
            }

            Title = "Registration";



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

            skills = findata.getskills();



            if (!IsPostBack)
            {
                for (int i = 0; i < skills.Length; i++)
                {
                    skilldrop.Items.Add(new ListItem((string)skills[i], i.ToString()));
                }
            }
            findata.Close();
        }
Beispiel #2
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");
                }
            }
        }