Exemplo n.º 1
0
 public static string ExpandText(string input, GenderData genderData)
 {
     return(input.Replace("{s}", genderData.PronounGenitive).Replace("{e}", genderData.Pronoun)
            .Replace("{S}", Capitalise(genderData.PronounGenitive)).Replace("{E}", Capitalise(genderData.Pronoun))
            .Replace("{a}", genderData.PronounAcc).Replace("{r}", genderData.PronounReflexive)
            .Replace("{A}", Capitalise(genderData.PronounAcc)).Replace("{R}", Capitalise(genderData.PronounReflexive))
            );
 }
Exemplo n.º 2
0
        protected override void Seed(DurandalAuthDbContext context)
        {
            var userManager = new UserManager <UserProfile>(new UserStore <UserProfile>(context));
            var roleManager = new RoleManager <IdentityRole>(new RoleStore <IdentityRole>(context));

            if (!roleManager.RoleExists("Administrator"))
            {
                roleManager.Create(new IdentityRole("Administrator"));
            }

            if (!roleManager.RoleExists("User"))
            {
                roleManager.Create(new IdentityRole("User"));
            }

            if (userManager.FindByName("admin") == null)
            {
                var user = new UserProfile {
                    UserName = "******", Email = "*****@*****.**", EmailConfirmed = true
                };
                var result = userManager.Create(user, "admin1234");
                if (result.Succeeded)
                {
                    userManager.AddToRole(user.Id, "Administrator");
                }
            }

            var uow = new DurandalAuthDbContext();

            var hasChanges = false;

            //SetCategoryData(uow);
            ProvinceData.SetProvinceData(uow, ref hasChanges);
            GenderData.SetGenderData(uow, ref hasChanges);
            // EthnicityData.SetEthnicityData(uow, ref hasChanges);
            //LanguageData.SetLanguageData(uow, ref hasChanges);
            EmploymentData.SetEmploymentStatus(uow, ref hasChanges);

            /* PsiraGradeData.SetPsiraGradeData(uow, ref hasChanges);
             * SecurityTrainingData.SetSecurityTrainingData(uow, ref hasChanges);*/
            DecisionData.SetYesNoLookupData(uow, ref hasChanges);
            //PsiraCategoryData.SetPsiraCategoryLookup(uow, ref hasChanges);
            //CityData.SetCityNameData(uow, ref hasChanges);
            AddressData.SetAddressData(uow, ref hasChanges);
            //MaritalStatusData.SetMaritalStatusData(uow, ref hasChanges);
            EntityTypeData.SetEntityData(uow, ref hasChanges);
            TitleData.SetTitleData(uow, ref hasChanges);

            if (hasChanges)
            {
                uow.SaveChanges();
            }
        }
Exemplo n.º 3
0
        public override string ToString()
        {
            string result = "MatrixTechs Object:\r\n";

            result += string.Format("{0} Records | {1} Filtered Records | {2} Hospitals | {3} Filtered Hospitals\r\n",
                                    RecordCount, FilteredRecordCount, HospitalCount, FilteredHospitalCount);
            result += "Implant Date Table:\r\nYear\tRecords\tPercentage\r\n";
            result  = ImplantData.Aggregate(result, (current, implantRecord) => current + string.Format("{0}\t{1}\t{2:P2}\r\n", implantRecord.Item1, implantRecord.Item2, implantRecord.Item3));
            result += string.Format("Total\t{0}\t{1:P2}\r\n\r\n", ImplantData.Sum(s => s.Item2), ImplantData.Sum(s => s.Item3));
            result += "Gender Table:\r\nGender\tRecords\tPercentage\r\n";
            result  = GenderData.Aggregate(result, (current, genderRecord) => current + string.Format("{0}\t{1}\t{2:P2}\r\n", genderRecord.Item1, genderRecord.Item2, genderRecord.Item3));
            result += string.Format("Total\t{0}\t{1:P2}\r\n\r\n", GenderData.Sum(s => s.Item2), GenderData.Sum(s => s.Item3));

            return(result);
        }
Exemplo n.º 4
0
    public void Create()
    {
        randomPerson.sex = (Person.Sex)Random.Range(0, Enum.GetValues(typeof(Person.Sex)).Length);

        GenderData genderData = (randomPerson.sex == Person.Sex.Male) ? maleData : femaleData;

        randomPerson.sprite    = genderData.sprites[Random.Range(0, genderData.sprites.Count)];
        randomPerson.firstName = genderData.firstNames[Random.Range(0, genderData.firstNames.Count)];
        randomPerson.surname   = surnames[Random.Range(0, surnames.Count)];

        randomPerson.birthDate = CreateBirthDate();

        Nation nation = nations[Random.Range(0, nations.Count)];

        randomPerson.country = nation.name;
        randomPerson.city    = nation.cities[Random.Range(0, nation.cities.Length)];

        randomPerson.id = CreateID();
    }
Exemplo n.º 5
0
 public RowData()
 {
     Man = new GenderData() { Column36 = 63, Column60 = 74, Column99 = 85, Sex = 1 };
     Woman = new GenderData() { Column36 = 96, Column60 = 107, Column99 = 118, Sex = 2 };
 }
Exemplo n.º 6
0
 public void Accumulate(GenderData data)
 {
     Kol36 += data.Kol36;
     Kol60 += data.Kol60;
     Kol99 += data.Kol99;
 }
Exemplo n.º 7
0
 public RowData()
 {
     Man = new GenderData() { Sex = 1, TotalColumn = 24, PlanColumn = 41, DoneColumn = 58 };
     Woman = new GenderData() { Sex = 2, TotalColumn = 72, PlanColumn = 89, DoneColumn = 106 };
 }
Exemplo n.º 8
0
 public void Accumulate(GenderData data)
 {
     Total += data.Total;
     Plan += data.Plan;
     Done += data.Done;
 }
Exemplo n.º 9
0
 public RowData()
 {
     Man = new GenderData() {Column36 = 57, Column60 = 68, Column99 = 79, Sex = 1};
     Woman = new GenderData() { Column36 = 90, Column60 = 101, Column99 = 112, Sex = 2 };
 }
Exemplo n.º 10
0
 public RowData()
 {
     Man = new GenderData() { Column36 = 96, Column60 = 107, Column99 = 118, Sex = 1 };
     Woman = new GenderData() { Column36 = 129, Column60 = 140, Column99 = 151, Sex = 2 };
 }