public string CreateDoctorAcccount(string email, string dname, string pwd, string cfmpwd, string mobileno, string dob, string pip) { if (dname.Length == 0) returnMessage += "Therapist Name cannot be blank <br />"; if (pwd.Length == 0) returnMessage += "Password cannot be blank <br/>"; if (cfmpwd.Length == 0) returnMessage += "Cofirm Passowrd cannot be blank <br/>"; if (mobileno.Length == 0) returnMessage += "Mobile Number cannot be blank <br/>"; if (dob.Length == 0) returnMessage += "Date of Birth cannnot be blank <br/>"; if (pip.Length == 0) returnMessage += "Please Upload an image <br/>"; if (pwd != cfmpwd) returnMessage += "Your passwords dont match <br/>"; if (returnMessage.Length == 0) { SHA256 sha = new SHA256CryptoServiceProvider(); byte[] data = Encoding.ASCII.GetBytes(pwd); byte[] result = sha.ComputeHash(data); string hashedpwd = Convert.ToBase64String(result); AzureUserDAL doc = new AzureUserDAL(email, dname, hashedpwd, mobileno, dob, pip); int noofRows = 0; noofRows = doc.CreateDoctorProfile(); if (noofRows > 0) returnMessage = "You Signed Up Succuesfully."; else returnMessage = "Error,Please try again"; } return returnMessage; }
public string CheckLogin(string Email) { AzureUserDAL user = new AzureUserDAL(Email); userCount = user.CheckDoctorLogin(); /* if (userCount > 0) returnMessage = "Login Succuess."; else returnMessage = "Error,Your Email or Password might be wrong";*/ return userCount; }