Esempio n. 1
0
 /// <summary>
 /// Получить все заявления по конкурсу
 /// </summary>
 /// <param name="competitiveGroup"></param>
 /// <returns></returns>
 ///
 public void Delete(EntrantApplication Application)
 {
     foreach (EntrantApplication application in db.Applications)
     {
         if (application == Application)
         {
             db.Applications.Remove(application);
         }
     }
 }
Esempio n. 2
0
 public void Create(EntrantApplication Application)
 {
     foreach (EntrantApplication application in db.Applications)
     {
         if (application == Application)
         {
             return;
         }
     }
     db.Applications.Add(Application);
 }
Esempio n. 3
0
        public void Update(EntrantApplication Application)
        {
            int i = 0;

            foreach (EntrantApplication application in db.Applications)
            {
                if (application == Application)
                {
                    db.Applications[i] = Application;
                }
                i++;
            }
        }
Esempio n. 4
0
        public EntrantApplication Get(Entrant entrant)
        {
            bool IsExisted = false;
            EntrantApplication Application = new EntrantApplication();

            foreach (EntrantApplication application in db.Applications)
            {
                if (application.Entrant == entrant)
                {
                    IsExisted = true; Application = application;
                }
                ;
            }
            if (IsExisted)
            {
                return(Application);
            }
            else
            {
                return(null);
            }
        }
Esempio n. 5
0
        public void AddEntrant(Entrant entrant,
                               DateTime RegistrationDate,
                               bool NeedHostel,
                               string StatusApp,
                               CompetitiveGroup CompetitiveGroup,
                               SimpleClass ReturnDocumentsType,
                               FinSourceAndEduForms FinSourceAndEduForms,
                               ObservableCollection <Document> ApplicationDocuments,
                               ObservableCollection <EntranceTestResults> EntranceTestResults,
                               ObservableCollection <InstitutionAchievement> InstitutionAchievments,
                               bool Original,
                               ObservableCollection <EntrantApplication> applications)
        {
            bool isAcheived = false;

            foreach (EntrantApplication application in applications)
            {
                if ((application.Entrant.Person.PersonPassports[0].Series == entrant.Person.PersonPassports[0].Series) &&
                    (application.Entrant.Person.PersonPassports[0].Number == entrant.Person.PersonPassports[0].Number))
                {
                    isAcheived = true;
                }
            }
            if (isAcheived == true)
            {
                int ApplicationNumber  = applications.Count;
                EntrantApplication app = new EntrantApplication(
                    entrant, ApplicationNumber, RegistrationDate,
                    NeedHostel, StatusApp, CompetitiveGroup,
                    1, FinSourceAndEduForms,
                    ApplicationDocuments, EntranceTestResults,
                    InstitutionAchievments, Original);

                applications.Add(app);
            }
            else
            {
            }
        }
Esempio n. 6
0
 public EntrantApplication Get(EntrantApplication item)
 {
     throw new System.NotImplementedException();
 }