Exemple #1
0
 public User(Guid id, string name, string email, EGender gender, DateTime birthDate) : base(id)
 {
     Name      = name;
     Email     = email;
     Gender    = gender;
     BirthDate = birthDate;
 }
Exemple #2
0
 public Series(EGender gender, string title, string description, int year)
 {
     Gender      = gender;
     Title       = title;
     Description = description;
     Year        = year;
 }
Exemple #3
0
 private DataObject(int age, string name, EGender gender, bool isHealthy)
 {
     _age       = age;
     _name      = name;
     _gender    = gender;
     _isHealthy = isHealthy;
 }
 public RegisterUserCommand(
     string email,
     string password,
     string fistName,
     string lastName,
     string document,
     EGender gender,
     DateTime birthDate,
     string phone,
     string street,
     string number,
     string neighborhood,
     string city,
     string state,
     string country,
     string zipCode)
 {
     Email        = email;
     Password     = password;
     FistName     = fistName;
     LastName     = lastName;
     Document     = document;
     Gender       = gender;
     BirthDate    = birthDate;
     Phone        = phone;
     Street       = street;
     Number       = number;
     Neighborhood = neighborhood;
     City         = city;
     State        = state;
     Country      = country;
     ZipCode      = zipCode;
 }
        public PartialViewResult Menu(EGender gender           = EGender.UNISEX, Decimal age = 0,
                                      bool categoryOn          = false, ECategory category   = ECategory.OTHERS,
                                      bool brandOn             = false, EBrand brand         = EBrand.UNKNOWN,
                                      Decimal minimumPrice     = 0, Decimal maximumPrice     = 0,
                                      EColorSeries colorSeries = EColorSeries.ANY, string keyword = "")
        {
            ViewBag.CategoryOn       = categoryOn;
            ViewBag.SelectedCategory = category;

            IEnumerable <ECategory> categories      = repository.Products.Select(x => x.Category).Distinct().OrderBy(x => x);
            IEnumerable <string>    categoryStrings = CategoryClass.Categories.Select(x => x.Value.Item2);
            NavFilterViewModel      navViewModel    = new NavFilterViewModel()
            {
                Gender          = gender,
                Age             = age,
                CategoryOn      = categoryOn,
                Category        = category,
                BrandOn         = brandOn,
                Brand           = brand,
                MinimumPrice    = minimumPrice,
                MaximumPrice    = maximumPrice,
                ColorSeries     = colorSeries,
                KeyWord         = keyword,
                CategoryStrings = categoryStrings.ToArray()
            };

            return(PartialView(categoryStrings.ToList()));
        }
 public EditUserCommand(Guid id, string name, string email, EGender gender)
 {
     Id     = id;
     Name   = name;
     Email  = email;
     Gender = gender;
 }
Exemple #7
0
        public bool AddUser(HttpRequest request, string firstName, string lastname, string email, string username, string password, DateTime? birthdate, EGender eGender)
        {
            CD_Users user = new CD_Users();
            user.FirstName = firstName;
            user.LastName = lastname;
            user.Email = email;
            user.Username = username;
            SaltedHash saltedHash = new SaltedHash();
            string hashedPassword = string.Empty;
            string salt = string.Empty;

            saltedHash.GetHashAndSaltString(password, out hashedPassword, out salt);
            user.Password = hashedPassword;
            user.Salt = salt;
            user.BirthDate = birthdate;
            if (birthdate.HasValue)
            {
                user.BirthDateHeb = birthdate.Value.ToHebrewJewishDateString(true);
            }
            user.EGenderID = (int)eGender;
            user.LastVisitDate = DateTime.Now;
            user.TimeStamp = DateTime.Now;
            user.LastVisitIP = Utils.GetClientIPAddress(request);

            CD_DAL.Users.UsersDAL dal = new CD_DAL.Users.UsersDAL();
               int affectedRows = dal.AddNewUser(user);
               return affectedRows == 1;
        }
        private static void GenerateAudioID(DummyCharacter character, String barkClipname, out String category, out String audioID)
        {
            String text = character.Race.ToString().ToLowerInvariant();

            text = Char.ToUpperInvariant(text[0]) + text.Remove(0, 1);
            String text2 = character.Gender.ToString().ToLowerInvariant();

            text2 = Char.ToUpperInvariant(text2[0]) + text2.Remove(0, 1);
            String text3 = character.Voice.ToString().ToLowerInvariant();

            text3    = Char.ToUpperInvariant(text3[0]) + text3.Remove(0, 1);
            category = "Bark" + text + text2 + text3;
            audioID  = String.Concat(new String[]
            {
                text,
                "_",
                text2,
                "_",
                text3,
                "_",
                barkClipname
            });
            m_LastRace         = character.Race;
            m_LastGender       = character.Gender;
            m_LastVoiceSetting = character.Voice;
            m_LastPlayedBark   = audioID;
        }
