コード例 #1
0
        public IActionResult Create(DeveloperViewModel developer)
        {
            string skillset = "";
            List<JsonValue> skills = JsonConvert.DeserializeObject<List<JsonValue>>(developer.Skills);
            foreach (JsonValue skill in skills)
            {
                string processedSkill = TextFormaterTool.DataPreprocess(skill.value);
                if (processedSkill == "" || processedSkill == null) continue;
                skillset += (processedSkill + ",");
            }
           
            DeveloperModel dev = new DeveloperModel
            {
                DeveloperName = developer.DeveloperName.Trim(),
                DeveloperTypeId = developer.DeveloperType,
                Skills= skillset,
                ProductName=developer.Products,
                ComponentName=developer.Components,
                HardwareName=developer.Platforms,
                PreviousWorks = developer.PreviousWorks,
                //current_workload=0

            };
            int developers = (int)developerRepository.AddDeveloper(dev);

            if (developer.DeveloperType==1)
            {
                return RedirectToAction("SiniorExperiencedDevelopers");
            }
            else if (developer.DeveloperType == 2)
            {
                return RedirectToAction("NewExperiencedDevelopers");
            }
            else
            {
                return RedirectToAction("FreshDevelopers");
            }
            
        }
コード例 #2
0
 public void AddDeveloper(DeveloperCreateModel developer)
 {
     developer.Created   = _dateTime.Now;
     developer.CreatedBy = _currentUserService.Username;
     _developerRepository.AddDeveloper(developer);
 }
コード例 #3
0
 public void AddDeveloper(Developer developer)
 {
     _developerRepository.AddDeveloper(developer);
 }