Exemple #1
0
        public ActionResult Create(PartnerViewModel partnerViewModel)
        {
            var organisationId = UserOrganisationId;

            if (ModelState.IsValid)
            {
                partnerViewModel.Partner.OrganisationId = organisationId;
                partnerViewModel.Partner = NidanBusinessService.CreatePartner(organisationId, partnerViewModel.Partner);
                return(RedirectToAction("Index"));
            }
            partnerViewModel.Talukas   = new SelectList(NidanBusinessService.RetrieveTalukas(organisationId, e => true).ToList());
            partnerViewModel.Districts = new SelectList(NidanBusinessService.RetrieveDistricts(organisationId, e => true).ToList());
            partnerViewModel.States    = new SelectList(NidanBusinessService.RetrieveStates(organisationId, e => true).ToList());
            return(View(partnerViewModel));
        }