/// <summary> /// 删除 /// </summary> /// <returns></returns> public BLLResult Delete() { if (OnConfirmDelete != null) { if (!OnConfirmDelete()) { return new BLLResult() { IsSuccess = false, Message = "" } } ; // "删除取消" } bool needMove = !HasNext && HasPrevious; var result = MemorableData.Delete(); if (result.IsSuccess) { if (needMove) { DataIndex = DataIndex - 1;//前移一项 } IsEdited = false; Datas.Remove(MemorableData.Data); ChangeCurrent(DataIndex); } return(result); }
private void DeleteAction(object obj) { var item = (ItemPenjualanModel)obj; if (item != null) { Datas.Remove(item); RefreshProductStock(); } }
public bool Remove(DataType item) { var res = Datas.Remove(item); if (res) { CallUpdate(); } return(res); }
public virtual bool Remove(string guid) { bool isSucess = false; if (Datas.TryGetValue(guid, out var t)) { Datas.Remove(guid); isSucess = true; Event.Notify(EventCall, new ModelEventArgs <T>() { Data = t, Status = ModelStatus.Remove }); t.Dispose(); } return(isSucess); }
public void RemoveArticle(TDBaseArticleData data) { Datas.Remove(data.ID); }
public void RemoveArticle(long id) { Datas.Remove(id); }