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