Exemple #9
0
 public void SetGender(EGender gender)
 {
     if (gender == EGender.NotSpecified)
     {
         return;
     }
     Gender = gender;
 }
Exemple #10
0
 public Administrator(string password, BankAccount bankAccount, decimal earnings,
                      Name name, string email, DateTime birthDate, EGender gender, string notes, Address address)
     : base(name, email, birthDate, gender, notes, address)
 {
     Password    = password;
     BankAccount = bankAccount;
     Earnings    = earnings;
 }
Exemple #11
0
 public NineStarKiModel CalculateNineStarKiProfile(DateTime dateOfBirth, EGender gender = EGender.Male)
 {
     return CalculateNineStarKiProfile(new PersonModel
     {
         DateOfBirth = dateOfBirth,
         Gender = gender
     });
 }
 public static bool IsYin(this EGender gender)
 {
     return(new List <EGender>
     {
         EGender.Female,
         EGender.Other,
     }.Contains(gender));
 }
 public FriendBaseBO(string firstName, string lastName, string email, EGender gender, EventBase eventBase)
 {
     mEventBase = eventBase;
     mFirstName = firstName;
     mLastName  = lastName;
     mEmail     = email;
     mGender    = gender;
 }
Exemple #14
0
 public Teacher(string password, BankAccount bankAccount, decimal earnings,
                Name name, string email, DateTime birthDate, EGender gender, string notes, Address address)
     : base(name, email, birthDate, gender, notes, address)
 {
     Password    = EncryptPassword(password);
     BankAccount = bankAccount;
     Earnings    = earnings;
 }
Exemple #15
0
 protected void UpdatePerson(Name name, string email, DateTime birthDate, EGender gender, string notes)
 {
     Name      = name;
     Email     = email;
     BirthDate = birthDate;
     Gender    = gender;
     Notes     = notes;
 }
Exemple #16
0
 public UIElement Create(EGender iGender)
 {
     return(new Label
     {
         Margin = new Thickness(10),
         Content = String.Format(Value, new GenderFormat(iGender))
     });
 }
 public CreateUserCommand(string name, string email, string password, EGender gender, DateTime birthDate)
 {
     Name      = name;
     Email     = email;
     Password  = password;
     Gender    = gender;
     BirthDate = birthDate;
 }
Exemple #18
0
 public GetUserResponse(Guid id, string name, string email, string password, EGender gender, DateTime birthDate)
 {
     Id        = id;
     Name      = name;
     Email     = email;
     Password  = password;
     BirthDate = birthDate;
     Gender    = gender;
 }
Exemple #19
0
 public User(string name, string email, string password, EGender gender, DateTime birthDate)
     : base()
 {
     Name      = name;
     Email     = email;
     Password  = password;
     Gender    = gender;
     BirthDate = birthDate;
 }
