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