public PrivateArea(int index)
 {
     myBL = BLFactory.getBL();
     InitializeComponent();
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     index2 = index;
 }
예제 #2
0
 public AddMotherWindow()
 {
     InitializeComponent();
     mother           = new Mother();
     this.DataContext = mother;
     bl = BLFactory.getBL();
 }
예제 #3
0
 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();
 }
예제 #5
0
        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;
        }
예제 #6
0
 public MainWindow()
 {
     InitializeComponent();
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     myBL = BLFactory.getBL();
     myBL.MonthThread();
 }
예제 #7
0
        /// <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.");
                }
            });
        }
예제 #8
0
        public SimpleTariffForm()
        {
            InitializeComponent();

            BLType type = (BLType)Enum.Parse(typeof(BLType), ConfigurationManager.AppSettings["BLType"]);

            tariffCalculator = BLFactory.GetTariffCalculator(type);
        }
예제 #9
0
 public AddChildWindow()
 {
     InitializeComponent();
     child            = new Child();
     this.DataContext = child;
     bl = BLFactory.getBL();
     motherIdComboBox.ItemsSource = bl.getListOfMothers();
 }
예제 #10
0
 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();
 }
예제 #13
0
 public DeleteUnit(int index)
 {
     myBL = BLFactory.getBL();
     InitializeComponent();
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     index2 = index;
     DeleteGrid.DataContext = num;
     hu = new HostingUnit();
 }
예제 #14
0
        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;
        }
예제 #16
0
        //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);
            }
        }
예제 #17
0
        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();
        }
예제 #18
0
 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);
     }
 }
예제 #21
0
 /// <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);
     }
 }
예제 #22
0
 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();
 }
예제 #23
0
 /// <summary>
 /// window ctor
 /// </summary>
 public NewStationInfo()
 {
     InitializeComponent();
     try
     {
         bl = BLFactory.GetBL();
     }
     catch (BO.MissingData ex) //creating bo failed
     {
         MessageBox.Show(ex.Message);
     }
     CodeTB.Focus();
 }
예제 #24
0
 /// <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();
 }
예제 #28
0
 /// <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();
 }
예제 #29
0
        /// <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;
        }