public static void UpdateSystemAccount(this SystemAccount currentSystemAccount, string name, string logonName, string address, string notes, string hashedPassword, EnumSystemAccountType accountType) { currentSystemAccount.Name = name; currentSystemAccount.LogonName = logonName; currentSystemAccount.Address = address; currentSystemAccount.Notes = notes; currentSystemAccount.HashedPassword = hashedPassword; currentSystemAccount.AccountType = accountType.ToString(); }
public static string GenerateSystemAccountID(EnumSystemAccountType accountType) { return(string.Format("{0}-{1}", accountType.ToString(), GenerateIDCode())); }
public static SystemAccount CreateSystemAccount(string name, string logonName, string address, string notes, string hashedPassword, EnumSystemAccountType accountType) { SystemAccount newSystemAccount = new SystemAccount(); newSystemAccount.GUID = IDGenerator.GenerateSystemAccountID(accountType); newSystemAccount.Name = name; newSystemAccount.LogonName = logonName; newSystemAccount.Address = address; newSystemAccount.Notes = notes; newSystemAccount.HashedPassword = hashedPassword; newSystemAccount.AccountType = accountType.ToString(); return(newSystemAccount); }