protected override Object GetItemFromInput()
 {
     StaffCategory ct = UpdatingItem as StaffCategory;
     if (IsAdding)
     {
         ct = new StaffCategory();
         ct.ID = txtName.Text;
     }
     ct.Name = txtName.Text;
     ct.Memo = txtMemo.Text;
     return ct;
 }
Ejemplo n.º 2
0
 public CommandResult Update(StaffCategory info)
 {
     StaffCategory original = ProviderFactory.Create<IStaffCategoryProvider>(_RepoUri).GetByID(info.ID).QueryObject;
     if (original != null)
     {
         return ProviderFactory.Create<IStaffCategoryProvider>(_RepoUri).Update(info, original);
     }
     else
     {
         return new CommandResult(ResultCode.NoRecord, ResultCodeDecription.GetDescription(ResultCode.NoRecord));
     }
 }
Ejemplo n.º 3
0
 public CommandResult Delete(StaffCategory info)
 {
     return ProviderFactory.Create<IStaffCategoryProvider>(_RepoUri).Delete(info);
 }
Ejemplo n.º 4
0
 public CommandResult Add(StaffCategory info)
 {
     return ProviderFactory.Create<IStaffCategoryProvider>(_RepoUri).Insert(info);
 }