예제 #1
0
        public ActionResult Create(OtherFeeViewModel otherFeeViewModel)
        {
            var organisationId = UserOrganisationId;
            var centreId       = UserCentreId;
            var personnelId    = UserPersonnelId;

            otherFeeViewModel.OtherFee.StudentCode = otherFeeViewModel.StudentCode;
            if (ModelState.IsValid)
            {
                otherFeeViewModel.OtherFee.OrganisationId = organisationId;
                otherFeeViewModel.OtherFee.CentreId       = centreId;
                otherFeeViewModel.OtherFee.CreatedBy      = personnelId;
                otherFeeViewModel.OtherFee = _nidanBusinessService.CreateOtherFee(organisationId, otherFeeViewModel.OtherFee);
                return(RedirectToAction("Index", "Enquiry"));
            }
            otherFeeViewModel.OnlineExams  = new SelectList(_nidanBusinessService.RetrieveOnlineExams(organisationId, e => true));
            otherFeeViewModel.FeeTypes     = new SelectList(_nidanBusinessService.RetrieveFeeTypes(organisationId, e => true));
            otherFeeViewModel.PaymentModes = new SelectList(_nidanBusinessService.RetrievePaymentModes(organisationId, e => true));
            return(View(otherFeeViewModel));
        }