public ActionResult Registration(ManagerRegistration manager)
        {
            List <SalePoint> salepointlist = AgroExpressDBAccess.GetallEnabledSalePoint();

            if (salepointlist != null)
            {
                manager.salepointlist = salepointlist.Select(x => new SelectListItem
                {
                    Value = x.PKSalePointID.ToString(),
                    Text  = x.SalePointName
                });
            }

            if (ModelState.IsValid)
            {
                var user = AgroExpressDBAccess.IsUserExist(manager.UserName);
                if (user != null)
                {
                    ModelState.AddModelError("UserName", "User name already exist");
                    return(View(manager));
                }

                if (AgroExpressDBAccess.AddManager(manager))
                {
                    ViewBag.success = "Registration Successsfull";
                    ModelState.Clear();
                    ManagerRegistration registration = new ManagerRegistration();

                    if (salepointlist != null)
                    {
                        registration.salepointlist = salepointlist.Select(x => new SelectListItem
                        {
                            Value = x.PKSalePointID.ToString(),
                            Text  = x.SalePointName
                        });
                    }
                    return(View(registration));
                }
            }
            return(View(manager));
        }