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