Exemple #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Username.Length != 0)
            {
                hash ^= Username.GetHashCode();
            }
            if (Email.Length != 0)
            {
                hash ^= Email.GetHashCode();
            }
            if (YearOfBirth != 0)
            {
                hash ^= YearOfBirth.GetHashCode();
            }
            if (LibraryId.Length != 0)
            {
                hash ^= LibraryId.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemple #2
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Id.Length != 0)
            {
                hash ^= Id.GetHashCode();
            }
            if (Name.Length != 0)
            {
                hash ^= Name.GetHashCode();
            }
            if (Motto.Length != 0)
            {
                hash ^= Motto.GetHashCode();
            }
            if (YearOfBirth != 0)
            {
                hash ^= YearOfBirth.GetHashCode();
            }
            if (CareerStartYear != 0)
            {
                hash ^= CareerStartYear.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
 /// <summary>
 /// Convert student into string
 /// </summary>
 /// <returns> student's string </returns>
 public override string ToString()
 {
     return(Name + '\t' +
            Surname + '\t' +
            YearOfBirth.ToString() + '\t' +
            NumberOfKnownProgLang.ToString() + '\t' +
            PhoneNumber + '\n');
 }
Exemple #4
0
        public string[] getBirthdayDetaisl()
        {
            if (!(Birthdate is null))
            {
                DateTime Birth = Convert.ToDateTime(Birthdate);
                return(new string[] { "Data de Nascimento:", Birth.ToString("dd-MM-yyyy") });
            }

            return(new string[] { "Ano Aproximado de Nascimento:", YearOfBirth.ToString() });
        }
Exemple #5
0
        public EditPlayer(Player editPlayer)
        {
            InitializeComponent();
            ComboBoxAgeCategory.ItemsSource = Enum.GetValues(typeof(Interfaces.AgeCategory)).Cast <Interfaces.AgeCategory>().ToList <Interfaces.AgeCategory>();
            Krp         = editPlayer.KrpId;
            TitleBefore = editPlayer.TitleBefore;
            FirstName   = editPlayer.FirstName;
            LastName    = editPlayer.LastName;
            YearOfBirth = editPlayer.YearOfBirth;
            AgeCategory = editPlayer.AgeCategory;
            Club        = editPlayer.ClubId.ToString();

            TextBoxKrp.Text          = Krp.ToString();
            TextBoxTitleBefore.Text  = TitleBefore;
            TextBoxFirstName.Text    = FirstName;
            TextBoxLastName.Text     = LastName;
            TextBoxYearOfBirth.Text  = YearOfBirth.ToString();
            ComboBoxAgeCategory.Text = AgeCategory.ToString();
            ComboBoxClub.Text        = Club.ToString();
        }
 public PaymentInfoPage FillPersonalInfoForm()
 {
     Email.SendKeys(evoUser.Email);
     Password.SendKeys(evoUser.Password);
     ConfirmPassword.SendKeys(evoUser.ComfirmPassword);
     FirstName.SendKeys(evoUser.FirstName);
     LastName.SendKeys(evoUser.LastName);
     MonthOfBirth.SelectByValue(evoUser.MonthOfBirth);
     DateOfBirth.SelectByValue(evoUser.DateOfBirth);
     YearOfBirth.SelectByValue(evoUser.YearOfBirth);
     GenderMale.Click();
     Address.SendKeys(evoUser.HomeAddress);
     City.SendKeys(evoUser.City);
     PostalCode.SendKeys(evoUser.PostalCode);
     PhoneNumber.SendKeys(evoUser.PhoneNumber);
     DriverLicense.SendKeys(evoUser.DriverLicense);
     MonthOfExpire.SelectByValue(evoUser.MonthOfExpire);
     DateOfExpire.SelectByValue(evoUser.DateOfExpire);
     YearOfExpire.SelectByValue(evoUser.YearOfExpire);
     BtnNextStep.Click();
     return(new PaymentInfoPage());
 }
 public override string ToString()
 {
     return(string.Format("{0} {1} {2} {3}", LastName, FirstName, YearOfBirth.ToString(), MonthOfBirth.ToString()));
 }
        public CCalcGradesWnd(long GroupId, List <CMemberInTotal> CompMembers)
        {
            InitializeComponent();

            m_CompMembers = CompMembers;
            m_GroupId     = GroupId;

            foreach (int YearOfBirth in (from member in m_CompMembers
                                         where member.MemberInfo.YearOfBirth.HasValue
                                         group member by member.MemberInfo.YearOfBirth.Value into memberYearOfBirths
                                         orderby memberYearOfBirths.Key
                                         select memberYearOfBirths.Key))
            {
                FilterPredicate NewPredicate = new FilterPredicate()
                {
                    Name        = YearOfBirth.ToString(),
                    FilterValue = YearOfBirth,
                    IsSelected  = YearOfBirth <= (DateTime.Today.Year - DBManagerApp.m_AppSettings.m_Settings.MinAgeToCalcResultGrade)
                };
                NewPredicate.PropertyChanged += CompYear_PropertyChanged;
                CompYears.Add(NewPredicate);
            }

            CompYear_PropertyChanged(this, null);

            GlobalDefines.TuneComboboxWidth2(cmbResultGradeCalcMethod);

            int row = 0;

            foreach (KeyValuePair <enGrade, string> Grade in GlobalDefines.GRADE_NAMES)
            {
                if (Grade.Key == enGrade.None ||
                    Grade.Key == enGrade.WithoutGrade ||
                    Grade.Key == enGrade.Master ||
                    Grade.Key == enGrade.BeforeMaster)
                {
                    continue;
                }

                Label lbl = new Label()
                {
                    Content    = Grade.Value,
                    Background = Grade.Key < enGrade.Adult3 ?
                                 new SolidColorBrush(DBManagerApp.m_AppSettings.m_Settings.StayOnStartFontStyle.BackgroundColor) :
                                 new SolidColorBrush(DBManagerApp.m_AppSettings.m_Settings.InvitedToStartFontStyle.BackgroundColor),
                    BorderThickness = new Thickness(1, 0, 1, 1),
                    BorderBrush     = Brushes.Gray
                };
                Grid.SetColumn(lbl, 0);
                Grid.SetRow(lbl, row + 1);
                grdCalcGradesResults.Children.Add(lbl);

                lbl = new Label()
                {
                    Background = Grade.Key < enGrade.Adult3 ?
                                 new SolidColorBrush(DBManagerApp.m_AppSettings.m_Settings.StayOnStartFontStyle.BackgroundColor) :
                                 new SolidColorBrush(DBManagerApp.m_AppSettings.m_Settings.InvitedToStartFontStyle.BackgroundColor),
                    BorderThickness = new Thickness(0, 0, 1, 1),
                    BorderBrush     = Brushes.Gray
                };
                Grid.SetColumn(lbl, 1);
                Grid.SetRow(lbl, row + 1);
                grdCalcGradesResults.Children.Add(lbl);

                m_dictLblsPlaces.Add(Grade.Key, lbl);

                row++;
            }

            cmbResultGradeCalcMethod.SelectedIndex  = (int)DBManagerApp.m_AppSettings.m_Settings.ResultGradeCalcMethod;
            chkOnly75PercentForCalcGrades.IsChecked = DBManagerApp.m_AppSettings.m_Settings.Only75PercentForCalcGrades;

            btnCalcPlaces_Click(this, null);
        }
 public int CompareTo(object obj)
 {
     return(YearOfBirth.CompareTo(((Student)obj).YearOfBirth));
 }
Exemple #10
0
 public override int GetHashCode()
 {
     string[] KeyFields = new string[] { SurnameAndName, YearOfBirth.ToString(), InitGrade.ToString() };
     return(KeyFields.GetHashCode());
 }