private static AppUser loadUser(DataTable dtUsers, int RowNo) { AppUser usr = null; if (dtUsers != null) { if (dtUsers.Rows[RowNo] != null) { usr = new AppUser(); usr.UserID = Convert.ToInt32(dtUsers.Rows[RowNo]["UserID"]); usr.UserName = new DisplayName(); usr.UserName.FileAs = dtUsers.Rows[RowNo]["FileAs"].ToString(); usr.UserName.FirstName = dtUsers.Rows[RowNo]["FirstName"].ToString(); usr.UserName.LastName = dtUsers.Rows[RowNo]["LastName"].ToString(); if (dtUsers.Rows[RowNo]["MiddleInitial"] != DBNull.Value) { usr.UserName.MiddleName = dtUsers.Rows[RowNo]["MiddleInitial"].ToString(); } if (dtUsers.Rows[RowNo]["Suffix"] != DBNull.Value) { usr.UserName.Suffix = dtUsers.Rows[RowNo]["Suffix"].ToString(); } if (dtUsers.Rows[RowNo]["Title"] != DBNull.Value) { usr.UserName.Title = dtUsers.Rows[RowNo]["Title"].ToString(); } } } return usr; }
public frmMaster(AppUser usr, MasterPageMode masterPageMode) { InitializeComponent(); currentMasterPageMode = masterPageMode; switch (currentMasterPageMode) { case MasterPageMode.Mission: { this.Text = "Missions"; Form_Title = "Missions"; break; } case MasterPageMode.Value: { this.Text = "Values"; Form_Title = "Values"; break; } case MasterPageMode.GoalsAndSteps: { this.Text = "Goals & Steps"; Form_Title = "Goals & Steps"; break; } case MasterPageMode.WishList: { this.Text = "WishList"; Form_Title = "WishList"; break; } } CurrentUser = usr; }
public EditGoalStep(AppUser usr, PageMode pageMode, int goalID) { InitializeComponent(); CurrentUser = usr; CurrentPageMode = pageMode; GoalID = goalID; }
public UserActivityLogEntry(AppUser CurrentUser , string message) : base(CurrentUser) { this.Categories = new string[] { "User Activity" }; this.Priority = 1; this.Severity = System.Diagnostics.TraceEventType.Information; this.Message = message; }
public AppMDI(AppUser usr) { InitializeComponent(); this.Height = 697; this.Width = 1295; CurrentUser = usr; this.CategoryFilter = new List<Category>(); Form_Title = ApplicationTitle; this.Text = ApplicationTitle + " Licensed for " + usr.UserName.FileAs; this.toolStripStatusLabel.Text = "Welcome to " + ApplicationTitle; }
public static void WriteUserActivity(AppUser currentUser, string message, bool async = false) { UserActivityLogEntry logEntry = new UserActivityLogEntry(currentUser, message); if (!async) { writeLog(logEntry); } else { System.Threading.Tasks.Task.Factory.StartNew(() => writeLog(logEntry)); } }
public frmPlanOfWeek(AppUser usr) { InitializeComponent(); this.Left = 0; this.Top = 0; this.Height = 583; this.Width = 1274; CurrentUser = usr; this.dtpCurrentDate.Value = MyPlannerValidators.StartOfWeek(DateTime.Today, DayOfWeek.Monday); this.Text = "Plan your week"; Form_Title = "Plan your week"; }
public BaseLogEntry(AppUser currentUser) : base() { CurrentUser = currentUser; if (CurrentUser != null) { this.ExtendedProperties.Add("UserID", CurrentUser.UserID); this.ExtendedProperties.Add("UserName", CurrentUser.UserName.FileAs); } else { this.ExtendedProperties.Add("UserID", 0); this.ExtendedProperties.Add("UserName", "Not Logged In"); } this.TimeStamp = DateTime.Now; }
public CtrlWishList(AppUser usr, bool showCompletedItems = false) { InitializeComponent(); CurrentUser = usr; _showCompletedItems = showCompletedItems; }
public frmEditWishListItem(AppUser usr, PageMode pageMode) { InitializeComponent(); CurrentUser = usr; CurrentPageMode = pageMode; }
public EditCompassRole(AppUser usr, PageMode pageMode) { InitializeComponent(); CurrentUser = usr; CurrentPageMode = pageMode; }