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