Пример #1
1
        readonly int intCustomerID; //Note that this is a read only Field!

        #endregion Fields

        #region Constructors

        public Customer(int CustomerID, string Name, DateTime DOB, Gender Gender)
        {
            this.intCustomerID = CustomerID; //Read Only fields must be set by the constructor.
            this.Name = Name;
            this.DOB = DOB;
            this.Gender = Gender;
        }
Пример #2
0
 protected Product(string name,string brand,decimal price,Gender gender)
 {
     this.Name = name;
        this.Brand = brand;
        this.Price = price;
        this.Gender = gender;
 }
Пример #3
0
 public Person(Gender gender, int age, List<string> clothes, Sobriety sobriety)
 {
     this.Gender = gender;
     this.Age = age;
     this.Clothes = clothes;
     this.Sobriety = sobriety;
 }
Пример #4
0
 public Person(string name, int age, Gender gender)
     : this()
 {
     this.Name = name;
     this.Age = age;
     this.Gender = gender;
 }
Пример #5
0
 public HomoSapien(Gender sex, DateTime dateofBirth, string name, int height, int weight)
     : base(sex, dateofBirth)
 {
     _name = name;
     _height = height;
     _weight = weight;
 }
Пример #6
0
 public Person(string firstName, string lastName,int age, Gender sex = Gender.NotSpecified)
 {
     this.FirstName = firstName;
     this.LastName = lastName;
     this.Gender = sex;
     this.Age = age;
 }
Пример #7
0
 public void ConvertTest(Gender value, bool expectedResult)
 {
     string argument = expectedResult ? value.ToString() : "";
     var converter = new EnumToBooleanConverter();
     bool converted = (bool)converter.Convert(value, typeof(bool), argument, CultureInfo.CurrentCulture);
     Assert.AreEqual(expectedResult, converted);
 }
Пример #8
0
 public Person(DateTime Birthdate, string Firstname, string Name, Gender Gender)
 {
     this.Birthdate = Birthdate;
     this.Firstname = Firstname;
     this.Name = Name;
     this.Gender = Gender;
 }
Пример #9
0
 public Employee(Branch branch, Position position, PersonName name, Gender gender)
     : base(name)
 {
     _branch = branch;
     _position = position;
     base.Gender = gender;
 }
Пример #10
0
 public Person(string _firstName, string _lastName, int _age, Gender _gender)
 {
     firstName = _firstName;
     lastName = _lastName;
     age = _age;
     gender = _gender;
 }
Пример #11
0
 public Dog(string name, byte age, Gender gender)
     : base(name, age, gender)
 {
     this.Name = name;
     this.Age = age;
     this.Gender = gender;
 }
Пример #12
0
		public string GetNextName(int? count, Gender gender, bool animal, System.Random randomNumber)
		{
			//sets an internal counter and escape
			count = (count ?? 0);
			if (count == 50)
			{
				return "";
			}

			string freshName = "";

			if (animal)
			{
				return animalNames[randomNumber.Next(0, animalNames.Count)];
			}
			else
			{
				freshName = gender == Gender.Female ? femaleNames[randomNumber.Next(0, femaleNames.Count)] : maleNames[randomNumber.Next(0, maleNames.Count)];
				freshName += " " + lastNames[randomNumber.Next(0, lastNames.Count)];
			}

			if (usedNames.Contains(freshName))
			{
				return GetNextName(count + 1, gender, animal, randomNumber);
			}
			else
			{
				usedNames.Add(freshName);
				return freshName;
			}
		}
Пример #13
0
 //constructor
 public PersonBase(string firstName, string lastName, Gender gender, int age=18)
 {
     this.FirstName = firstName;
     this.LastName = lastName;
     this.Gender = gender;
     this.Age = age;
 }
Пример #14
0
 public Adult ( string name , Gender g, bool b )
 {
     sex = g;
     this.name = name;
     children = new List<Child>();
     IsBoring = b;
 }
