示例#1
0
        public AddOrder()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl               = FactoryBL.GetBl();
            order            = new BE.Order();
            this.DataContext = order;

            this.GuestRequestKey.ItemsSource       = bl.GetGuestRequestList();
            this.GuestRequestKey.DisplayMemberPath = "GuestRequestKey";
            this.GuestRequestKey.SelectedValuePath = "GuestRequestKey";

            this.HostingUnitKey.ItemsSource       = bl.GetHostingUnitList();
            this.HostingUnitKey.DisplayMemberPath = "HostingUnitKey";
            this.HostingUnitKey.SelectedValuePath = "HostingUnitKey";

            this.Area.ItemsSource                = Enum.GetValues(typeof(Enums.Area));
            this.Type.ItemsSource                = Enum.GetValues(typeof(Enums.HostingUnitType));
            this.Pool.ItemsSource                = Enum.GetValues(typeof(Enums.Options));
            this.Jaccuzzi.ItemsSource            = Enum.GetValues(typeof(Enums.Options));
            this.Porch.ItemsSource               = Enum.GetValues(typeof(Enums.Options));
            this.Food.ItemsSource                = Enum.GetValues(typeof(Enums.Food));
            this.ChildrenAttractions.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            this.EntryDate.DisplayDate           = DateTime.Now;
            this.ReleaseDate.DisplayDateEnd      = DateTime.Now;

            errorMessages = new List <string>();
        }
示例#2
0
        public AddHostingUnit(BE.Host ho)
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl          = FactoryBL.GetBl();
            hostingUnit = new BE.HostingUnit();
            BE.Host host = ho;
            this.DataContext = hostingUnit;

            errorMessages = new List <string>();

            //this.HostId.ItemsSource = bl.GetHostList();
            //this.HostId.DisplayMemberPath = "HostKey";
            //this.HostId.SelectedValuePath = "HostKey";

            this.HostId.Text = host.HostKey.ToString();

            this.Area.ItemsSource = Enum.GetValues(typeof(Enums.Area));
            this.Type.ItemsSource = Enum.GetValues(typeof(Enums.HostingUnitType));
            this.Food.ItemsSource = Enum.GetValues(typeof(Enums.Food));

            this.Pool.Text                = "No";
            this.Jacuzzi.Text             = "No";
            this.Porch.Text               = "No";
            this.ChildrenAttractions.Text = "No";
        }
示例#3
0
 public AddTrainee()
 {
     InitializeComponent();
     trainee = new BE.Trainee();
     _bl     = FactorySingletonBl.GetBl();
     init();
 }
示例#4
0
        private void AddTraineeButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (AddTraineeButton.Content.ToString() != "Update")//add for the first time
                {
                    IBl _bl = FactorySingletonBl.GetBl();
                    if (_bl.AddTrainee(trainee))
                    {
                        MessageBox.Show(trainee.ToString() + "added successfully");
                    }
                }
                else//update
                {
                    IBl _bl = FactorySingletonBl.GetBl();

                    if (_bl.UpdateTrainee(trainee))
                    {
                        MessageBox.Show(trainee.ToString() + "updated successfully");
                    }
                }
                this.Close();
            }
            catch (Exception m)
            {
                MessageBox.Show(m.Message);
            }
        }
示例#5
0
        public HostsByNumOfHostingUnits()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl = FactoryBL.GetBl();

            //IEnumerable<IGrouping<int, BE.Host>> hosts;
            //List<BE.Host> hostList = new List<BE.Host>();
            //hosts = bl.GetHostsByNumOfHostingUnits();

            //foreach (var item in hosts)
            //{
            //    foreach (var v in item)
            //    {
            //        hostList.Add(v);
            //    }
            //}

            List <BE.Host> hostList = bl.GetHostList();


            HostsByNumOfHostingUnits_Grouping.ItemsSource = hostList;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(HostsByNumOfHostingUnits_Grouping.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("NumOfHostingUnits");

            view.GroupDescriptions.Add(groupDescription);
        }
示例#6
0
 public Schedule()
 {
     InitializeComponent();
     _bl = FactorySingletonBl.GetBl();
     this.idTesters.ItemsSource = from t in _bl.GetTesters()
                                  select t.ID;
 }
