Esempio n. 1
0
 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;
 }
Esempio n. 3
0
 public CommandResult Delete(OTType info)
 {
     return ProviderFactory.Create<IOTTypeProvider>(_RepoUri).Delete(info);
 }
Esempio n. 4
0
 public CommandResult Add(OTType info)
 {
     return ProviderFactory.Create<IOTTypeProvider>(_RepoUri).Insert(info);
 }