Пример #15
0
 /// <summary>
 /// Class constructor
 /// </summary>
 /// <param name="names">The first and/or middle names of the person</param>
 /// <param name="lastName">The first last name of the person.</param>
 /// <param name="secondLastName">The second last name of the person.</param>
 /// <param name="gender">The person's gender</param>
 public Person(string names, string lastName, string secondLastName, Gender gender)
 {
     this.Names = names;
     this.LastName = lastName;
     this.SecondLastName = secondLastName;
     this.Gender = gender;
 }
Пример #16
0
    /// <summary>
    /// Adds information about the user/player
    /// </summary>
    /// <param name="gender">
    /// The gender of the user. If the gender is unknown information will not be submitted.
    /// </param>
    /// <param name="birth_year">
    /// The year the user was born. Set to "null" if unknown.
    /// </param>
    /// <param name="country">
    /// The ISO2 country code the user is playing from. See: http://en.wikipedia.org/wiki/ISO_3166-2. Set to "null" if unknown.
    /// </param>
    /// <param name="state">
    /// The code of the country state the user is playing from. Set to "null" if unknown.
    /// </param>
    /// /// <param name="friend_count">
    /// The number of friends in the user's network. Set to "null" if unknown.
    /// </param>
    private void CreateNewUser(Gender gender, int? birth_year, int? friend_count)
    {
        Hashtable parameters = new Hashtable();

        if (gender == Gender.Male)
        {
            parameters.Add(GA_ServerFieldTypes.Fields[GA_ServerFieldTypes.FieldType.Gender], 'M');
        }
        else if (gender == Gender.Female)
        {
            parameters.Add(GA_ServerFieldTypes.Fields[GA_ServerFieldTypes.FieldType.Gender], 'F');
        }

        if (birth_year.HasValue && birth_year.Value != 0)
        {
            parameters.Add(GA_ServerFieldTypes.Fields[GA_ServerFieldTypes.FieldType.Birth_year], birth_year.ToString());
        }

        if (friend_count.HasValue)
        {
            parameters.Add(GA_ServerFieldTypes.Fields[GA_ServerFieldTypes.FieldType.Friend_Count], friend_count.ToString());
        }

        if (parameters.Count == 0)
        {
            GA.LogWarning("GA: No data to send with NewUser event; event will not be added to queue");
            return;
        }

        GA_Queue.AddItem(parameters, GA_Submit.CategoryType.GA_User, false);
    }
 public void SetGender(Gender type)
 {
     if ((Application.platform != RuntimePlatform.OSXEditor) && (Application.platform != RuntimePlatform.WindowsEditor))
     {
         _tdgaSetGender((int) type);
     }
 }
Пример #18
0
 public Person(string firstName, string lastName, int age, Gender gender)
 {
     this.FirstName = firstName;
     this.LastName = lastName;
     this.Age = age;
     this.Gender = gender;
 }
        public void AddContact(string name, string streetAndNumber, short zipCode, string city, Gender gender, DateTime birthDay,
            string phone, string mobile)
        {
            Contact newContact = new Contact()
            {
                Name = name,
                Address = new Address()
                {
                    StreetNumber = streetAndNumber,
                    AddressId = 1,
                    ZipCode = zipCode
                },
                Birthday = birthDay,
                Blocked = false,
                Categories = new List<Category>(),
                Gender = gender,
                Mobile = mobile,
                Phone = phone
            };

            newContact.Address.Contact = newContact;
            ValidateContact(newContact);

            contactRepository.CreateContact(newContact);
        }
Пример #20
0
		public Profile (int heightFeet, int heightInches, int weight, Gender gender)
		{
			this.gender = gender;
			this.weight = weight;
			this.heightFeet = heightFeet;
			this.heightInches = heightInches;
		}
Пример #21
0
        public void Shoud_detect_gender_if_auto_detection_is_set(string middleName, Gender expected)
        {
            var petrovich = new Petrovich {AutoDetectGender = true, MiddleName = middleName};
            petrovich.InflectMiddleNameTo(Case.Accusative);

            Assert.AreEqual(expected, petrovich.Gender);
        }
Пример #22
0
 public Person(string firstName, string lastName, int age, Gender gender)
 {
     _firstName = firstName;
     _lastName = lastName;
     _age = age;
     _gender = gender;
 }
