public bool Update(ModelViewHaspKey entity) { if (entity == null) { throw new ArgumentNullException(nameof(entity)); } return(keyLogic.Update(entity.HaspKey)); }
public bool CheckKey(ModelViewHaspKey item) { if (item == null) { throw new ArgumentNullException(nameof(item)); } return(keyFeatures .LastOrDefault(x => x.IdHaspKey == item.Id && x.EndDate >= DateTime.Now.Date) == null); }
public void FillModel(ModelViewHaspKey item) { Entities = item ?? throw new ArgumentNullException(nameof(item)); if (!CheckInputData()) { return; } if (Entities.Id < 1) { Add(Entities); } else { Update(Entities); } }
public void Update(ModelViewHaspKey entity) { if (entity == null) { entitiesView.MessageError(errorUpdate); return; } if (haspKeyModel.Update(entity)) { entitiesView.DataChange(); Display(); } else { entitiesView.MessageError(errorUpdate); } }
public void FillInputItem(ModelViewHaspKey item) { Entities = item ?? throw new ArgumentNullException(nameof(item)); entitiesView.BindItem(item); }