示例#7
0
        private void RemoveButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (IDCBox.SelectedItem != null)
                {
                    IBl _bl = FactorySingletonBl.GetBl();

                    //get all tests of thid tester
                    var testersInTest = from t in _bl.GetTests()
                                        where t.TesterID == IDCBox.SelectedItem.ToString()
                                        select t;
                    if (testersInTest.Any())//need to remove the test first
                    {
                        throw new Exception("tester can not be remove. need to remove all tests that he was the tester");
                    }
                    MessageBoxResult messageBoxResult = MessageBox.Show("Are you sure?", "Delete Tester", System.Windows.MessageBoxButton.YesNo);
                    if (messageBoxResult == MessageBoxResult.Yes)
                    {
                        string IDToRemove = IDCBox.SelectedItem as string;
                        if (_bl.RemoveTester(IDToRemove))
                        {
                            testers.Remove(IDToRemove);
                            MessageBox.Show(IDToRemove + " removed successfully");
                            this.Close();
                        }
                    }
                }
            }
            catch (Exception m)
            {
                MessageBox.Show(m.Message);
            }
        }
        public HostingUnitByArea()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl = FactoryBL.GetBl();

            IEnumerable <IGrouping <Enums.Area, BE.HostingUnit> > hostingUnits;
            List <BE.HostingUnit> hostingUnitsList = new List <BE.HostingUnit>();

            hostingUnits = bl.GetHostingUnitsByArea();

            foreach (var item in hostingUnits)
            {
                foreach (var v in item)
                {
                    hostingUnitsList.Add(v);
                }
            }

            HostingUnitByArea_Grouping.ItemsSource = hostingUnitsList;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(HostingUnitByArea_Grouping.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("Area");

            view.GroupDescriptions.Add(groupDescription);
        }
        public UpdateOrder(BE.Order or)
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl    = FactoryBL.GetBl();
            order = or;

            //this.OrderKey.ItemsSource = bl.GetOrderList();
            //this.OrderKey.DisplayMemberPath = "OrderKey";
            //this.OrderKey.SelectedValuePath = "OrderKey";

            this.OrderKey.Text = order.OrderKey.ToString();

            setOrderFields();

            //this.Area.Text = order.ToString();
            //this.Type.ItemsSource = Enum.GetValues(typeof(Enums.HostingUnitType));
            //this.Pool.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            //this.Jaccuzzi.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            //this.Porch.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            //this.Food.ItemsSource = Enum.GetValues(typeof(Enums.Food));
            //this.ChildrenAttractions.ItemsSource = Enum.GetValues(typeof(Enums.Options));
            //this.EntryDate.DisplayDate = DateTime.Now;
            //this.ReleaseDate.DisplayDateEnd = DateTime.Now;
            this.Status.ItemsSource = Enum.GetValues(typeof(Enums.OrderStatus));

            errorMessages = new List <string>();
        }
示例#10
0
 private void RemoveButton_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (IDCBox.SelectedItem != null)
         {
             MessageBoxResult messageBoxResult = MessageBox.Show("Are you sure?", "Delete Tester", System.Windows.MessageBoxButton.YesNo);
             if (messageBoxResult == MessageBoxResult.Yes)
             {
                 IBl _bl          = FactorySingletonBl.GetBl();
                 int TestToRemove = int.Parse(IDCBox.SelectedItem.ToString());
                 if (_bl.RemovedrivingTest(TestToRemove))
                 {
                     tests.Remove(TestToRemove);
                     MessageBox.Show(TestToRemove + " removed successfully");
                     this.Close();
                 }
             }
         }
     }
     catch (Exception m)
     {
         MessageBox.Show(m.Message);
     }
 }
示例#11
0
        public GuestRequestsByArea()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl = FactoryBL.GetBl();
            //guestRequest = new GuestRequest();
            //this.DataContext = guestRequest;

            IEnumerable <IGrouping <Enums.Area, GuestRequest> > guestRequests;
            List <GuestRequest> guestRequestsList = new List <GuestRequest>();

            guestRequests = bl.GetGuestRequestsByArea();

            foreach (var item in guestRequests)
            {
                foreach (var v in item)
                {
                    guestRequestsList.Add(v);
                }
            }

            GuestRequestsByArea_Grouping.ItemsSource = guestRequestsList;

            CollectionView           view             = (CollectionView)CollectionViewSource.GetDefaultView(GuestRequestsByArea_Grouping.ItemsSource);
            PropertyGroupDescription groupDescription = new PropertyGroupDescription("Area");

            view.GroupDescriptions.Add(groupDescription);
        }
 public static IBl GetBl()
 {
     if (instance == null)
     {
         instance = new MyBl();
     }
     return(instance);
 }
示例#13
0
 public HostLogin()
 {
     InitializeComponent();
     InitializeComponent();
     WindowStartupLocation = WindowStartupLocation.CenterScreen;
     bl   = FactoryBL.GetBl();
     host = new BE.Host();
 }
示例#14
0
 public static IBl GetBl()
 {
     if (singelonBl == null)
     {
         singelonBl = new Bl_imp();
     }
     return(singelonBl);
 }
示例#15
0
 public static IBl GetBl()
 {
     if (bl == null)
     {
         bl = new Bl_imp();
     }
     return(bl);
 }
        private void UpdateButton_Click(object sender, RoutedEventArgs e)
        {
            IBl _bl = FactorySingletonBl.GetBl();

            BE.Tester tester = _bl.FindTesterByID(IDCBox.SelectedItem as string);
            this.Close();
            new AddTester(tester).Show();//send to add window
        }
