public int CreateForestProduceAppliedSpecieCategory(CreateForestProduceAppliedSpecieCategory input) { var obj = new ForestProduceAppliedSpecieCategory { ForestProduceRegistrationId = input.ForestProduceRegistrationId, SpecieCategoryId = input.SpecieCategoryId, FinancialYearId = input.FinancialYearId, Volume = input.Volume, Status = input.Status }; return(this.repositoryForestProduceAppliedSpecieCategory.InsertAndGetId(obj)); }
public ActionResult ForestProduceAppliedSpecieCategory(CreateForestProduceAppliedSpecieCategory input) { if (ModelState.IsValid) { var ForestProductRegistrationId = this.applicant.CreateForestProduceAppliedSpecieCategory(input); return(RedirectToAction("Index", "Dashboard")); } var activeYear = this.financialYear.GetActiveFinancialYear(); ViewBag.ForestProduceRegistration = this.applicant.GetForestProduceRegistrationById(input.ForestProduceRegistrationId); ViewBag.FinancialYearId = this.financialYear.GetActiveFinancialYear().Id; ViewBag.SpecieCategoryId = _specieCategoryAppService.GetSpecieCategories().Select(c => new SelectListItem { Value = c.Id.ToString(), Text = c.Name }); return(View(input)); }