Beispiel #1
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     Models.ClearTextBox ct = new Models.ClearTextBox();
     Models.Admin        ad = new Models.Admin();
     ad.email    = TextBox1.Text;
     ad.Name     = TextBox2.Text;
     ad.password = TextBox3.Text;
     ad.signUp(ad);
     Response.Write("<script>alert('Successfully Registered')</script>");
     Response.Redirect("AdminHome.aspx");
     ct.ClearTextbox(TextBox1, TextBox2, TextBox3);
 }
Beispiel #2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Session["AdminInfo"] == null)
     {
         Response.Redirect("Login.aspx");
     }
     else
     {
         Models.Admin ad            = new Models.Admin();
         string       em            = Session["AdminInfo"].ToString();
         string       returned_name = ad.GetAdminName(em);
         Label1.Text = returned_name;
     }
 }