public ActionResult BasicDetails()
        {
            OrasModel        oras        = new OrasModel();
            CastContextModel objC        = new CastContextModel();
            ReligionModel    objReligion = new ReligionModel();
            CountryModel     objCountry  = new CountryModel();
            StateModel       objState    = new StateModel();
            BloodGroupModel  objB        = new BloodGroupModel();
            BasicResponse    response    = new BasicResponse()
            {
                CastData     = objC.GetCasts(),
                OrasData     = oras.GetOrass(),
                BloodGroup   = objB.GetBloodGroups(),
                CountryData  = objCountry.GetCountrys(),
                HeightData   = oras.GetHeights(),
                ReligionData = objReligion.GetReligions(),
                StateList    = objState.GetStates(),
            };

            return(Json(response, JsonRequestBehavior.AllowGet));
        }
Exemple #2
0
        public static void loadViewBag(this ControllerBase target)
        {
            target.ViewBag.VendorTypes = Newtonsoft.Json.JsonConvert.SerializeObject(new VendorTypeContextModel().GetVendorTypes());
            target.ViewBag.IsLogin     = false;
            if (SessionManager.GetInstance.ActiveUser != null)
            {
                target.ViewBag.IsLogin = true;
                target.ViewBag.Gender  = SessionManager.GetInstance.ActiveUser.Gender;
            }
            ReligionModel         objReligion = new ReligionModel();
            var                   lst         = objReligion.GetReligions();
            List <SelectListItem> lstData     = (from tbl in lst
                                                 select new SelectListItem {
                Text = tbl.ReligionName, Value = tbl.ReligionId.ToString()
            }).ToList();

            lstData.Insert(0, new SelectListItem()
            {
                Text = SettingsManager.Instance.Branding == "SINDHI" ? "---Select Religion---" : "---Select Religion---", Value = "0"
            });
            target.ViewBag.ReligionId = lstData;
            OrasModel oras = new OrasModel();

            lstData = (from tbl in oras.GetOrass()
                       select new SelectListItem {
                Text = tbl.OrasName, Value = tbl.OrasId.ToString()
            }).ToList();

            lstData.Insert(0, new SelectListItem()
            {
                Text = SettingsManager.Instance.Branding == "SINDHI" ? "---Select Rashi---" : "---Select Rashi---", Value = "0"
            });

            target.ViewBag.OrasId = lstData;

            BloodGroupModel bg = new BloodGroupModel();

            lstData = (from tbl in bg.GetEducations()
                       select new SelectListItem {
                Text = tbl.DegreeName, Value = tbl.QualificationId.ToString()
            }).ToList();

            lstData.Insert(0, new SelectListItem()
            {
                Text = SettingsManager.Instance.Branding == "SINDHI" ? "---Select Qualification---" : "---Select Qualification---", Value = "0"
            });

            CastContextModel objC = new CastContextModel();

            lstData = (from tbl in objC.GetCasts()
                       select new SelectListItem {
                Text = tbl.CastName, Value = tbl.CastId.ToString()
            }).ToList();

            lstData.Insert(0, new SelectListItem()
            {
                Text = SettingsManager.Instance.Branding == "SINDHI" ? "---Select Caste---" : "---जात निवडा---", Value = "0"
            });
            target.ViewBag.CasteId = lstData;

            target.ViewBag.QualificationId = lstData;
        }
Exemple #3
0
 public OrasController()
 {
     objOras = new OrasModel();
 }