Пример #1
0
 public CommandResult Update(TripType info)
 {
     TripType original = ProviderFactory.Create<ITripTypeProvider>(_RepoUri).GetByID(info.ID).QueryObject;
     if (original != null)
     {
         return ProviderFactory.Create<ITripTypeProvider>(_RepoUri).Update(info, original);
     }
     else
     {
         return new CommandResult(ResultCode.NoRecord, ResultCodeDecription.GetDescription(ResultCode.NoRecord));
     }
 }
Пример #2
0
 protected override Object GetItemFromInput()
 {
     TripType ct = UpdatingItem as TripType;
     if (IsAdding)
     {
         ct = new TripType();
         ct.ID = txtName.Text;
     }
     ct.Name = txtName.Text;
     ct.Memo = txtMemo.Text;
     return ct;
 }
Пример #3
0
 public CommandResult Delete(TripType info)
 {
     return ProviderFactory.Create<ITripTypeProvider>(_RepoUri).Delete(info);
 }
Пример #4
0
 public CommandResult Add(TripType info)
 {
     return ProviderFactory.Create<ITripTypeProvider>(_RepoUri).Insert(info);
 }