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); } }
private void delete_click(object sender, RoutedEventArgs e) { try { ApplicationBL bL = new ApplicationBL(); if (id_txt.Text.Count() == 0) { throw new UniversityException("ID Field is Empty"); } int id = Convert.ToInt32(id_txt.Text); bool deleted = bL.MacDeleteApplication(id); //ApplicationBL bL = new ApplicationBL(); //if (id_txt.Text.Count() == 0) throw new UniversityException("ID Field is Empty"); //int id = Convert.ToInt32(id_txt.Text); //bool deleted = bL.Delete(id); if (deleted) { MessageBox.Show("Deleted Succesfully"); } else { throw new UniversityException("not Deleted Succesfully"); } } catch (UniversityException ex) { MessageBox.Show(ex.Message); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
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); } }
private static void AddApp() { try { Application e = new Application() { FullName = "Rahul", DOB = new DateTime(2000, 2, 2), HighestQualification = "12th Pass", MarksObtained = 90, Goals = "player", Email_Id = "@.com", Scheduled_ProgramId = "EAB1", Status = "confirmed", DateOFInterview = new DateTime(2021, 1, 1) }; Application e1 = new Application() { FullName = "Shubam", DOB = new DateTime(2000, 2, 2), HighestQualification = "12th Pass", MarksObtained = 80, Goals = "player", Email_Id = "@.com", Scheduled_ProgramId = "EAB2", Status = "rejected", DateOFInterview = new DateTime(2021, 1, 1) }; ApplicationBL bl = new ApplicationBL(); bool aded = bl.Add(e); aded = bl.Add(e1); if (aded) { Console.WriteLine("added succesfully"); } } catch (UniversityException e) { Console.WriteLine(e.Message); } }
private void reject_Click(object sender, RoutedEventArgs e) { try { ApplicationBL blObj = new ApplicationBL(); if (id_txt.Text.Count() == 0) { throw new UniversityException("id field is empty"); } int appId = Convert.ToInt32(id_txt.Text); bool rejected = blObj.RejectAppByMac(appId); if (rejected == true) { MessageBox.Show("rejected Succesfully"); } else { throw new UniversityException("fill all fields caefully"); } } catch (UniversityException ex) { MessageBox.Show(ex.Message); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
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); } }
public Menu() { AppBl = new ApplicationBL(); UserBl = new UserBL(); PaymentBl = new PaymentBL(); BillBl = new BillBL(); existProgram = false; }
private static void UpdateApp() { try { Application e = new Application() { FullName = "Rahul", DOB = new DateTime(2000, 2, 2), HighestQualification = "12th Pass", MarksObtained = 90, Goals = "Teacher", Email_Id = "[email protected]", Scheduled_ProgramId = "EAB1", Status = "confirmed", DateOFInterview = new DateTime(2021, 1, 1) }; ApplicationBL bl = new ApplicationBL(); bool updtd = bl.Update(3, e); if (updtd) { Console.WriteLine("updated succesfully"); } } catch (UniversityException ex) { Console.WriteLine(ex.Message); } }
private static void DeleteApp() { try { Application e = new Application(); ApplicationBL bl = new ApplicationBL(); bool dltd = bl.Delete(e, 7); if (dltd) { Console.WriteLine("Deleted Succesfully"); } else { Console.WriteLine("not succesfully deleted"); } } catch (UniversityException ex) { Console.WriteLine(ex.Message); } }
private void accept_Click(object sender, RoutedEventArgs e) { try { ApplicationBL blObj = new ApplicationBL(); if (id_txt.Text.Count() == 0) { throw new UniversityException("Id Field is Empty"); } if (doi_DP.Text.Count() == 0) { throw new UniversityException("Interview Date Field is Empty"); } int appId = Convert.ToInt32(id_txt.Text); DateTime date = Convert.ToDateTime(doi_DP.Text); bool accepted = blObj.AcceptAppByMac(appId, date); if (accepted == true) { MessageBox.Show("Accepted Succesfully"); } else { throw new UniversityException("Fill all Fields caefully"); } } catch (UniversityException ex) { MessageBox.Show(ex.Message); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
public ApplicationController(ApplicationBL applicantbl) { _logic = applicantbl; }