Exemple #20
0
 public Employee(Guid id, Name fullName, DateTime birthDate, string email, EGender gender, List <EmployeeSkill> employeeSkills)
 {
     Id             = id;
     FullName       = fullName;
     BirthDate      = birthDate;
     Email          = email;
     Gender         = gender;
     EmployeeSkills = employeeSkills;
 }
 public void UpdateStudent(Name father, Name mother, Payment payment,
                           Name name, string email, DateTime birthDate, EGender gender,
                           string notes)
 {
     Father  = father;
     Mother  = mother;
     Payment = payment;
     UpdatePerson(name, email, birthDate, gender, notes);
 }
 public Student(Name father, Name mother, Payment payment,
                Name name, string email, DateTime birthDate, EGender gender,
                string notes)
     : base(name, email, birthDate, gender, notes, null)
 {
     Father  = father;
     Mother  = mother;
     Payment = payment;
 }
Exemple #23
0
 public User(string name, ERole role, Organization organization, DateTime dateOfBirth, EGender gender, string bio)
 {
     Name         = name;
     Role         = role;
     Organization = organization;
     DateOfBirth  = dateOfBirth;
     Gender       = gender;
     Bio          = bio;
 }
Exemple #24
0
 public Player(string name, EGender gender)
 {
     Name = name;
     Gender = gender;
     _yourHand = new List<Card>();
     _inPlayCarried = new List<Card>();
     _inPlayEquipped = new List<Card>();
     _dynamicActions = new List<DynamicAction>();
 }
 public Employee(string name, string secondName, string middleName, EGender gender, DateTime birthDate, Division division)
 {
     Name       = name;
     SecondName = secondName;
     MiddleName = middleName;
     Gender     = gender;
     BirthDate  = birthDate;
     Division   = division;
 }
Exemple #26
0
 public static bool IsYin(this EGender gender)
 {
     return(new List <EGender>
     {
         EGender.Female,
         EGender.TransFemale,
         EGender.Hermaphrodite
     }.Contains(gender));
 }
Exemple #27
0
        public JsonHero()
        {
            dungeonLevel = Game.maxDungeonLevel;

            name                 = Game.player.name;
            attack               = Game.player.attack;
            evasion              = Game.player.evasion;
            blocking             = Game.player.blocking;
            accuracy             = Game.player.accuracy;
            criticalChance       = Game.player.criticalChance;
            gold                 = Game.player.currentGold;
            level                = Game.player.specification.level;
            helth                = Game.player.helth;
            maxHelth             = Game.player.maxHelth;
            mana                 = Game.player.mana;
            maxMana              = Game.player.maxMana;
            currentExp           = Game.player.specification.currentExp;
            maxExp               = Game.player.specification.maxExp;
            gender               = Game.player.specification.gender;
            specialization       = Game.player.specification.specialization;
            race                 = Game.player.specification.race;
            strength             = Game.player.specification.strength;
            agility              = Game.player.specification.agility;
            intelligence         = Game.player.specification.intelligence;
            spellPower           = Game.player.specification.spellPower;
            levelPoint           = Game.player.specification.levelPoint;
            strengthMultiply     = Game.player.specification.strengthMultiply;
            agilityMultiply      = Game.player.specification.agilityMultiply;
            intelligenceMultiply = Game.player.specification.intelligenceMultiply;
            activeHelmet         = Game.player.inventory.activeHelmet.name;
            activeArmor          = Game.player.inventory.activeArmor.name;
            activeWeapon         = Game.player.inventory.activeWeapon.name;

            itemsCount = Game.player.inventory.items.Count;
            itemsName  = new List <string>();
            for (int i = 0; i < itemsCount; ++i)
            {
                itemsName.Add(Game.player.inventory.items[i].name);
            }

            perksCount = Game.player.perksSystem.perks.Count;
            perksValue = new List <EPerkValue>();
            for (int i = 0; i < perksCount; ++i)
            {
                perksValue.Add(Game.player.perksSystem.perks[i].value);
            }

            magicCount = Game.player.magicSystem.availibleMagics.Count;
            magicsName = new List <string>();
            for (int i = 0; i < magicCount; ++i)
            {
                magicsName.Add(Game.player.magicSystem.availibleMagics[i].name);
            }

            activeMagicsName = Game.player.magicSystem.activeMagic.name;
        }
