public ActionResult TaxSetupEdit(TaxSetupDTO Record)
        {
            int Id = _TaxSetupService.UpdateTaxSetup(Record);
            IEnumerable <TaxSetupDTO> TaxSetupList = _TaxSetupService.GetAllTaxSetup();

            return(View("Index", TaxSetupList));
        }
Пример #2
0
        public TaxSetupDTO GetTaxSetupById(int Id)
        {
            PayrollTaxSetup TaxSetup    = _unitOfWork.TaxSetupRepository.GetById(Id);
            TaxSetupDTO     TaxSetupDTO = TaxSetupRequestFormatter.ConvertRespondentInfoToDTO(TaxSetup);

            return(TaxSetupDTO);
        }
        public ActionResult TaxDetailCreate(int MasterId)
        {
            TaxSetupDTO TaxSetup = _TaxSetupService.GetTaxSetupById(MasterId);

            ViewBag.MasterName = TaxSetup.TaxName;
            return(View());
        }
Пример #4
0
        public int UpdateTaxSetup(TaxSetupDTO Record)
        {
            PayrollTaxSetup record   = TaxSetupRequestFormatter.ConvertRespondentInfoFromDTO(Record);
            var             response = _unitOfWork.TaxSetupRepository.Update(record);

            _unitOfWork.Save();
            return(record.MasterId);
        }
        public ActionResult TaxSetupDetails(int MasterId)
        {
            TaxSetupDTO TaxSetup = _TaxSetupService.GetTaxSetupById(MasterId);
            IEnumerable <TaxDetailDTO> TaxDetailList = _TaxDetailService.GetAllTaxDetailsByMasterId(MasterId);

            ViewBag.MasterName = TaxSetup.TaxName;
            return(View(TaxDetailList));
        }
        public ActionResult TaxDetailEdit(int Id)
        {
            TaxDetailDTO TaxDetailList = _TaxDetailService.GetTaxDetailById(Id);
            TaxSetupDTO  Setup         = _TaxSetupService.GetTaxSetupById(TaxDetailList.MasterId);

            ViewBag.MasterName = Setup.TaxName;
            ViewBag.MasterId   = Setup.MasterId;
            return(View(TaxDetailList));
        }
        public ActionResult TaxDetailCreate(TaxDetailDTO Record)
        {
            _TaxDetailService.InsertIntoTaxDetail(Record);
            TaxSetupDTO TaxSetup = _TaxSetupService.GetTaxSetupById(Record.MasterId);
            IEnumerable <TaxDetailDTO> TaxDetailList = _TaxDetailService.GetAllTaxDetailsByMasterId(Record.MasterId);

            ViewBag.MasterName = TaxSetup.TaxName;
            return(View("TaxSetupDetails", TaxDetailList));
        }
 public ActionResult TaxSetupCreate(TaxSetupDTO Record)
 {
     try
     {
         if (!ModelState.IsValid)
         {
             ViewBag.Error = "Form validation errors.";
             return(View());
         }
         else
         {
             ViewBag.Success = "Tax setup created successfully.";
             _TaxSetupService.InsertIntoTaxSetup(Record);
             return(RedirectToAction("Index"));
         }
     }
     catch (Exception Exception)
     {
         ViewBag.Error = Exception.Message;
         return(View());
     }
 }
Пример #9
0
 public static PayrollTaxSetup ConvertRespondentInfoFromDTO(TaxSetupDTO TaxSetupDTO)
 {
     Mapper.CreateMap <TaxSetupDTO, PayrollTaxSetup>().ForMember(d => d.PayrollTaxDetails, m => m.Ignore());
     return(Mapper.Map <TaxSetupDTO, PayrollTaxSetup>(TaxSetupDTO));
 }
Пример #10
0
        public void InsertIntoTaxSetup(TaxSetupDTO Record)
        {
            PayrollTaxSetup Data = TaxSetupRequestFormatter.ConvertRespondentInfoFromDTO(Record);

            _unitOfWork.TaxSetupRepository.Create(Data);
        }
        public ActionResult TaxSetupEdit(int Id)
        {
            TaxSetupDTO TaxSetupDTO = _TaxSetupService.GetTaxSetupById(Id);

            return(View(TaxSetupDTO));
        }