Esempio n. 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         string            username = (string)Session["uname"];
         string            role     = (string)Session["role"];
         getProfileService gps      = new getProfileService();
         string[]          res      = gps.getProfile(username);
         Label4.Text = "";
         Label5.Text = "";
         Label6.Text = "";
         if (res != null)
         {
             Label1.Text = res[0];
             Label2.Text = res[1];
             Label3.Text = res[2];
         }
         else
         {
             Response.Redirect("/Login.aspx");
         }
         if (!IsPostBack)
         {
             DropDownList1.DataSource     = CreateDataSource();
             DropDownList1.DataTextField  = "TextField";
             DropDownList1.DataValueField = "ValueField";
             DropDownList1.DataBind();
         }
     }
     catch (Exception) { Response.Redirect("/Login.aspx"); }
 }
Esempio n. 2
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            getProfileService gps = new getProfileService();

            string[] res = gps.getProfile(DropDownList1.SelectedItem.Text);
            if (res != null)
            {
                Label4.Text = "Name: " + res[0];
                Label5.Text = "User Name: " + res[1];
                Label6.Text = "Email: " + res[2];
            }
        }
Esempio n. 3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         string            username = (string)Session["uname"];
         string            role     = (string)Session["role"];
         getProfileService gps      = new getProfileService();
         string[]          res      = gps.getProfile(username);
         if (res != null)
         {
             Label1.Text = res[0];
             Label2.Text = res[1];
             Label3.Text = res[2];
         }
         else
         {
             Response.Redirect("/Login.aspx");
         }
     }
     catch (Exception) { Response.Redirect("/Login.aspx"); }
 }