Esempio n. 1
0
 protected void signupButton_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(emailTB.Text) && !String.IsNullOrEmpty(pwdTB.Text) && !String.IsNullOrEmpty(cfmpwdTB.Text))
     {
         if (pwdTB.Text.Equals(cfmpwdTB.Text))
         {
             String filepath = Server.MapPath("Solution Items/TextFile1.txt");
             AccntService.AccountServicesClient accountServices = new AccntService.AccountServicesClient();
             bool status = accountServices.createAccount(emailTB.Text, pwdTB.Text, filepath);
             if (status)
             {
                 StatusLabel.Text = "Account Registered Successfully";
             }
             else
             {
                 StatusLabel.Text = "Account Already Exists!!";
             }
         }
         else
         {
             StatusLabel.Text = "Passwords need to be the same";
         }
     }
     else
     {
         StatusLabel.Text = "All Fields Are Required";
     }
 }
Esempio n. 2
0
 protected void signinButton_Click(object sender, EventArgs e)
 {
     if (!String.IsNullOrEmpty(emailTB.Text) && !String.IsNullOrEmpty(pwdTB.Text))
     {
         String filepath = Server.MapPath("Solution Items/TextFile1.txt");
         AccntService.AccountServicesClient accountService = new AccntService.AccountServicesClient();
         bool status = accountService.authenticateUser(emailTB.Text, pwdTB.Text, filepath);
         if (status)
         {
             StatusLabel.Text = "Login Successful";
         }
         else
         {
             StatusLabel.Text = "Login Unsucessful, please check password/email.";
         }
     }
     else
     {
         StatusLabel.Text = "Both fields need are mandatory";
     }
 }