Ejemplo n.º 1
0
        public void ConfirmRequest(FriendBM frnd)
        {
            FriendBL frnbl = new FriendBL();

            //cast list to ienumearble call create Friend req
            frnbl.ConfirmFriendRequest(frnd);
        }
Ejemplo n.º 2
0
        public void AddFriend(FriendBM frnd)
        {
            FriendBL frnbl = new FriendBL();
            List<FriendBM> lsFrndReq = new List<FriendBM>();

            frnd.CreationDate = DateTime.Now;
            frnd.FriendShipStatusId = (int)FriendShipStatus.Pending;
            lsFrndReq.Add(frnd);
            lsFrndReq.Add(GetOtherBM(frnd));

            //cast list to ienumearble call create Friend req
            frnbl.CreateFriendrequest(lsFrndReq);
        }
Ejemplo n.º 3
0
 public void DeleteFriend(FriendBM frnd)
 {
     FriendBL frnbl = new FriendBL();
     frnbl.DeleteFriend(frnd);
 }
Ejemplo n.º 4
0
        public ActionResult People(GlobalSearchText GlobalSearchText, int RecordsToTake, int RecordsToSkip, List<DataTableConfig> Columns)
        {
            List<FriendBM> people = new List<FriendBM>();

            string _searchtext = GlobalSearchText.value != null ? GlobalSearchText.value : SessionManager.InstanceCreator.Get<string>("SearchText").ToString();

            FriendBL frnd = new FriendBL();
            DataTableParams param = new DataTableParams();
            param.RecordsToSkip = RecordsToSkip;
            param.RecordsToTake = RecordsToTake;
            param.SearchOptions = GlobalSearchText;
            param.ColumnConfiguration = Columns;
            people = frnd.GetUsersWithFriendStatus(_searchtext, CurrentUser.Id, param);
            return Json(people);
        }
Ejemplo n.º 5
0
        public JsonResult LoadUserProfileDetail(int Id)
        {
            LatestTechnologyBL latestTechnologyBL = new BL.BusinessLayer.LatestTechnologyBL();
            UserPostBL userPostBL = new BL.BusinessLayer.UserPostBL();
            FriendBL friendBL = new FriendBL();

            LatestTutorialsBL LatestTutorialsBL = new BL.BusinessLayer.LatestTutorialsBL();
            UserProfileModel Model = new UserProfileModel();
            Model.User = UserBL.GetUserById(Id);
            Model.UserGeneralInformation = UserGeneralInformationBL.GetGeneralInformationByUserId(Id);
            Model.UserPersonalInformationBM = UserPersonalInformationBL.GetPersonalInformationByUserId(Id);
            Model.LatestTechnologyBMList = latestTechnologyBL.GetTechnologyByUserId(Id);
            Model.LatestTutorialsBMList = LatestTutorialsBL.GetTechnologyByUserId(Id);
            Model.UserPostList = userPostBL.GetUserPost().Where(a => a.UserId == Id).ToList();
            Model.FriendList = friendBL.GetAllFriends(Id);

            Model.UserProfessionalQualificationBM = UserProfessionalQualificationBL.GetProfessionalQualificationByUserId(Id);

            return Json(Model, JsonRequestBehavior.AllowGet);
        }
Ejemplo n.º 6
0
        public JsonResult GetUserCountByName(string SearchTable)
        {
            string SearchBy = SearchTable == "" ? SessionManager.InstanceCreator.Get<string>("SearchText").ToString() : SearchTable;
            FriendBL frndBL = new FriendBL();
            string _searchtext = SearchBy;

            return Json(frndBL.GetUserCountByName(_searchtext), JsonRequestBehavior.AllowGet);
        }
Ejemplo n.º 7
0
 public JsonResult GetTotalFriendCount()
 {
     FriendBL frndBL = new FriendBL();
     return Json(frndBL.GetFriendCountById(CurrentUser.Id), JsonRequestBehavior.AllowGet);
 }
Ejemplo n.º 8
0
        public JsonResult GetFriends(GlobalSearchText GlobalSearchText, int RecordsToTake, int RecordsToSkip, List<DataTableConfig> Columns)
        {
            FriendBL frndBL = new FriendBL();
            List<FriendBM> lsFrndBM = new List<FriendBM>();
            DataTableParams param = new DataTableParams();
            param.RecordsToSkip = RecordsToSkip;
            param.RecordsToTake = RecordsToTake;
            param.SearchOptions = GlobalSearchText;
            param.ColumnConfiguration = Columns;
            UserBM CurrentUser = SessionManager.InstanceCreator.Get<UserBM>(SessionKey.User);

            lsFrndBM = frndBL.GetFriendListById(CurrentUser.Id, param);

            return Json(lsFrndBM);
        }
Ejemplo n.º 9
0
 public JsonResult GetFriendequests()
 {
     FriendBL frnd = new FriendBL();
     return Json(frnd.GetNewFriends(CurrentUser.Id), JsonRequestBehavior.AllowGet);
 }