예제 #1
0
        public ActionResult getHighlightedProfiles()
        {
            string strGender = "admin"; // Mugurtham admin, Sangam admin, public user

            Mugurtham.Core.Login.LoggedInUser objLoggedIn = (Mugurtham.Core.Login.LoggedInUser)Session["LoggedInUser"];
            if (objLoggedIn.roleID == Constants.RoleIDForUserProfile) // User Profiles
            {
                if (!string.IsNullOrWhiteSpace(objLoggedIn.BasicInfoCoreEntity.Gender))
                {
                    if (objLoggedIn.BasicInfoCoreEntity.Gender.ToLower().Trim() == "male".ToLower().Trim())
                    {
                        strGender = "female";
                    }
                    else
                    {
                        strGender = "male";
                    }
                }
            }
            ProfileCore            objProfileCore            = new ProfileCore(ref objLoggedIn);
            ProfileBasicViewEntity objProfileBasicViewEntity = new ProfileBasicViewEntity();

            using (objProfileCore as IDisposable)
            {
                objProfileCore.GetHighlightedProfiles(objLoggedIn.ConnectionString, strGender,
                                                      objLoggedIn.sangamID,
                                                      ref objProfileBasicViewEntity,
                                                      ref objLoggedIn
                                                      );
            }
            objProfileCore = null;
            return(this.Json(objProfileBasicViewEntity, JsonRequestBehavior.AllowGet));
        }