示例#1
0
 static void Bulid_PP_SDK()
 {
     PlatformSDK = ProjectPlatform.PP;
     ConfigWindow4IOS obj = ScriptableObject.CreateInstance<ConfigWindow4IOS>();
     if (obj != null)
     {
         obj.Show();
     }
 }
示例#2
0
        // END SKILL CRUD METHODS
        // ######
        // BEGIN ASSIGNREQUEST CRUD METHODS
        public async Task AssignSkillAsync(AssignRequest assignRequest)
        {
            switch (assignRequest.SkillType)
            {
            case Project.LanguageSkill:
                var language = await context.Languages.FirstOrDefaultAsync(l => l.Name == assignRequest.Name);

                if (language == null)
                {
                    language = new Language {
                        Name = assignRequest.Name
                    };
                    language.Slug = language.Name;
                    context.Languages.Add(language);
                    await context.SaveChangesAsync();
                }
                var pl = new ProjectLanguage
                {
                    ProjectId  = assignRequest.ProjectId,
                    LanguageId = language.Id
                };
                context.ProjectLanguages.Add(pl);
                await context.SaveChangesAsync();

                break;

            case Project.PlatformSkill:
                var platform = await context.Platforms.FirstOrDefaultAsync(l => l.Name == assignRequest.Name);

                if (platform == null)
                {
                    platform = new Platform {
                        Name = assignRequest.Name
                    };
                    platform.Slug = platform.Name;
                    context.Platforms.Add(platform);
                    await context.SaveChangesAsync();
                }
                var pp = new ProjectPlatform
                {
                    ProjectId  = assignRequest.ProjectId,
                    PlatformId = platform.Id
                };
                context.ProjectPlatforms.Add(pp);
                await context.SaveChangesAsync();

                break;

            case Project.TechnologySkill:
                var technology = await context.Technologies.FirstOrDefaultAsync(l => l.Name == assignRequest.Name);

                if (technology == null)
                {
                    technology = new Technology {
                        Name = assignRequest.Name
                    };
                    technology.Slug = technology.Name;
                    context.Technologies.Add(technology);
                    await context.SaveChangesAsync();
                }
                var pt = new ProjectTechnology
                {
                    ProjectId    = assignRequest.ProjectId,
                    TechnologyId = technology.Id
                };
                context.ProjectTechnologies.Add(pt);
                await context.SaveChangesAsync();

                break;

            default:
                break;
            }
        }
示例#3
0
        public async Task AssignCategoryAsync(AssignRequest assignRequest)
        {
            switch (assignRequest.CategoryType)
            {
            case Project.LanguageCategory:
                var language = await context.Languages.FirstOrDefaultAsync(la => la.Name == assignRequest.Name);

                if (language == null)
                {
                    language = new Language {
                        Name = assignRequest.Name
                    };
                    await SaveLanuguageAsync(language);
                }
                var lc = new ProjectLanguage
                {
                    ProjectId  = assignRequest.ProjectId,
                    LanguageId = language.Id
                };
                context.ProjectLanguages.Add(lc);
                await context.SaveChangesAsync();

                break;

            case Project.PlatformCategory:
                var platform = await context.Platforms.FirstOrDefaultAsync(plat => plat.Name == assignRequest.Name);

                if (platform == null)
                {
                    platform = new Platform {
                        Name = assignRequest.Name
                    };
                    await SavePlatformAsync(platform);
                }
                var pl = new ProjectPlatform
                {
                    ProjectId  = assignRequest.ProjectId,
                    PlatformId = platform.Id
                };
                context.ProjectPlatforms.Add(pl);
                await context.SaveChangesAsync();

                break;

            case Project.TechnologyCategory:
                var technology = await context.Technologies.FirstOrDefaultAsync(tech => tech.Name == assignRequest.Name);

                if (technology == null)
                {
                    technology = new Technology {
                        Name = assignRequest.Name
                    };
                    await SaveTechnologyAsync(technology);
                }
                var te = new ProjectTechnology
                {
                    ProjectId    = assignRequest.ProjectId,
                    TechnologyId = technology.Id
                };
                context.ProjectTechnologies.Add(te);
                await context.SaveChangesAsync();

                break;

            default:
                break;
            }
        }
示例#4
0
 static void Bulid_iTools()
 {
     PlatformSDK = ProjectPlatform.ITOOLS;
     //PlatformSDK = ProjectPlatform.PP;
 }