Exemple #28
0
        public static ListItem GetListItem(EGender type, bool selected)
        {
            var item = new ListItem(GetText(type), GetValue(type));

            if (selected)
            {
                item.Selected = true;
            }
            return(item);
        }
Exemple #29
0
 public User(Guid id, string name, string email, string password, EGender gender, DateTime birthDate,
             DateTime createdOn, DateTime?updatedOn)
     : base(id, createdOn, updatedOn)
 {
     Name      = name;
     Email     = email;
     Password  = password;
     Gender    = gender;
     BirthDate = birthDate;
 }
Exemple #30
0
 /// <summary>
 /// Class Constructor
 /// </summary>
 public CharacterData(long IdIn, string NameIn, string FlavorIn, ERace RaceIn, EClass ClassIn, EGender GenderIn, decimal ActivatedIn)
 {
     Id        = IdIn;
     Name      = NameIn;
     Flavor    = FlavorIn;
     Race      = RaceIn;
     Class     = ClassIn;
     Gender    = GenderIn;
     Activated = ActivatedIn;
 }
Exemple #31
0
        private NineStarKiEnergy ProcessEnergy(int energyNumber, EGender gender, ENineStarKiEnergyType type = ENineStarKiEnergyType.MainEnergy)
        {
            energyNumber = LoopEnergyNumber(energyNumber);
            if (gender.IsYin())
            {
                energyNumber = InvertEnergy(energyNumber);
            }

            return(new NineStarKiEnergy((ENineStarKiEnergy)energyNumber, type, PersonModel.IsAdult()));
        }
Exemple #32
0
 protected Person(Name name, string email, DateTime birthDate, EGender gender, string notes, Address address)
 {
     Name        = name;
     Email       = email;
     BirthDate   = birthDate;
     Gender      = gender;
     DateEntered = DateTime.Now;
     Notes       = notes;
     Address     = address;
 }
Exemple #33
0
        /// <summary>
        /// Factory method from which Humans are created
        /// </summary>
        /// <param name="gender">Gender of the Human to create</param>
        /// <param name="age">Age in Years of the Human to create (1-110)</param>
        /// <param name="homeCell">HomeCell of the Human to create</param>
        /// <returns>The newly created Human struct</returns>
        public static Human Create(EGender gender, int age, int homeCell)
        {
            var human = new Human(homeCell);

            human.SetGender(gender);
            human.SetAge(age);
            human.SetDeath(false);
            if (human.GetAge() == EAge.Baby)
            {
                human.SetMindset(EMindset.Stationary);
            }
            else if (human.GetAge() == EAge.Child)
            {
                human.SetProfession(EProfession.Pupil);
                human.SetMindset(EMindset.Working);
            }
            else if (human.GetAge() == EAge.Adult)
            {
                int result = RANDOM.Next(100);
                if (result < 10)
                {
                    human.SetProfession(EProfession.Student); //10%
                    human.SetMindset(EMindset.Working);
                }
                else if (result < 35)
                {
                    human.SetProfession(EProfession.Plumber); //25%
                    human.SetMindset(EMindset.Working);
                }
                else if (result < 60)
                {
                    human.SetProfession(EProfession.DeskJobber); //25%
                    human.SetMindset(EMindset.Working);
                }
                else if (result < 80)
                {
                    human.SetProfession(EProfession.Commuter); //20%
                    human.SetMindset(EMindset.Working);
                }
                else if (result < 90)
                {
                    human.SetProfession(EProfession.TravellingSalesman);//10%
                    human.SetMindset(EMindset.Working);
                }
                else
                {
                    human.SetProfession(EProfession.Housewife); //10%
                    human.SetMindset(EMindset.Working);
                }
            }
            else if (human.GetAge() == EAge.Senior)
            {
                human.SetProfession(EProfession.Unemployed);
                human.SetMindset(EMindset.HomeStaying);
            }

            return human;
        }
Exemple #34
0
 private void SetGender(EGender gender)
 {
     _data0 = (byte)((_data0 & ~MASK_GENDER) + (byte)gender);
 }