public tbl_Customer SaveCustomer(string email, string firstName, string surname, string telephone, string title, string password, int domainID, int customerID, bool registered, bool detailsFor3rdParties, string adminNote) { if (registered && customerID == 0 && String.IsNullOrEmpty(password)) { return(null); } if (String.IsNullOrEmpty(email)) { return(null); } var customer = CustomerRepository.SaveCustomer(email, firstName, surname, telephone, title, domainID, customerID, registered, detailsFor3rdParties, adminNote); if (customer == null) { return(null); } if (!String.IsNullOrEmpty(password)) { CustomerRepository.SavePassword(customer.CustomerID, Sha512.GetSHA512Hash(password)); } return(customer); }
public tbl_AdminUsers SaveUser(string email, string userName, string password, int groupID, int userID) { if (userID == 0 && String.IsNullOrEmpty(password)) { return(null); } password = String.IsNullOrEmpty(password) ? String.Empty : Sha512.GetSHA512Hash(password); return(AdminUserRepository.SaveUser(email, userName, password, groupID, userID)); }
public tbl_AdminUsers GetUserByEmailAndPassword(string email, string password) { return(AdminUserRepository.GetByEmailAndPassword(email, Sha512.GetSHA512Hash(password))); }
public tbl_Customer GetCustomerByEmailAndPassword(string email, string password, int domainID) { return(CustomerRepository.GetByEmailAndPassword(email, Sha512.GetSHA512Hash(password), domainID)); }