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; }
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)); } }
public CommandResult Delete(StaffCategory info) { return ProviderFactory.Create<IStaffCategoryProvider>(_RepoUri).Delete(info); }
public CommandResult Add(StaffCategory info) { return ProviderFactory.Create<IStaffCategoryProvider>(_RepoUri).Insert(info); }