public ActionResult DeleteConfirmed(int id) { PayrollRemoteAllowance payrollRemoteAllowance = db.PayrollRemoteAllowances.Find(id); db.PayrollRemoteAllowances.Remove(payrollRemoteAllowance); db.SaveChanges(); return(RedirectToAction("Index")); }
// GET: PayrollRemoteAllowances/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } PayrollRemoteAllowance payrollRemoteAllowance = db.PayrollRemoteAllowances.Find(id); if (payrollRemoteAllowance == null) { return(HttpNotFound()); } return(View(payrollRemoteAllowance)); }
public static PayrollRemoteAllowancesDTO ConvertRespondentToDTO(PayrollRemoteAllowance AttDTO) { Mapper.CreateMap <PayrollRemoteAllowance, PayrollRemoteAllowancesDTO>().ConvertUsing( m => { return(new PayrollRemoteAllowancesDTO { RAId = m.RAId, RARankId = m.RARankId, RARemoteId = m.RARemoteId, RAType = m.RAType, RemoteAllowance = m.RemoteAllowance }); }); return(Mapper.Map <PayrollRemoteAllowance, PayrollRemoteAllowancesDTO>(AttDTO)); }
public int UpdatePayrollRemoteAllowance(PayrollRemoteAllowancesDTO data) { PayrollRemoteAllowance rA = PayrollRemoteAllowancesRequestFormatter.ConvertRespondentInfoFromDTO(data); return(_unitOfWork.PayrollRemoteAllowanceRepository.Update(rA)); }
public PayrollRemoteAllowancesDTO InsertPayrollRemoteAllowance(PayrollRemoteAllowancesDTO data) { PayrollRemoteAllowance rA = PayrollRemoteAllowancesRequestFormatter.ConvertRespondentInfoFromDTO(data); return(PayrollRemoteAllowancesRequestFormatter.ConvertRespondentToDTO(_unitOfWork.PayrollRemoteAllowanceRepository.Create(rA))); }