Esempio n. 1
0
        private void show_click(object sender, RoutedEventArgs e)
        {
            try
            {
                UniversityEntity.Application app;
                ApplicationBL blObj = new ApplicationBL();
                List <UniversityEntity.Application> list = new List <UniversityEntity.Application>();
                list = blObj.GetAll();
                foreach (UniversityEntity.Application en in list)
                {
                    app = new UniversityEntity.Application()
                    {
                        ApplicationId        = en.ApplicationId,
                        FullName             = en.FullName,
                        DOB                  = en.DOB,
                        HighestQualification = en.HighestQualification,
                        MarksObtained        = en.MarksObtained,
                        Goals                = en.Goals,
                        Email_Id             = en.Email_Id,
                        Scheduled_ProgramId  = en.Scheduled_ProgramId,
                        Status               = en.Status,
                        DateOFInterview      = en.DateOFInterview.Date
                    };
                }

                lst_Of_Apps.ItemsSource = list;
            }
            catch (UniversityException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 2
0
        private static void GetAllapp()
        {
            ApplicationBL      bl = new ApplicationBL();
            List <Application> l  = new List <Application>();

            try
            {
                l = bl.GetAll();
                foreach (Application e in l)
                {
                    Console.WriteLine($"{e.ApplicationId},{e.FullName},{e.DOB},{e.HighestQualification},{e.MarksObtained},{e.Goals},{e.Email_Id},{e.Scheduled_ProgramId},{e.Status},{e.DateOFInterview}");
                }
                if (l.Count > 0)
                {
                    Console.WriteLine("Succes");
                }
                else
                {
                    Console.WriteLine("Not success");
                }
            }
            catch (UniversityException e)
            {
                Console.WriteLine(e.Message);
            }
        }
Esempio n. 3
0
        public MacApplicationsList()
        {
            InitializeComponent();
            try
            {
                UniversityEntity.Application app;
                ApplicationBL blObj = new ApplicationBL();
                List <UniversityEntity.Application> list = new List <UniversityEntity.Application>();
                list = blObj.GetAll();
                foreach (UniversityEntity.Application en in list)
                {
                    app = new UniversityEntity.Application()
                    {
                        ApplicationId        = en.ApplicationId,
                        FullName             = en.FullName,
                        DOB                  = en.DOB,
                        HighestQualification = en.HighestQualification,
                        MarksObtained        = en.MarksObtained,
                        Goals                = en.Goals,
                        Email_Id             = en.Email_Id,
                        Scheduled_ProgramId  = en.Scheduled_ProgramId,
                        Status               = en.Status,
                        DateOFInterview      = en.DateOFInterview.Date
                    };
                }

                lst_Of_Apps.ItemsSource = list;
            }
            catch (UniversityException ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
Esempio n. 4
0
        private void show_click(object sender, MouseButtonEventArgs e)
        {
            try
            {
                UniversityEntity.Application app = new UniversityEntity.Application();
                // UniversityEntity.Application app1 = new UniversityEntity.Application();
                // ApplicationBL blObj = new ApplicationBL();
                List <UniversityEntity.Application> list  = new List <UniversityEntity.Application>();
                List <UniversityEntity.Application> list1 = new List <UniversityEntity.Application>();
                list = BlObject.GetAll();

                foreach (UniversityEntity.Application en in list)
                {
                    app = new UniversityEntity.Application();
                    if (en.Status.ToLower() == "accepted" || en.Status.ToLower() == "confirmed")
                    {
                        app.ApplicationId        = en.ApplicationId;
                        app.FullName             = en.FullName;
                        app.DOB                  = en.DOB;
                        app.HighestQualification = en.HighestQualification;
                        app.MarksObtained        = en.MarksObtained;
                        app.Goals                = en.Goals;
                        app.Email_Id             = en.Email_Id;
                        app.Scheduled_ProgramId  = en.Scheduled_ProgramId;
                        app.Status               = en.Status;
                        app.DateOFInterview      = en.DateOFInterview;

                        list1.Add(app);
                    }
                    ;
                }
                lst_Of_Apps.ItemsSource = list1;
            }
            catch (UniversityException ex)
            {
                MessageBox.Show(ex.Message);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }