public PrivilegeRole GetObjectByKey(object keypair) { if (this.Contains(GetKey(keypair)) == false) { return(null); } PrivilegeRole ob = this[GetKey(keypair)]; return((PrivilegeRole)ob); }
public PrivilegeRole GetObjectByKey(long k_PrivilegedRoleID) { if (this.Contains(GetKey(k_PrivilegedRoleID)) == false) { return(null); } PrivilegeRole ob = this[GetKey(k_PrivilegedRoleID)]; return((PrivilegeRole)ob); }
public PrivilegeRole GetObjectByKey(KeyValuePair <string, long> keypair) { if (this.Contains(keypair) == false) { return(null); } PrivilegeRole ob = this[keypair]; return((PrivilegeRole)ob); }
public bool ChangeItem(KeyValuePair <string, long> keypair, PrivilegeRole item) { PrivilegeRole orig = this.GetObjectByKey(keypair); if (orig != null) { int index = this.IndexOf(orig); this.SetItem(index, item); return(true); } return(false); }
public PrivilegeRole GetObjectByKey(long k_PrivilegedRoleID, LV.Core.DAL.Base.IRepository repository) { if (this.Contains(GetKey(k_PrivilegedRoleID)) == false) { PrivilegeRole ob = repository.GetQuery <PrivilegeRole>().FirstOrDefault(o => o.PrivilegedRoleID == k_PrivilegedRoleID); if (ob != null) { this.Add(ob); } return(ob); } PrivilegeRole obj = this[GetKey(k_PrivilegedRoleID)]; return((PrivilegeRole)obj); }
public bool DeleteObject(PrivilegeRole item, LV.Core.DAL.Base.IRepository repository) { repository.Update(item); return(true); }
public bool AddObject(PrivilegeRole item, LV.Core.DAL.Base.IRepository repository) { repository.Add(item); return(true); }
protected override KeyValuePair <string, long> GetKeyForItem(PrivilegeRole item) { return(item.Key); }