public static int ChangePassword(string accountId, string newPAssword, UserAccountTypes userType) { IUserAccountDAL userAccountDAL = null; switch (userType) { case UserAccountTypes.Employee: userAccountDAL = new LiteCommerce.DataLayers.SqlServer.EmployeeUserAccountDAL(_connectionString); break; case UserAccountTypes.Customer: userAccountDAL = new LiteCommerce.DataLayers.SqlServer.CustomerUserAccountDAL(_connectionString); break; default: throw new Exception("invalid type"); } return(userAccountDAL.ChangePassword(accountId, newPAssword)); }
public static int UpdateProfile(Object data, UserAccountTypes userType) { IUserAccountDAL userAccountDAL = null; switch (userType) { case UserAccountTypes.Employee: userAccountDAL = new LiteCommerce.DataLayers.SqlServer.EmployeeUserAccountDAL(_connectionString); break; case UserAccountTypes.Customer: userAccountDAL = new LiteCommerce.DataLayers.SqlServer.CustomerUserAccountDAL(_connectionString); break; default: throw new Exception("invalid type"); } return(userAccountDAL.UpdateProfile(data)); }