コード例 #1
0
ファイル: Master.cs プロジェクト: Ruxton92/StandaloneForm
 public Master(String University,
     String Diploma,
     Specialization[] Specs)
 {
     this.University = University;
     this.Diploma = Diploma;
     this.Specs = Specs;
 }
コード例 #2
0
ファイル: Applicant.cs プロジェクト: Ruxton92/StandaloneForm
 public Applicant(String RegNumber,
     String FirstName, String SecondName, String LastName,
     String BirthDate, String BirthPlace, Address Address_,
     String Citizenship, String Passport, String Serial, String Number, String PassportIssuedDate,
     String HomePhone, String LearningForm, String Funding,
     Specialization[] Specs, String Education, String EducationDocument, String NumberOfEducationDocument, String EducationIssuedDate,
     EnteranceExamination[] EnteranceExaminations,
     bool AllowUniversityExams, String Grounds,
     String Facilities, String Olimpiads,
     bool NeedDorm, String IssuedUniversityEducation,
     bool MATICourses, bool MATISchool, bool Attest, String Sex, String SchoolType, String SchoolName)
 {
     this.RegNumber = RegNumber;
     this.FirstName = FirstName;
     this.SecondName = SecondName;
     this.LastName = LastName;
     this.BirthDate = BirthDate;
     this.BirthPlace = BirthPlace;
     this.Address_ = Address_;
     this.Citizenship = Citizenship;
     this.Passport = Passport;
     this.Serial = Serial;
     this.Number = Number;
     this.PassportIssuedDate = PassportIssuedDate;
     this.HomePhone = HomePhone;
     this.LearningForm = LearningForm;
     this.Funding = Funding;
     this.Specs = Specs;
     this.Education = Education;
     this.EducationDocument = EducationDocument;
     this.NumberOfEducationDocument = NumberOfEducationDocument;
     this.EducationIssuedDate = EducationIssuedDate;
     this.EnteranceExaminations = EnteranceExaminations;
     this.AllowUniversityExams = AllowUniversityExams;
     this.Grounds = Grounds;
     this.Facilities = Facilities;
     this.Olimpiads = Olimpiads;
     this.NeedDorm = NeedDorm;
     this.IssuedUniversityEducation = IssuedUniversityEducation;
     this.MATICourses = MATICourses;
     this.MATISchool = MATISchool;
     this.Attest = Attest;
     this.Sex = Sex;
     this.SchoolType = SchoolType;
     this.SchoolName = SchoolName;
 }
コード例 #3
0
        private void ControlMagistrSpec_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var PropCombo = (ComboBox)sender;
            String spec = PropCombo.SelectedValue as String;
            Faculty FacultyDialog;

            // If something choosen, select facs
            if (spec.Equals(""))
                return;
            else
            {
                FacultyDialog = new Faculty(spec);
                FacultyDialog.ShowDialog();
            }
            if (PropCombo.Name.Equals("ControlMagistrSpec"))
            {
                Specs[0] = new Specialization(spec, FacultyDialog.Output);
                Specs[1] = null;
                Specs[2] = null;
            }
        }
コード例 #4
0
        private void Propreties_SelectionChanged(object sender, SelectionChangedEventArgs e)
        {
            var PropCombo = (ComboBox)sender;
            String spec = PropCombo.SelectedValue as String;
            if (spec == null) spec = "";
            Faculty FacultyDialog;
            bool? FacultyDialogResult = false;

            // If this spec already choosen
            foreach(Specialization Spec in Specs)
            {
                if(Spec != null && Spec.Spec.Equals(spec))
                {
                    MessageBox.Show("Одну и ту же специальность нельзя выбирать дважды", "Предупреждение", MessageBoxButton.OK, MessageBoxImage.Warning);
                    PropCombo.SelectedItem = null;
                    return;
                }
            }

            // If something choosen, select facs
            if (spec.Equals(""))
                return;
            else
            {
                FacultyDialog = new Faculty(spec);
                FacultyDialogResult = FacultyDialog.ShowDialog();
            }
            if ((bool)FacultyDialogResult)
            {
                if (PropCombo.Name.Equals("ControlFirstPriority"))
                    Specs[0] = new Specialization(spec, FacultyDialog.Output);
                else if (PropCombo.Name.Equals("ControlSecondPriority"))
                    Specs[1] = new Specialization(spec, FacultyDialog.Output);
                else if (PropCombo.Name.Equals("ControlThirdPriority"))
                    Specs[2] = new Specialization(spec, FacultyDialog.Output);
            }
            else
                PropCombo.SelectedItem = null;
        }