Exemplo n.º 1
0
        public ActionResult RecordManage()
        {
            DictionaryLogic dictLogic = new DictionaryLogic();
            Guid            pmId      = UserContext.CurrentUser.UserId;

            List <ProjectSelectItem> pList;

            dictLogic.ProjectDictionary(out pList, pmId);
            ViewBag.Projects = new DropDownList(pList, "ProjectId", "ProjectName", true);

            List <EmployeeSelectItem> eList;

            dictLogic.EmployeeDictionary(out eList, pmId);
            ViewBag.Employees = new DropDownList(eList, "EmployeeId", "RealName", true);

            ViewBag.AttendanceTypes = dictLogic.GetDictionaryItems(DictionaryLogic.AttendanceType);

            return(View());
        }
Exemplo n.º 2
0
        //进入页面
        public ActionResult OrganizationManage()
        {
            DictionaryLogic dictLogic = new DictionaryLogic();

            var OrganizationType = dictLogic.GetEnabledDictionaryItems(DictionaryLogic.OrganizationType);

            ViewBag.OrganizationType = new DropDownList(OrganizationType, DictionaryLogic.ValueField, DictionaryLogic.TextField, false);

            List <OrganizationSelectItem> oList;

            dictLogic.OrganizationDictionary(out oList, false);
            ViewBag.parentOrganizations = new DropDownList(oList, "OrganizationId", "OrganizationName", true).SetCustomText(" ");

            List <EmployeeSelectItem> eList;

            dictLogic.EmployeeDictionary(out eList);
            ViewBag.Employees = new DropDownList(eList, "EmployeeId", "RealName", true).SetCustomText(" ");

            return(View());
        }
Exemplo n.º 3
0
        public ActionResult LaborCostManage()
        {
            DictionaryLogic dictLogic = new DictionaryLogic();

            List <EmployeeSelectItem> emps;

            dictLogic.EmployeeDictionary(out emps);
            ViewBag.Employees = emps;

            List <PositionSelectItem> pList;

            dictLogic.PositionDictionary(out pList);
            ViewBag.Positions    = pList;
            ViewBag.PositionList = new DropDownList(pList, "PositionId", "PositionName", false);

            var laborCostList = new List <object>();

            laborCostList.Add(new { TypeId = (int)TargetType.Position, TypeName = "职位" });
            laborCostList.Add(new { TypeId = (int)TargetType.Employee, TypeName = "人员" });
            ViewBag.QueryType  = new DropDownList(laborCostList, "TypeId", "TypeName", true);
            ViewBag.TargetType = new DropDownList(laborCostList, "TypeId", "TypeName", false);

            return(View());
        }