public void GetPackListWithWidth1000Test() { var dl = new DictionaryLogic(_jsonLogic); var result = dl.GetPackList(new PackList() { Width = 1000 }); Assert.AreEqual(result.FirstOrDefault().Width, 1000); }
public void NotContainsWordToDictionary(string inputWord) { List <string> inputDictionary = new List <string>() { "rain", "spain", "plain", "plaint" }; DictionaryLogic dictionaryLogic = new DictionaryLogic(inputDictionary, _alphabetUS); bool isContains = dictionaryLogic.Contains(inputWord); Assert.That(isContains, Is.EqualTo(false)); }
protected virtual void GetUserInfo(DictionaryLogic dictLogic) { List <OrganizationSelectItem> oList; List <DepartmentSelectItem> dList; List <PositionSelectItem> pList; dictLogic.OrganizationDictionary(out oList, out dList, out pList); ViewBag.Organizations = new SelectList(oList, "OrganizationId", "OrganizationName"); ViewBag.Departments = new SelectList(dList, "DepartmentId", "DepartmentName"); ViewBag.Positions = new SelectList(pList, "PositionId", "PositionName"); ViewBag.Status = new SelectList( dictLogic.GetEnabledDictionaryItems(DictionaryLogic.EmployeeStatus), DictionaryLogic.ValueField, DictionaryLogic.TextField); }
//进入页面 public ActionResult PositionManage() { DictionaryLogic dictLogic = new DictionaryLogic(); var PositionLevel = dictLogic.GetEnabledDictionaryItems(DictionaryLogic.PositionLevel); ViewBag.PositionLevel = new DropDownList(PositionLevel, DictionaryLogic.ValueField, DictionaryLogic.TextField, true).SetCustomText(" "); List <DepartmentSelectItem> dList; dictLogic.DepartmentDictionary(out dList, true); ViewBag.Departments = new SelectList(dList, "DepartmentId", "DepartmentName"); return(View()); }
//进入页面 public ActionResult DepartmentManage() { DictionaryLogic dictLogic = new DictionaryLogic(); List <DepartmentSelectItem> dList; dictLogic.DepartmentDictionary(out dList, false); ViewBag.parentDepartments = new DropDownList(dList, "DepartmentId", "DepartmentName", true).SetCustomText(" "); List <OrganizationSelectItem> oList; dictLogic.OrganizationDictionary(out oList, false); ViewBag.Organizations = new SelectList(oList, "OrganizationId", "OrganizationName"); return(View()); }
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()); }
//进入页面 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()); }
public ActionResult Record() { DictionaryLogic dlogic = new DictionaryLogic(); ViewBag.AttendanceTypes = new SelectList( dlogic.GetEnabledDictionaryItems(DictionaryLogic.AttendanceType), DictionaryLogic.ValueField, DictionaryLogic.TextField); ProjectLogic plogic = new ProjectLogic(); var projects = plogic.GetProjectStage(UserContext.CurrentUser.UserId); ViewBag.Projects = projects; ViewBag.ProjectSelectList = new SelectList( projects, "ProjectId", "ProjectName"); SettingsLogic slogic = new SettingsLogic(); ViewBag.WorkTimeSetting = slogic.GetEnabledWorkTimeSetting(); return(View()); }
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()); }
public ActionResult ProjectStatistic() { DictionaryLogic dictLogic = new DictionaryLogic(); var projectTypes = dictLogic.GetEnabledDictionaryItems(DictionaryLogic.ProjectType); var projectStatus = dictLogic.GetEnabledDictionaryItems(DictionaryLogic.ProjectStatus); StatisticLogic stsLogic = new StatisticLogic(); ViewBag.TotalHour = stsLogic.GetTotalHour(); //ForRole IUserData user = UserContext.CurrentUser; //资讯设计人员 if (user.HasRole("Consultant")) { ViewBag.forRole = true; var newProjectTypes = new List <DictionaryItem>(); foreach (DictionaryItem dict in projectTypes) { //只能看商业项目和商业项目(转包) if (dict.DictItemId == "101-04" || dict.DictItemId == "101-05") { newProjectTypes.Add(dict); } } ViewBag.QueryProjectTypes = newProjectTypes; } else { ViewBag.forRole = false; ViewBag.QueryProjectTypes = projectTypes; } ViewBag.QueryProjectStatus = projectStatus; return(View()); }
public void WordPotion() { dictionaryLogic = GameObject.Find("GENERAL").GetComponent <DictionaryLogic>(); dictionaryLogic.AddWord("Rouge"); }