public PlayerDashboardExt Map(PlayerDashboard model) { PlayerDashboardExt tblModel = new PlayerDashboardExt() { PlayerDashboardID = model.PlayerDashboardID, PlayerID = model.PlayerID, PlayerFullName = model.Players.FullName, PlayerEmailAddress = model.Players.EmailAddress, PlayerHeight_cm = model.Players.Heights.Height_Value, IsPlayerActive = model.Players.Active, DashboardURL = model.DashboardURL, DashboardPassword = SecurityUtils.DecryptCypher(model.DashboardPassword), TargetWeight = model.TargetWeight, PasswordResetCode = model.PasswordResetCode, ResetCodeExpiry = model.ResetCodeExpiry, Locked = model.Locked, Deleted = model.Deleted, IsFirstLogin = model.IsFirstLogin, LoginSessionID = model.LoginSessionID, DashboardCreatedDate = model.DashboardCreatedDate, DashboardExpiryDate = model.DashboardExpiryDate, //Share Data Settings ShareDataFrequency = model.ShareDataFrequency, ShareDataWith = model.ShareDataWith, DayOfWeek = model.DayOfWeek, AdditionalRecipients = model.AdditionalRecipients, OptionalMessage = model.OptionalMessage, LastSentDate = model.LastSentDate, ReminderTime = model.ReminderTime }; return(tblModel); }
public PlayerDashboard Map(PlayerDashboardExt model) { PlayerDashboard tblModel = new PlayerDashboard() { PlayerDashboardID = model.PlayerDashboardID, PlayerID = model.PlayerID, DashboardURL = model.DashboardURL, DashboardPassword = model.DashboardPassword, TargetWeight = model.TargetWeight, PasswordResetCode = model.PasswordResetCode, ResetCodeExpiry = model.ResetCodeExpiry, Locked = model.Locked, Deleted = model.Deleted, IsFirstLogin = model.IsFirstLogin, LoginSessionID = model.LoginSessionID, DashboardCreatedDate = model.DashboardCreatedDate, DashboardExpiryDate = model.DashboardExpiryDate, //Share Data Settings ShareDataFrequency = model.ShareDataFrequency, ShareDataWith = model.ShareDataWith, DayOfWeek = model.DayOfWeek, AdditionalRecipients = model.AdditionalRecipients, OptionalMessage = model.OptionalMessage, LastSentDate = model.LastSentDate, ReminderTime = model.ReminderTime }; return(tblModel); }
public void MapUpdate(ref PlayerDashboard dbmodel, PlayerDashboardExt model) { dbmodel.PlayerID = model.PlayerID; dbmodel.DashboardURL = model.DashboardURL; dbmodel.DashboardPassword = SecurityUtils.EncryptText(model.DashboardPassword); dbmodel.IsFirstLogin = false; dbmodel.TargetWeight = model.TargetWeight; dbmodel.Locked = model.Locked; dbmodel.Deleted = model.Deleted; //Share Data Settings dbmodel.ShareDataFrequency = model.ShareDataFrequency; dbmodel.ShareDataWith = model.ShareDataWith; dbmodel.DayOfWeek = model.DayOfWeek; dbmodel.AdditionalRecipients = model.AdditionalRecipients; dbmodel.OptionalMessage = model.OptionalMessage; dbmodel.ReminderTime = model.ReminderTime; }