예제 #1
0
 public ActionResult AddConnectDevice(MemberCenterViewModel newconnect)
 {
     if (ModelState.IsValid)
     {
         adminService.AddConnect(newconnect.DeviceId, newconnect.IdCard, User.Identity.Name);
         return(JavaScript("location.reload(true)"));
     }
     else
     {
         return(PartialView("_AddConnectDevice", newconnect));
     }
 }
예제 #2
0
        public ActionResult MemberCenter(string domainId)
        {
            MemberCenterViewModel model = new MemberCenterViewModel();

            if (MemberContext.Member.CardLevel.HasValue)
            {
                model.MemberCard = _memberManager.GetMemberCard(MemberContext.Member.CardLevel.Value);
            }
            else
            {
                SettingsEntity settings = DomainContext.Settings;
                if (settings != null && settings.DefaultMemberCardLevel.HasValue)
                {
                    model.MemberCard = _memberManager.GetMemberCard(settings.DefaultMemberCardLevel.Value);
                }
            }

            return(View(model));
        }
예제 #3
0
        public ActionResult MemberCenter()
        {
            Members user = memberService.GetAccount(User.Identity.Name);

            if (!User.Identity.IsAuthenticated)
            {
                return(RedirectToAction("SignIn", "Home"));
            }
            else if (user.isAdmin == true)
            {
                return(RedirectToAction("AdminMemberCenter", "Platform"));
            }
            else
            {
                MemberCenterViewModel data = new MemberCenterViewModel();
                data.ConnectDevice = adminService.GetConnectTable(User.Identity.Name);
                data.Wears         = adminService.GetElderList();
                data.Account       = memberService.GetAccount(User.Identity.Name);
                return(View(data));
            }
        }
예제 #4
0
        public ActionResult TalentManagement(string loginid, string type, string PersonName, int page = 1)
        {
            if (!string.IsNullOrEmpty(loginid))
            {
                ViewBag.LoginID = loginid;
            }
            else
            {
                ViewBag.LoginID = "";
            }
            if (!string.IsNullOrEmpty(type))
            {
                ViewBag.Type = type;
            }
            else
            {
                ViewBag.Type = "";
            }
            int outID = Convert.ToInt32(Session["ID"]);

            Models.MemberCenterViewModel viewModel    = new MemberCenterViewModel();
            IEnumerable <PersonalInfo>   personalInfo = null;

            if (!string.IsNullOrWhiteSpace(PersonName))
            {
                PersonName            = HttpUtility.UrlDecode(PersonName);
                personalInfo          = personalInfoDAL.GetPersonList(string.Format(" OutsourcingCompanyId='{0}' and IsDelete = 1 and PersonName like '%{1}%' Order By CreateTime DESC", outID, PersonName)).AsQueryable();
                ViewBag.CurrentFilter = PersonName;
            }
            else
            {
                personalInfo = personalInfoDAL.GetPersonList(string.Format(" OutsourcingCompanyId='{0}' and IsDelete = 1 Order By CreateTime DESC", outID)).AsQueryable();
            }
            viewModel.PersonalInfo = personalInfo.ToPagedList(page, 7);
            return(View(viewModel));
        }
예제 #5
0
        /// <summary>
        /// 所属的项目的查询
        /// </summary>
        /// <param name="loginid"></param>
        /// <param name="type"></param>
        /// <param name="StaffName"></param>
        /// <param name="page"></param>
        /// <returns></returns>
        public ActionResult RecManagement(string loginid, string type, string StaffName, int page = 1)
        {
            if (!string.IsNullOrEmpty(loginid))
            {
                ViewBag.LoginID = loginid;
            }
            else
            {
                ViewBag.LoginID = "";
            }
            if (!string.IsNullOrEmpty(type))
            {
                ViewBag.Type = type;
            }
            else
            {
                ViewBag.Type = "";
            }
            int outID = Convert.ToInt32(Session["ID"]);

            Models.MemberCenterViewModel viewModel   = new MemberCenterViewModel();
            IEnumerable <Requirement>    requirement = null;

            if (!string.IsNullOrWhiteSpace(StaffName))
            {
                StaffName             = HttpUtility.UrlDecode(StaffName);
                requirement           = requirementDAL.GetPersonList(string.Format(" b.CompnayId='{0}' AND b.IsDelete=1 and b.ProjectName like '%{1}%'", outID, StaffName)).AsQueryable();
                ViewBag.CurrentFilter = StaffName;
            }
            else
            {
                requirement = requirementDAL.GetPersonList(string.Format("  b.CompnayId='{0}' AND b.IsDelete=1", outID)).AsQueryable();
            }
            viewModel.Requirement = requirement.OrderByDescending(d => d.ArrivalTime.Value).ToPagedList(page, 6);
            return(View(viewModel));
        }