예제 #1
0
        public int CreateForestProduceAppliedForestAsync(CreateForestProduceAppliedForest input)
        {
            var obj = new ForestProduceAppliedForest
            {
                ForestProduceRegistrationId = input.ForestProduceRegistrationId,
                StationId       = input.StationId,
                FinancialYearId = input.FinancialYearId,
                Status          = input.Status
            };


            return(this.repositoryForestProduceAppliedForest.InsertAndGetId(obj));
        }
예제 #2
0
        public ActionResult ForestProduceAppliedForest(CreateForestProduceAppliedForest input)
        {
            if (ModelState.IsValid)
            {
                var AppliedForestId = this.applicant.CreateForestProduceAppliedForestAsync(input);

                return(RedirectToAction("ForestProduceAppliedSpecieCategory", "Application", new { Id = input.ForestProduceRegistrationId }));
            }
            ViewBag.ForestProduceRegistration = this.applicant.GetForestProduceRegistrationById(input.ForestProduceRegistrationId);
            ViewBag.StationId = _stationAppService.GetStations().Select(c => new SelectListItem {
                Value = c.Id.ToString(), Text = c.Name
            });
            ViewBag.FinancialYearId = this.financialYear.GetActiveFinancialYear().Id;
            return(View(input));
        }