Пример #23
0
 public Animal(string name, int age, Gender sex)
 {
     this.Name = name;
     this.Age = age;
     this.Sex = sex;
     this.Type = AnimalType.Unknown;
 }
Пример #24
0
 public Employee(int EmployeeId, string Name, DateTime DOB, Gender Gender)
 :base(Name, DOB, Gender) 
 {
    this.EmployeeId = EmployeeId;
    // this.Name = Name; This is not needed since the base constructor will be 
     // passed the data in with  :base(Name, DOB, Gender) 
 }
Пример #25
0
 public Person(string Name, DateTime DOB, Gender Gender)
 {
     //NewMethod( Name,  DOB,  Gender); 
     this.Name = Name;
     this.dtDOB = DOB;
     this.Gender = Gender;
 }
Пример #26
0
 public PlayerCharacter(MainWindow main, string name, int birthdate, Dynasty dynasty, int money, Game game, Gender gender)
     : base(name, birthdate, dynasty, money, game, gender)
 {
     this.main = main;
     notificator = new Notificator();
     notificator.Show();
 }
Пример #27
0
 public MoreDetailsCommand(
     Guid userId,
     string firstName,
     string lastName,
     string address,
     string suburb,
     string city,
     string country,
     string postcode,
     Gender gender,
     Orientation orientation,
     bool romance,
     bool friendship)
 {
     UserId = userId;
     FirstName = firstName;
     LastName = lastName;
     Address = address;
     Suburb = suburb;
     City = city;
     Country = country;
     Postcode = postcode;
     Gender = gender;
     Orientation = orientation;
     Romance = romance;
     Friendship = friendship;
 }
Пример #28
0
 public Person(String pName, Gender pGender, MaritalStatus pMaritalStatus, int pEdad)
 {
     this.Name = pName;
     this.Gender = pGender;
     this.MaritalStatus = pMaritalStatus;
     this.Age = pEdad;
 }
Пример #29
0
 /// <summary>
 /// Adds new contact to MagtiFun contacts list
 /// </summary>
 /// <param name="firstName">Person's first name</param>
 /// <param name="lastName">Person's last name</param>
 /// <param name="mobileNumber">Person's phone number</param>
 /// <param name="nickName">Person's nickname</param>
 /// <param name="dateOfBirth">Person's date of birth</param>
 /// <param name="birthDayRemind">Notify or not about new contact's birthday</param>
 /// <param name="gender">Person's gender</param>
 /// <returns>
 /// Response code
 /// </returns>        
 public string AddNewContact(string firstName, string mobileNumber, string nickName="", string lastName="",  DateTime? dateOfBirth=null, bool birthDayRemind=false, Gender gender=Gender.Male)
 {
     using (var handler = new HttpClientHandler { UseCookies = false })
     using (var client = new HttpClient(handler))
     {
         var message = new HttpRequestMessage(HttpMethod.Post, ADD_CONTACT_URL)
         {
             Content = new FormUrlEncodedContent(new[]
             {
                 new KeyValuePair<string, string>("f_name", firstName),
                 new KeyValuePair<string, string>("m_name", nickName),
                 new KeyValuePair<string, string>("l_name", lastName),
                 new KeyValuePair<string, string>("day", dateOfBirth?.Day.ToString()),
                 new KeyValuePair<string, string>("month", dateOfBirth?.Month.ToString()),
                 new KeyValuePair<string, string>("year", dateOfBirth?.Year.ToString()),
                 new KeyValuePair<string, string>("bday_remind", (birthDayRemind ? 1 : 0).ToString()),
                 new KeyValuePair<string, string>("gender", ((int)gender).ToString()),
                 new KeyValuePair<string, string>("mobile_number", mobileNumber)
             })
         };
         message.Headers.Add("Cookie", cookie);
         var result = client.SendAsync(message).Result;
         var responseCode = result.Content.ReadAsStringAsync().Result;
         return responseCode;
     }
 }
