public CommandResult Update(VacationType info) { VacationType original = ProviderFactory.Create<IVacationTypeProvider>(_RepoUri).GetByID(info.ID).QueryObject; if (original != null) { return ProviderFactory.Create<IVacationTypeProvider>(_RepoUri).Update(info, original); } else { return new CommandResult(ResultCode.NoRecord, ResultCodeDecription.GetDescription(ResultCode.NoRecord)); } }
protected override Object GetItemFromInput() { VacationType ct = UpdatingItem as VacationType; if (IsAdding) { ct = new VacationType(); ct.ID = txtName.Text; } ct.Name = txtName.Text; ct.Memo = txtMemo.Text; return ct; }
public CommandResult Delete(VacationType info) { return ProviderFactory.Create<IVacationTypeProvider>(_RepoUri).Delete(info); }
public CommandResult Add(VacationType info) { return ProviderFactory.Create<IVacationTypeProvider>(_RepoUri).Insert(info); }