Example #1
0
        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));
        }
Example #2
0
        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));
        }