Пример #30
0
        public void addPatientYear(Gender gender, double startAge, double endAge)
        {
            int genderInt = gender == Gender.Male ? 1 : 0;
            int startAgeInt = Convert.ToInt32(Math.Truncate(startAge));
            int endAgeInt = Convert.ToInt32(Math.Truncate(endAge));
            if (startAge > startAgeInt)
            {
                double startResidual = (startAgeInt + 1) - startAge;
                table[startAgeInt, genderInt].patientYear += startResidual;
                startAgeInt++;
            }
            if (endAgeInt < 100)
            {
                if (endAge > endAgeInt)
                {
                    double endResidual = endAge - endAgeInt;
                    table[endAgeInt, genderInt].patientYear += endResidual;
                }
            }
            else
            {
                endAgeInt = 100;
            }

            for (int i = startAgeInt; i < endAgeInt; i++)
            {
                table[i, genderInt].patientYear++;
            }
        }
Пример #31
0
 public Person(string Name, DateTime Birthdate, Gender Gender)
 {
     this.Name      = Name;
     this.Birthdate = Birthdate;
     this.Gender    = Gender;
 }
Пример #32
0
 public Person(string firstName, string lastName, Gender genderType)
 {
     FirstName  = firstName;
     LastName   = lastName;
     GenderType = genderType;
 }
Пример #33
0
 public Animal(string n, int a, Gender g)
 {
     this.Name   = n;
     this.Age    = a;
     this.Gender = g;
 }
Пример #34
0
 public Adult(Gender gender) : base(gender)
 {
     _children = new List <Child>();
 }
