public PrivateArea(int index) { myBL = BLFactory.getBL(); InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; index2 = index; }
public AddMotherWindow() { InitializeComponent(); mother = new Mother(); this.DataContext = mother; bl = BLFactory.getBL(); }
public AddMotherWindow(Mother mother) { InitializeComponent(); this.DataContext = mother; AddMotherButton.Content = "update mother"; bl = BLFactory.getBL(); }
public AddNannyWindow() { InitializeComponent(); this.DataContext = selectedNanny; AddNannyButton.Content = "update mother"; bl = BLFactory.getBL(); }
public AddUnitWindow(int index) { myBL = BLFactory.getBL(); InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; index2 = index; isImageChanged = false; h = new Host() { PrivateName = null, FamilyName = "", MailAddress = "" }; hu = new HostingUnit() { HostingUnitKey = myBL.getUnitsConfig(), HostingUnitName = null }; this.area.ItemsSource = Enum.GetValues(typeof(BE.area)); this.type.ItemsSource = Enum.GetValues(typeof(BE.type)); h.BankBranchDetails = b; hu.Owner = h; UnitDetails.DataContext = hu; PrivateDetails.DataContext = h; b = new BankBranch(); List <string> Banks = myBL.getAllBankBranches(); this.bank.ItemsSource = Banks; bank.DataContext = Banks; }
public MainWindow() { InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; myBL = BLFactory.getBL(); myBL.MonthThread(); }
/// <summary> /// Delete patient detils by changing status to inactive. /// </summary> /// <param name="e"></param> private void DeletePatient(int id) { IObservable <PatientEntity> patientEntity = Observable.Start <PatientEntity>( () => { PatientEntity patientEntiy = BLFactory.CreateInstance(CallingContext.ContextTypeA).DeletePatient(new PatientEntity() { Id = id }); return(patientEntiy); }); patientEntity.SubscribeOn(NewThreadScheduler.Default) .ObserveOn(SynchronizationContext.Current) .Subscribe(loadedPatient => { BindPatientsGrid(); if (loadedPatient.Id > 0) { MessageBox.Show("Patient details deleted successfully."); ClearFields(); } else { MessageBox.Show("OOPs!! Something went wrong. Please contact administrator."); } }); }
public SimpleTariffForm() { InitializeComponent(); BLType type = (BLType)Enum.Parse(typeof(BLType), ConfigurationManager.AppSettings["BLType"]); tariffCalculator = BLFactory.GetTariffCalculator(type); }
public AddChildWindow() { InitializeComponent(); child = new Child(); this.DataContext = child; bl = BLFactory.getBL(); motherIdComboBox.ItemsSource = bl.getListOfMothers(); }
public AddChildWindow(Child child) { InitializeComponent(); this.DataContext = child; AddChildButton.Content = "update child"; bl = BLFactory.getBL(); motherIdComboBox.ItemsSource = bl.getListOfMothers(); }
public AddContractWindow(Contract contract) { InitializeComponent(); this.DataContext = contract; AddContractButton.Content = "update contract"; bl = BLFactory.getBL(); id_NannyComboBox.ItemsSource = bl.getListOfNannies(); idChildComboBox.ItemsSource = bl.getListOfChildren(); }
public AddContractWindow() { InitializeComponent(); contract = new Contract(); this.DataContext = contract; bl = BLFactory.getBL(); id_NannyComboBox.ItemsSource = bl.getListOfNannies(); idChildComboBox.ItemsSource = bl.getListOfChildren(); }
public DeleteUnit(int index) { myBL = BLFactory.getBL(); InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; index2 = index; DeleteGrid.DataContext = num; hu = new HostingUnit(); }
public HostWindow() { myBL = BLFactory.getBL(); InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; HostGrid.DataContext = pass; HostGrid.DataContext = myID; signUp.IsEnabled = false; logIn.IsEnabled = false; }
public DeleteDetails(int unitKey) { myBL = BLFactory.getBL(); InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; this.area.ItemsSource = Enum.GetValues(typeof(BE.area)); this.type.ItemsSource = Enum.GetValues(typeof(BE.type)); hu1 = myBL.FindUnit(unitKey); deleteGrid.DataContext = hu1; }
//ToDo: Demo of Func use. Del this later. private static void PrintAllTesters() { List <Tester> testersList = BLFactory.GetIBl().GetAllTesters(); Func <Tester, string> selector = tester => string.Format("{0} - {1}", tester.Id, tester.GetName()); IEnumerable <string> namesAndIds = testersList.Select(selector); foreach (string str in namesAndIds) { Console.WriteLine(str); } }
protected void Employee_RowDeleting(object sender, GridViewDeleteEventArgs e) { var employeeID = new Guid(e.Keys[0].ToString()); var buisnessLayer = BLFactory.CreateTransactionEmployeeDemoBL(); buisnessLayer.DeleteEmployee(employeeID); Session["employee"] = null; BindEmployeeGrid(); }
public UpdateDetails(HostingUnit hu, int index) { myBL = BLFactory.getBL(); hu1 = hu; InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; this.area.ItemsSource = Enum.GetValues(typeof(BE.area)); this.type.ItemsSource = Enum.GetValues(typeof(BE.type)); UpdateGrid.DataContext = hu1; index2 = index; }
public ManagerWindow() { myBL = BLFactory.getBL(); InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; lst = myBL.getGuestRequests(); lst2 = myBL.getHostingUnits(); lst3 = myBL.getOrders(); guests.ItemsSource = lst; orders.ItemsSource = lst3; units.ItemsSource = lst2; }
/// <summary> /// ctor of the window /// </summary> public ManagerPresentation() { InitializeComponent(); try { bl = BLFactory.GetBL(); } catch (BO.MissingData ex) //creating BO failed { MessageBox.Show(ex.Message); } }
/// <summary> /// window ctor /// </summary> /// <param name="busline"></param> public NewTripInfo(BO.BusLine busline) { InitializeComponent(); try { bl = BLFactory.GetBL(); busLine = busline; } catch (BO.MissingData ex) //creating bo failed { MessageBox.Show(ex.Message); } }
public Order(int index) { myBL = BLFactory.getBL(); InitializeComponent(); WindowStartupLocation = WindowStartupLocation.CenterScreen; lst = myBL.getGuestRequests(); lst2 = myBL.getHostingUnits(); lst3 = myBL.getOrders(); index2 = index; guests.ItemsSource = lst; orders.ItemsSource = lst3; guests.Items.Refresh(); }
/// <summary> /// window ctor /// </summary> public NewStationInfo() { InitializeComponent(); try { bl = BLFactory.GetBL(); } catch (BO.MissingData ex) //creating bo failed { MessageBox.Show(ex.Message); } CodeTB.Focus(); }
/// <summary> /// win ctor /// </summary> public Simulator() { InitializeComponent(); try { bl = BLFactory.GetBL(); StationsDataGrid.ItemsSource = bl.GetAllBusStations(); } catch (BO.MissingData ex) //creating BO failed { MessageBox.Show(ex.Message); } }
/// <summary> /// window ctor /// </summary> public Register() { InitializeComponent(); try { bl = BLFactory.GetBL(); } catch (BO.MissingData ex) //creating BO failed { MessageBox.Show(ex.Message); } NameTB.Focus(); }
/// <summary> /// window ctor /// </summary> /// <param name="bus"></param> public BusInfo(BO.Bus bus) { InitializeComponent(); try { bl = BLFactory.GetBL(); } catch (BO.MissingData ex) //creating BO failed { MessageBox.Show(ex.Message); } Curbus = bus; MainGrid.DataContext = Curbus; }
/// <summary> /// ctor of the window that get BO.bus /// </summary> /// <param name="busLine">bus that sending from the win that call this win</param> public LineInfo(BusLine busLine) { InitializeComponent(); try { bl = BLFactory.GetBL(); } catch (BO.MissingData ex) // create BO failed { MessageBox.Show(ex.Message); } curBusLine = busLine; AreasCB.ItemsSource = Enum.GetValues(typeof(BO.Areas)); UpdateData(); }
/// <summary> /// win ctor /// </summary> /// <param name="us"></param> public UserInfo(BO.User us) { InitializeComponent(); try { bl = BLFactory.GetBL(); } catch (BO.MissingData ex) //creating BO failed { MessageBox.Show(ex.Message); } user = us; MainGrid.DataContext = user; StartComboBox.DataContext = bl.GetAllBusStations(); EndComboBox.DataContext = bl.GetAllBusStations(); }
/// <summary> /// Here exception is catched but not killed as it throw FaultException /// </summary> /// <param name="employeeData"></param> /// <returns></returns> public Result AddEmployee(WCFTransactionEntity employeeData) { Result result = new Result(); try { var buisnessLayer = BLFactory.CreateWCFTransactionEmployeeDemoBL(); result = buisnessLayer.AddEmployee(employeeData); } catch (Exception ex) { throw new FaultException <Result>(result); } return(result); }
/// <summary> /// window ctor /// </summary> /// <param name="first">the first station</param> /// <param name="second">the second station</param> public UpdateTimeAndDistance(BO.LineStation first, BO.LineStation second) { InitializeComponent(); try { bl = BLFactory.GetBL(); } catch (BO.MissingData ex) // missing data { MessageBox.Show(ex.Message); } firstStation = first; secondStation = second; MainGrid.DataContext = first; SecondSt.DataContext = second; }