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