Esempio n. 1
0
        public static bool IsRegistered(int UserId)
        {
            //var user = _userManager.Users.FirstOrDefault(x => x.Id == UserId);
            // var user1 = _userAppService.Get(UserId);

            if (_dealerAppService.IsRegistered(9, _financialYearAppService.GetActiveFinancialYear()))
            {
                return(true);
            }
            else
            {
                return(false);
            }
        }
Esempio n. 2
0
 public ActionResult ForestProduceRegistration()
 {
     if (_dealerAppService.IsRegistered(_userAppService.GetLoggedInUser().ApplicantId, this.financialYear.GetActiveFinancialYear()))
     {
         ViewBag.Applicant       = this.applicant.GetApplicantById(_userAppService.GetLoggedInUser().ApplicantId);
         ViewBag.FinancialYearId = this.financialYear.GetActiveFinancialYear().Id;
         ViewBag.DistrictId      = new SelectList(this.refApplicationTypeAppService.GetDistrictList(), "Id", "Name");
         return(View());
     }
     else
     {
         TempData["danger"] = string.Format(@"You must have registrartion certificate first, apply for registration!");
         return(RedirectToAction("Index", "Dashboard"));
     }
 }
Esempio n. 3
0
        // GET: Client/Export/Create

        public ActionResult Create()
        {
            if (_dealerAppService.IsRegistered(_userAppService.GetLoggedInUser().ApplicantId, _financialYearAppService.GetActiveFinancialYear()))
            {
                ViewBag.Applicant = _applicantService.GetApplicantById(_userAppService.GetLoggedInUser().ApplicantId);
                ViewBag.StationId = _stationAppService.GetStations().Select(c => new SelectListItem {
                    Value = c.Id.ToString(), Text = c.Name
                });
                ViewBag.SpecieCategoryId = _specieCategoryAppService.GetSpecieCategories().Select(c => new SelectListItem {
                    Value = c.Id.ToString(), Text = c.Name
                });
                return(View());
            }
            else
            {
                TempData["danger"] = string.Format(@"You must have registrartion certificate first, apply for registration!");
                return(RedirectToAction("Index", "Dashboard"));
            }
        }