public ActionResult EditPersonalInformation() { UserDomainLogic userDomainLogic = new UserDomainLogic(); UserProfile userProfile = userDomainLogic.FindUser(UserVariables.LoggedInUserGuid); CommonDomainLogic commonDomainLogic = new CommonDomainLogic(); userProfile.Cities = commonDomainLogic.GetCities(); return(View(userProfile)); }
/// <summary> /// /// </summary> /// <returns></returns> public ActionResult PersonalInformation() { UserDomainLogic userProfile = new UserDomainLogic(); if (TempData["Success"] != null) { Success(TempData["Success"].ToString()); } return(View(userProfile.FindUser(UserVariables.LoggedInUserGuid))); }
public PartialViewResult ChoosePreferedCity() { CommonDomainLogic commonDomainLogic = new CommonDomainLogic(); UserDomainLogic _userDomainLogic = new UserDomainLogic(); ChooseCity chooseCity = new ChooseCity(); UserProfile _FindUser = _userDomainLogic.FindUser(UserVariables.LoggedInUserGuid); chooseCity.Cities = commonDomainLogic.GetCities(); chooseCity.SelectedCity = commonDomainLogic.GetPreferedCity(); chooseCity.TopCities = commonDomainLogic.GetTopCities(chooseCity.SelectedCity); return(PartialView("_chooseCity", chooseCity)); }
/// <summary> /// /// </summary> /// <param name="id"></param> /// <param name="BusinessTypeGuid"></param> /// <param name="LocationGuid"></param> /// <returns></returns> public ActionResult LocationListUser(string id, Nullable <Guid> BusinessTypeGuid, Nullable <Guid> LocationGuid) { BusinessDomainLogic businessDomainLogic = new BusinessDomainLogic(); CommonDomainLogic _commonDomainLogic = new CommonDomainLogic(); ChooseCity chooseCity = new ChooseCity(); TempData["SelectedBusinessTypeGuid"] = BusinessTypeGuid; if (!string.IsNullOrEmpty(id)) { Guid _cityguid = _commonDomainLogic.FindCityGuid(id); UserDomainLogic _userDomainLogic = new UserDomainLogic(); _userDomainLogic.UpdatePreferedCity(_cityguid); chooseCity.Cities = _commonDomainLogic.GetCityByGUID(_cityguid); chooseCity.SelectedCity = new City { CityName = chooseCity.Cities.FirstOrDefault().CityName, CityGuid = chooseCity.Cities.FirstOrDefault().CityGuid, CityUrlName = chooseCity.Cities.FirstOrDefault().CityUrlName }; } else { UserDomainLogic userDomainLogic = new UserDomainLogic(); string guid = userDomainLogic.FindUser(UserVariables.LoggedInUserGuid).PreferedCity; if (!string.IsNullOrEmpty(guid)) { chooseCity.Cities = _commonDomainLogic.GetCityByGUID(new Guid(guid)); } else { chooseCity.Cities = _commonDomainLogic.GetCities(); } chooseCity.SelectedCity = new City { CityName = chooseCity.Cities.FirstOrDefault().CityName, CityGuid = chooseCity.Cities.FirstOrDefault().CityGuid, CityUrlName = chooseCity.Cities.FirstOrDefault().CityUrlName }; } int Currentpage = 0; TempData["CurrentPage"] = null; if (LocationGuid == null || LocationGuid == Guid.Empty) { if (Request.Url.AbsoluteUri.Contains('?') && Request.Url.AbsoluteUri.Contains("page")) { TempData["CurrentPage"] = Request.Url.AbsoluteUri.Split('&')[1].Split('=')[1].Split('&')[0]; Currentpage = TempData["CurrentPage"] == null ? 0 : Convert.ToInt32(TempData["CurrentPage"]); TempData.Keep(); } } return(View(businessDomainLogic.GetBusinessByCity(chooseCity.SelectedCity, BusinessTypeGuid, Currentpage))); }
/// <summary> /// /// </summary> /// <param name="guid"></param> /// <returns></returns> public ActionResult AddEditManager(Nullable <Guid> guid) { UserProfile userProfile = new UserProfile(); UserDomainLogic userDomainLogic = new UserDomainLogic(); CommonDomainLogic commonDomainLogic = new CommonDomainLogic(); if (guid != null && guid != Guid.Empty) { userProfile = userDomainLogic.FindUser(guid.Value); userProfile.Cities = commonDomainLogic.GetCities(); userProfile.RolesList = commonDomainLogic.GetAllRoles(); } else { userProfile.Cities = commonDomainLogic.GetCities(); userProfile.RolesList = commonDomainLogic.GetAllRoles(); } return(View(userProfile)); }
/// <summary> /// /// </summary> /// <returns></returns> public City GetPreferedCity() { UserDomainLogic _userDomainLogic = new UserDomainLogic(); CommonDomainLogic commonDomainLogic = new CommonDomainLogic(); City _City = new City(); UserProfile _FindUser = _userDomainLogic.FindUser(UserVariables.LoggedInUserGuid); if (_FindUser == null && string.IsNullOrEmpty(_FindUser.PreferedCity)) { _City = new City(); } else { if (string.IsNullOrEmpty(_FindUser.PreferedCity)) { _FindUser.PreferedCity = bringlyEntities.tblCities.Where(x => x.IsDeleted == false).ToList().FirstOrDefault().CityGuid.ToString(); } _City = commonDomainLogic.GetCityByGUID(new Guid(_FindUser.PreferedCity)).FirstOrDefault(); } return(_City); }
/// <summary> /// /// </summary> /// <returns></returns> public ActionResult NewRegistrationfromSocialPage() { bool isFromSocialMedia = Convert.ToBoolean(QueryStringHelper.getValue("sm")); if (!isFromSocialMedia) { isFromSocialMedia = TempData["isFromSocialMedia"] == null ? false : (bool)TempData["isFromSocialMedia"]; } ViewBag.isFromSocialMedia = isFromSocialMedia; UserDomainLogic userDomainLogic = new UserDomainLogic(); BusinessDomainLogic businessDomainLogic = new BusinessDomainLogic(); UserProfile userProfile = userDomainLogic.FindUser(UserVariables.LoggedInUserGuid); CommonDomainLogic commonDomainLogic = new CommonDomainLogic(); userProfile.BusinessTypeList = businessDomainLogic.GetBusinessTypes(); userProfile.Cities = commonDomainLogic.GetCities(); userProfile.Cities.Add(new Domain.City { CityGuid = Guid.Empty, CityName = "Other", CityUrlName = "Other" }); ViewBag.isFromSocialMedia = isFromSocialMedia; return(View(userProfile)); }
/// <summary> /// /// </summary> /// <returns></returns> public ActionResult partialLeftPanel() { UserDomainLogic userDomainLogic = new UserDomainLogic(); return(View("_LeftPanel", userDomainLogic.FindUser(UserVariables.LoggedInUserGuid))); }