コード例 #1
0
ファイル: DoorController.cs プロジェクト: sanxchen/MntApp
        public ActionResult Index()
        {
            IEnumerable <SelectListItem> formSigns = new Signing().GetSignDataList(base.EmpNo).Where(k => k.Form.FormId == 16).ToList().Select(c => new SelectListItem()
            {
                Text  = c.Form.BaseEmployee.RealName,
                Value = c.Form.CreateEmpNo
            });

            formSigns = formSigns.Distinct(new PropertyComparer <SelectListItem>("Value"));

            ViewBag.UserList = formSigns;


            //---------------------------
            //BaseServices<Form> formService = new BaseServices<Form>();

            //IEnumerable<SelectListItem> forms = formService.LoadEntities(c => c.FormId == 16 && c.FormStatus == (int)Carlzhu.Iooin.Entity.FORM.Form.StatusEnum.签核中)
            //    .Distinct(new PropertyComparer<Form>("CreateEmpNo"))
            //    .Select(c => new SelectListItem()
            //    {
            //        Text = c.BaseEmployee.RealName,
            //        Value = c.CreateEmpNo
            //    });
            //ViewBag.UserList = forms;



            return(View());
        }