public object Insert(string key) { AppEntry entry = new AppEntry(); entry.entry_key = key; Insert(0, entry); return entry; }
public void AddEntry(IDictionary row) { AppEntry entry = new AppEntry(); foreach (DictionaryEntry col in row) { string key = Convert.ToString(col.Key); string value = Convert.ToString(col.Value); entry.Add(key, value); } Add(entry); }
public AppEntry(AppEntry row) { AddAll(row); }
/// <summary> /// Add each source entry to our internal store. /// </summary> /// <remarks><p> /// Entries with keys that match the property names will be exposed. /// Other entries may be added, but can only be retrieved via Get. /// </p></remarks> /// <param name="row">Entries to add</param> /// public void AddAll(AppEntry row) { ICollection keys = row.Keys; foreach (string key in keys) { Add(key, row.Get(key)); } }
/// <summary> /// Create or retrieve an AppUserProfile /// based on the client's WindowsIdentity. /// </summary> /// <returns>A new or prexisting AppUserProfile</returns> /// protected AppUserProfile NewProfile() { WindowsIdentity id = WindowsIdentity.GetCurrent(); AppUserProfile profile = new AppUserProfile(id); Session[UserProfile.USER_PROFILE] = profile; IViewHelper helper = Catalog.GetHelperFor(App.ENTRY); helper.Criteria[App.USER_NAME] = profile.UserId; helper.Execute(); if (helper.IsNominal) { string editor = helper.Criteria[App.EDITOR] as string; // ISSUE: Need constant for "1" (true) bool isEditor = ((editor != null) && (editor.Equals("1"))); profile.IsEditor = isEditor; if (editor != null) { AppEntry entry = new AppEntry(); entry.AddAll(helper.Criteria); profile.Entry = entry; } } return profile; }