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