示例#17
0
 public JilezesController(IBl <Jilez> jilezLogic, IBl <House> houseLogic, IBl <HouseCounter> houseCounterLogic,
                          IBl <FloatCounter> counterLogic, IMapper mapper)
 {
     _jilezLogic        = jilezLogic;
     _houseLogic        = houseLogic;
     _houseCounterLogic = houseCounterLogic;
     _counterLogic      = counterLogic;
     _mapper            = mapper;
 }
示例#18
0
 public HousesController(IBl <House> houseLogic, IBl <ManageCompany> companyLogic, IBl <District> districtLogic,
                         IBl <HouseCounter> counterLogic, IMapper mapper)
 {
     _houseLogic    = houseLogic;
     _companyLogic  = companyLogic;
     _districtLogic = districtLogic;
     _counterLogic  = counterLogic;
     _mapper        = mapper;
 }
        public TesterView()
        {
            _bl = FactorySingletonBl.GetBl();
            InitializeComponent();
            this.LVUsers.ItemsSource = _bl.GetTesters();//shows all testers in the system

            this.cityCB.ItemsSource    = Enum.GetValues(typeof(Cities));
            this.VehicleCB.ItemsSource = Enum.GetValues(typeof(Vehicle));
        }
示例#20
0
        public static IBl GetIBl()
        {
            if (IBlInstance == null)
            {
                IBlInstance = new BL_Class();
            }

            return(IBlInstance);
        }
示例#21
0
 public AddTrainee(BE.Trainee traineeToUp)//update send an existing trainee
 {
     InitializeComponent();
     trainee = traineeToUp;
     this.IDTBox.IsReadOnly = true;
     _bl = FactorySingletonBl.GetBl();
     init();
     this.AddTraineeButton.Content = "Update";
 }
示例#22
0
        public TraineeView()
        {
            _bl = FactorySingletonBl.GetBl();
            InitializeComponent();

            this.LVUsers.ItemsSource = _bl.GetTrainees();//show all
            this.cityCB.ItemsSource  = Enum.GetValues(typeof(Cities));
            for (int i = 0; i < 30; i++)
            {
                TestsCB.Items.Add(i);
            }
        }
 public UpdateTestWin()
 {
     InitializeComponent();
     this.ResultGrid.Visibility = Visibility.Hidden;
     _bl = FactorySingletonBl.GetBl();
     //combo box with all serial numbers
     foreach (var item in _bl.GetTests())
     {
         tests.Add(item.SerialNumber);
     }
     SNCBox.ItemsSource = tests;
 }
示例#24
0
 public CurrentInfoController(IBl <Jilez> jilezLogic, IBl <Bill> billLogic, IBl <Receipt> receiptLogic,
                              IBl <ListServices> servicesLogic, IBl <TsjService> tsjServiceLogic, IBl <House> houseLogic,
                              IBl <FloatCounter> counterLogic, IMapper mapper)
 {
     _jilezLogic      = jilezLogic;
     _billLogic       = billLogic;
     _receiptLogic    = receiptLogic;
     _servicesLogic   = servicesLogic;
     _tsjServiceLogic = tsjServiceLogic;
     _houseLogic      = houseLogic;
     _counterLogic    = counterLogic;
     _mapper          = mapper;
 }
        public UpdateTesterWin()
        {
            InitializeComponent();

            IBl _bl = FactorySingletonBl.GetBl();

            //combo box with all testers ID
            foreach (var item in _bl.GetTesters())
            {
                testers.Add(item.ID);
            }
            IDCBox.ItemsSource = testers;
        }
        public UpdateTraineeWind()
        {
            InitializeComponent();

            IBl _bl = FactorySingletonBl.GetBl();

            //combo box with all trainees ID
            foreach (var item in _bl.GetTrainees())
            {
                trainees.Add(item.ID);
            }
            IDCBox.ItemsSource = trainees;
        }
示例#27
0
        public DeleteHostingUnit()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl          = FactoryBL.GetBl();
            hostingUnit = null;

            this.HostingUnitKey.ItemsSource       = bl.GetHostingUnitList();
            this.HostingUnitKey.DisplayMemberPath = "HostingUnitKey";
            this.HostingUnitKey.SelectedValuePath = "HostingUnitKey";

            errorMessages = new List <string>();
        }
示例#28
0
        public UpdateHost(BE.Host ho)
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl   = FactoryBL.GetBl();
            host = ho;

            this.BankBranchDetails.ItemsSource = bl.GetBankAccounts();
            setHostFields();


            errorMessages = new List <string>();
        }
示例#29
0
        public AddHost()
        {
            InitializeComponent();
            WindowStartupLocation = WindowStartupLocation.CenterScreen;
            bl               = FactoryBL.GetBl();
            host             = new BE.Host();
            this.DataContext = host;

            this.BankBranch.ItemsSource = bl.GetBankAccounts();


            errorMessages = new List <string>();
        }
        public NewReportFormModel()
        {
            _bl = new FactoryBl().GetInstance();

            Report = new Report
            {
                Name      = "SHIR",
                Id        = 1234,
                Address   = "Beit Hadfus 5, Jerusalem",
                Latitude  = 101.1,
                Longitude = 12.34
            };
            AddReport();
        }