public ActionResult getMemberDetails(int memberUserId)
        {
            var mgr     = new AdminMembersRepository();
            var company = mgr.GetOrganizationByUser(int.Parse(User.Identity.Name));
            var list    = mgr.GetMemberDetails(memberUserId, company.Id);

            return(Json(list));
        }
        public ActionResult CheckIfEmailExist(string email)
        {
            var          mgr   = new AdminMembersRepository();
            Organization o     = mgr.GetOrganizationByUser(int.Parse(User.Identity.Name));
            bool         Exist = mgr.CheckIfEmailExist(email, o.Id);

            //True - Email does exist already
            return(Json(Exist, JsonRequestBehavior.AllowGet));
        }
        public ActionResult Index()
        {
            MemberViewModel vm  = new MemberViewModel();
            var             mgr = new AdminMembersRepository();

            vm.Organization      = mgr.GetOrganizationByUser(int.Parse(User.Identity.Name));
            vm.Members           = mgr.GetAllMembers(vm.Organization.Id);
            vm.UserOrganizations = mgr.UserOrgItems(vm.Organization.Id);
            vm.Required          = mgr.GetRequiredItems(int.Parse(User.Identity.Name));
            //vm.Organization = mgr.GetOrganizationByUser(int.Parse(User.Identity.Name));
            return(View(vm));
        }