public static UpdateAccount CreateUpdateAccount(Account account) { var updateAccount = new UpdateAccount(); updateAccount.ID = account.ID; updateAccount.LoginID = account.LoginID; updateAccount.Name = account.Name; updateAccount.State = account.State; return updateAccount; }
public static ShowAccount CreateShowAccount(Account account) { var showAccount = new ShowAccount(); showAccount.ID = account.ID; showAccount.LoginID = account.LoginID; showAccount.Name = account.Name; showAccount.LastLoginTime = account.LastLoginTime.ToString("yy-MM-dd"); showAccount.State = account.State; showAccount.CreateTime = account.CreateTime.ToString("yy-MM-dd hh:mm:ss"); return showAccount; }
public static ShowWorkRecord CreateWorkRecord(WorkRecord workRecord, Account account) { var showWorkRecord = new ShowWorkRecord(); showWorkRecord.ID = workRecord.ID; showWorkRecord.CreateTime = workRecord.CreateTime.ToString("yy-MM-dd HH:mm"); showWorkRecord.Journal = workRecord.Journal; showWorkRecord.Plan = workRecord.Plan; showWorkRecord.Summary = workRecord.Summary; showWorkRecord.AccountId = account.ID; showWorkRecord.AccountName = account.Name; return showWorkRecord; }
public Account CreateAccount() { var account = new Account(); account.ID = Guid.NewGuid(); account.LoginID = LoginID; account.Name = Name; account.State = true; account.AccountType = AccountType.Normal; account.CreateTime = DateTime.Now; account.LastLoginTime = DateTime.Now; account.SetPassword(SystemConst.DefaultPassword); return account; }