Пример #35
0
        private bool Nazocnost_profesora()
        {
            con = con = new SqlConnection("Data Source=pc3490ierf43;Initial Catalog=Fakultet_pz;Integrated Security=True");
            con.Open();
            Dtime dt = new Dtime();

            cmd = new SqlCommand
                      (@" SELECT tjedan_nastavnik.Pocetak_konz, tjedan_nastavnik.Kraj_konz,Tjedan.ID,Gender.naziv_spola  FROM 
                tjedan_nastavnik,Nastavnik,Tjedan,Gender
                WHERE Nastavnik.ID=tjedan_nastavnik.Nastavnik_ID AND
                tjedan_nastavnik.TjedanID=Tjedan.ID AND Nastavnik.GenderID=Gender.Spol_ID AND
                Nastavnik.ime=@fname AND
                Nastavnik.prezime=@lname", con);

            cmd.Parameters.Add(new SqlParameter("fname", Getfirstname(listBox1.SelectedItem.ToString())));
            cmd.Parameters.Add(new SqlParameter("lname", Getsurname(listBox1.SelectedItem.ToString())));


            dr = cmd.ExecuteReader();

            while (dr.Read())
            {
                c        = dr[0].ToString();
                d        = dr[1].ToString();
                dan_broj = dr.GetInt32(2);
                spol     = dr.GetString(3);

                if (dan_broj == (int)DateTime.Now.DayOfWeek)   // da izbjegnem polje i strukturiziranje nepotrebno
                {
                    break;
                }
            }

            spol = spol.Trim();
            if (spol == "Male")
            {
                value = Gender.Male;
            }

            if (spol == "Female")
            {
                value = Gender.Female;
            }
            con.Close();



            ts1 = new TimeSpan(dt.GetHours(c), dt.GetMinutes(c), 00);

            ts2 = new TimeSpan(dt.GetHours(d), dt.GetMinutes(d), 00);

            string g = DateTime.Now.ToShortTimeString();      //? kakve su ovo brie



            // pitaj profa jel bi brze radio program ako bi stavi ogranicenje na h tipa od 08 00 do 20 00 ili ne bi imalo bas neku ulogu...
            if (DateTime.Now.TimeOfDay.CompareTo(ts1) == 1 &&
                ts2.CompareTo(DateTime.Now.TimeOfDay) == 1 &&
                dan_broj == (int)DateTime.Now.DayOfWeek)       // ovo tu ne radi jel ovaj populira u petlji samo zadnji red!!!!
            {
                return(true);
            }


            else
            {
                return(false);
            }
        }
Пример #36
0
 private void rbMare_CheckedChanged(object sender, EventArgs e)
 {
     zebraGender = Gender.MARE;
 }
Пример #37
0
 private void rbStallion_CheckedChanged(object sender, EventArgs e)
 {
     zebraGender = Gender.STALLION;
 }
Пример #38
0
 public Teacher(string staffNo, string name, Gender gender, DateTime birthday)
     : base(staffNo, name, gender, birthday)
 {
 }
Пример #39
0
 public System.Threading.Tasks.Task <System.Collections.Generic.ICollection <Person> > Find(Gender gender)
 {
     return(_implementation.FindAsync(gender));
 }
Пример #40
0
        /// <summary>
        /// Get values for all parameters for the constructor and instantiate object with is.
        /// </summary>
        private void AddAnimalItem()
        {
            string   name     = textBox1.Text;
            string   age      = textBox2.Text;
            Gender   gender   = (Gender)GenderBox.SelectedIndex;
            Category category = (Category)CategoryBox.SelectedIndex;

            string item       = ObjectBox.SelectedItem.ToString();
            Animal animalItem = null;

            switch (item)
            {
            case "Cat":
                animalItem = new Cat(name, Int32.Parse(age), gender, category, Int32.Parse(textBox3.Text), Int32.Parse(textBox4.Text));
                break;

            case "Deer":
                animalItem = new Deer(name, Int32.Parse(age), gender, category, Int32.Parse(textBox3.Text), Int32.Parse(textBox4.Text));
                break;

            case "Dog":
                animalItem = new Dog(name, Int32.Parse(age), gender, category, Int32.Parse(textBox3.Text), Int32.Parse(textBox4.Text));
                break;

            case "Lion":
                animalItem = new Lion(name, Int32.Parse(age), gender, category, Int32.Parse(textBox3.Text), Int32.Parse(textBox4.Text));
                break;

            case "Bee":
                animalItem = new Bee(name, Int32.Parse(age), gender, category, Int32.Parse(textBox3.Text), Int32.Parse(textBox4.Text));
                break;

            case "Butterfly":
                animalItem = new Butterfly(name, Int32.Parse(age), gender, category, Int32.Parse(textBox3.Text), Int32.Parse(textBox4.Text));
                break;
            }

            m_animalManager.AddAnimal(animalItem);

            /*
             *  Hämtar ättypen i strängformat och skriver ut korresponderande ord till gränssnittet
             */
            string animalEat = animalItem.GetEaterType().ToString();

            switch (animalEat)
            {
            case "Herbivore":
                eaterBox.Text = "Vegetarian";
                break;

            case "Carnivore":
                eaterBox.Text = "Meat eater";
                break;

            case "Omnivore":
                eaterBox.Text = "All eater";
                break;
            }

            /*
             *  Hämtar tillhörande matschema till den sorts djur som just lagts till och
             *  visar upp matinstruktionerna i gränssnittets matinstruktionsruta
             */
            FoodSchedule animalsFood = animalItem.GetFoodSchedule();

            if (animalsFood != null)
            {
                foodList.DataSource = null;
                foodList.DataSource = animalsFood.FoodDescriptionList;
            }

            foodList.DisplayMember = "FoodDescription";
            UpdateGUI();
            hasSaved = false;
        }
 public record FooWithDefaultConversion(long Id, Gender Gender, double Salary);
 public record FooWithConverters([property: Converter(typeof(CustomConverter))] Gender Gender, string TenantId);
Пример #43
0
 public Sportsman(string name, string surname, DateTime dateOfBirth, Gender gender,
                  int weight, int height) : base(dateOfBirth, gender, height, weight, name, surname)
 {
 }
 public record FooWithDifferentTypes(int Id, string Name, double Age, decimal?Salary, DateTime DayOfBirth,
                                     bool IsEmployed, Guid TenantId, Gender Gender, float FloatValue, DateTimeOffset ChangedDate);
Пример #45
0
 public Employee(string id_, string firstName_, string lastName_, string salary_, string position_, Gender gender_, DateTime dateOfEmployment_)
 {
     id               = id_;
     firstName        = firstName_;
     lastName         = lastName_;
     salary           = salary_;
     position         = position_;
     gender           = gender_;
     dateOfEmployment = dateOfEmployment_;
 }
Пример #46
0
 public static void SetGender(DependencyObject target, Gender value)
 {
     target.SetValue(GenderProperty, value);
 }
Пример #47
0
 public void MapToGenderCorrectly(string genderInfo, Gender expectedMap)
 {
     GenderParser.Parse(genderInfo).ShouldBe(expectedMap);
 }
 public Builder SetGender(Gender gender)
 {
     this.Gender = gender;
     return(this);
 }
Пример #49
0
 public static string Label(this Gender gender)
 {
     return(gender.GetAttribute <GenderAttribute>().label);
 }
Пример #50
0
 public bool CommonalityApproved(Gender g) => Rand.Range(min: 0, max: 100) < (g == Gender.Female ? this.femaleCommonality : this.maleCommonality);
Пример #51
0
 public void TestMultipleParamsWithDictionary(int param1, Gender param2, IDictionary <string, int> param3)
 {
     Console.WriteLine(param1);
     Console.WriteLine(param2);
     Console.WriteLine(param3);
 }
Пример #52
0
        /// <summary>
        /// Runs the code example.
        /// </summary>
        /// <param name="user">The AdWords user.</param>
        /// <param name="adGroupId">Id of the ad group to which criteria are
        /// added.</param>
        public void Run(AdWordsUser user, long adGroupId)
        {
            // Get the AdGroupCriterionService.
            AdGroupCriterionService adGroupCriterionService =
                (AdGroupCriterionService)user.GetService(AdWordsService.v201506.AdGroupCriterionService);

            // Create biddable ad group criterion for gender
            Gender genderTarget = new Gender();

            // Criterion Id for male. The IDs can be found here
            // https://developers.google.com/adwords/api/docs/appendix/genders
            genderTarget.id = 10;

            BiddableAdGroupCriterion genderBiddableAdGroupCriterion = new BiddableAdGroupCriterion();

            genderBiddableAdGroupCriterion.adGroupId = adGroupId;
            genderBiddableAdGroupCriterion.criterion = genderTarget;

            // Create negative ad group criterion for age range
            AgeRange ageRangeNegative = new AgeRange();

            // Criterion Id for age 18 to 24. The IDs can be found here
            // https://developers.google.com/adwords/api/docs/appendix/ages

            ageRangeNegative.id = 503001;
            NegativeAdGroupCriterion ageRangeNegativeAdGroupCriterion = new NegativeAdGroupCriterion();

            ageRangeNegativeAdGroupCriterion.adGroupId = adGroupId;
            ageRangeNegativeAdGroupCriterion.criterion = ageRangeNegative;

            // Create operations.
            AdGroupCriterionOperation genderBiddableAdGroupCriterionOperation =
                new AdGroupCriterionOperation();

            genderBiddableAdGroupCriterionOperation.operand   = genderBiddableAdGroupCriterion;
            genderBiddableAdGroupCriterionOperation.@operator = Operator.ADD;

            AdGroupCriterionOperation ageRangeNegativeAdGroupCriterionOperation =
                new AdGroupCriterionOperation();

            ageRangeNegativeAdGroupCriterionOperation.operand   = ageRangeNegativeAdGroupCriterion;
            ageRangeNegativeAdGroupCriterionOperation.@operator = Operator.ADD;

            AdGroupCriterionOperation[] operations = new AdGroupCriterionOperation[] {
                genderBiddableAdGroupCriterionOperation, ageRangeNegativeAdGroupCriterionOperation
            };

            try {
                // Add ad group criteria.
                AdGroupCriterionReturnValue result = adGroupCriterionService.mutate(operations);

                // Display ad group criteria.
                if (result != null && result.value != null)
                {
                    foreach (AdGroupCriterion adGroupCriterionResult in result.value)
                    {
                        Console.WriteLine("Ad group criterion with ad group id \"{0}\", criterion id " +
                                          "\"{1}\", and type \"{2}\" was added.", adGroupCriterionResult.adGroupId,
                                          adGroupCriterionResult.criterion.id,
                                          adGroupCriterionResult.criterion.CriterionType);
                    }
                }
                else
                {
                    Console.WriteLine("No ad group criteria were added.");
                }
            } catch (Exception e) {
                throw new System.ApplicationException("Failed to create ad group criteria.", e);
            }
        }
 public Employee(int id, securityprivileges security_level, int salary, HiringDate hire_date, Gender gender)
 {
     this.id             = id;
     this.security_level = security_level;
     this.salary         = salary;
     this.hire_date      = hire_date;
     this.gender         = gender;
 }
 // Q2-3 gender引数を追加したコンストラクター
 public Person(string firstName, string lastName, Gender gender)
 {
     FirstName = firstName;
     LastName  = lastName;
     Gender    = gender;
 }
Пример #55
0
 public Dog(int age, string name, Gender gender)
     : base(age, name, gender)
 {
     this.AnimalType = AnimalType.Dog;
 }
        static void Main(string[] args)
        {
            //exError e = new exError();
            HiringDate dat = new HiringDate(3, 11, 1994);



            Employee emp  = new Employee(1, securityprivileges.DBA, 5000, dat, Gender.Male);
            Employee emp2 = new Employee(1, securityprivileges.DBA, 5000, dat, Gender.Male);


            if (emp.Equals(emp2))
            {
                Console.WriteLine("emp1=emp2");
            }
            try
            {
                #region Array
                Employee[] Emparr = new Employee[3];

                for (int i = 0; i < Emparr.Length; i++)
                {
                    Console.Write("Day=");
                    int day = int.Parse(Console.ReadLine());
                    Console.Write("Month=");
                    int month = int.Parse(Console.ReadLine());
                    Console.Write("Year=");
                    int        year = int.Parse(Console.ReadLine());
                    HiringDate dt   = new HiringDate(day, month, year);
                    Console.Write("ID=");
                    int id = int.Parse(Console.ReadLine());

                    securityprivileges ScurityOfficer = securityprivileges.DBA | securityprivileges.Developer | securityprivileges.guest | securityprivileges.secretary;

                    Console.Write("Enter Your Security guest=1, Developer=2, secretary=4 , DBA=8,ScurityOfficer=16");
                    securityprivileges s = (securityprivileges)Enum.Parse(typeof(securityprivileges), Console.ReadLine());
                    if (s == securityprivileges.ScurityOfficer)
                    {
                        s = ScurityOfficer;
                    }

                    Console.Write("Salary=");
                    int salary = int.Parse(Console.ReadLine());

                    Console.WriteLine("Enter Your Gender  Male=1 or Female=2");
                    Gender g = (Gender)Enum.Parse(typeof(Gender), Console.ReadLine());
                    Emparr[i] = new Employee(id, s, salary, dt, g);
                }
                Array.Sort(Emparr);
                foreach (Employee item in Emparr)
                {
                    Console.WriteLine(item.ToString());
                }

                #endregion
            }
            catch (Exception ex)
            {
                StreamWriter sr = new StreamWriter("Error.txt");
                sr.Write(ex.Message);
                sr.Close();
                Console.WriteLine(ex.Message);
            }
        }
Пример #57
0
 public NonInterestNPC(string firstName, string lastName, Gender gender, Sex sex, int age) : base(firstName, lastName, gender, sex, age)
 {
     //TODO
 }
Пример #58
0
 public EmployeeBuilderBase AddGender(Gender gender)
 {
     Employee.Gender = gender;
     return(this);
 }
Пример #59
0
 public GenderBlockConstraint(Gender gender)
 {
     this.genderToBlock = gender;
 }
 /// <summary>
 /// Butterfly constructor
 /// </summary>
 public Butterfly(string name, int age, Gender gender, Category category, int noofeyes, int wingstrokesperminute)
     : base(name, age, gender, category, noofeyes)
 {
     wingStrokesPerMinute = wingstrokesperminute;
 }