Example #1
0
 public MainGuestPage(BlApi.IBl bl, BO.Person person)
 {
     InitializeComponent();
     this.bl          = bl;
     this.Client      = bl.GetClient(person.Id);
     this.DataContext = Client;
 }
 public ShowOrder(BlApi.IBl bl, Order order)
 {
     InitializeComponent();
     this.bl    = bl;
     this.order = order;
     showOrderGrid.DataContext = order;
 }
 public AddGuestRequestPage(BlApi.IBl bl, BO.Client client, ListBox listBox)
 {
     //
     InitializeComponent();
     guest = new BO.GuestRequest();
     AddRequest.DataContext = guest;
     this.bl                = bl;
     this.clientID          = client.Details.Id;
     this.Client            = client;
     this.listBox           = listBox;
     guest.ClientID         = clientID;
     guest.RegistrationDate = DateTime.Today;
     #region  convert enums for Add
     typeComboBox.ItemsSource = MyDictionary.HostingTypes.Select(x => MyDictionary.TranslateEnumToString(x));
     areaComboBox.ItemsSource = MyDictionary.Locations.Select(x => MyDictionary.TranslateEnumToString(x));
     childrensAttractionsComboBox.ItemsSource = MyDictionary.Preferences.Select(x => MyDictionary.TranslateEnumToString(x));
     gardenComboBox.ItemsSource  = MyDictionary.Preferences.Select(x => MyDictionary.TranslateEnumToString(x));
     poolComboBox.ItemsSource    = MyDictionary.Preferences.Select(x => MyDictionary.TranslateEnumToString(x));
     jacuzziComboBox.ItemsSource = MyDictionary.Preferences.Select(x => MyDictionary.TranslateEnumToString(x));
     #endregion
     XElement cities = XElement.Load(@"XML\CitiesList.xml");
     childrenComboBox.ItemsSource  = Numbers.ArrayNumbers;
     adultsComboBox.ItemsSource    = Numbers.ArrayNumbers;
     subAreaComboBox.ItemsSource   = cities.Elements().Select(x => x.Value);
     subAreaComboBox.SelectedIndex = 0;
 }
Example #4
0
        public ViewHostingUnitWindow(BO.HostingUnit hostingUnit, BlApi.IBl bl)
        {
            InitializeComponent();
            HostingUnit = hostingUnit;
            try
            {
                Image1.Source = new BitmapImage(new Uri(HostingUnit.ImageLink1));
                Image2.Source = new BitmapImage(new Uri(HostingUnit.ImageLink2));
                Image3.Source = new BitmapImage(new Uri(HostingUnit.ImageLink3));
            }
            catch (ArgumentNullException)
            {
            }
            catch (UriFormatException)
            { }

            ViewGrid.DataContext = HostingUnit;
            var areacollection = MyDictionary.Locations.Select(x => MyDictionary.TranslateEnumToString(x)).ToList();

            areacollection.Remove("הכל");
            areaComboBox.ItemsSource = areacollection;
            List <int> hip = new List <int>();



            HostingUnit = hostingUnit;
            this.bl     = bl;

            //setBlackOutDates(hostingUnit);
        }
Example #5
0
 public HostingUnisPage(BlApi.IBl bl, BO.Host host)
 {
     InitializeComponent();
     this.bl   = bl;
     this.Host = host;
     HostId    = Host.Person.Id;
     MainListBox.ItemsSource = Host.HostingUnits;
 }
 public ShowHostingUnit(BlApi.IBl bl, HostingUnit unit)
 {
     InitializeComponent();
     this.bl   = bl;
     this.unit = unit;
     areaComboBox.ItemsSource = Enum.GetValues(typeof(Areas));
     showUnitGrid.DataContext = unit;
 }
Example #7
0
 public Login(BlApi.IBl bl)
 {
     InitializeComponent();
     this.bl                          = bl;
     person                           = new BO.Person();
     sendPassword                     = new BackgroundWorker();
     sendPassword.DoWork             += sendPassword_DoWork;
     sendPassword.RunWorkerCompleted += sendPassword_RunWorkerCompleted;
 }
Example #8
0
 public UpdateOrderPage(BlApi.IBl bl, BO.Order order, ListView listView, BackgroundWorker worker)
 {
     InitializeComponent();
     this.bl    = bl;
     this.order = order;
     statusComboBox.ItemsSource  = MyDictionary.OrderStatus.Select(x => MyDictionary.TranslateEnumToString(x));
     UpdateOrderGrid.DataContext = this.order;
     this.listViewOrder          = listView;
     email = worker;
 }
Example #9
0
 public MainWindowPage(BlApi.IBl bl, BO.Person Person)
 {
     InitializeComponent();
     this.bl                 = bl;
     this.CurrentPerson      = Person;
     this.DataContext        = CurrentPerson;
     ButtonUser.Content      = CurrentPerson.FirstName + " " + CurrentPerson.LastName;
     ManagerButton.IsEnabled = isManager();
     createManager();
 }
 public AddOrder(BlApi.IBl bl, int id, ListView ordersListView, List <Order> lstOrders)
 {
     InitializeComponent();
     this.bl  = bl;
     hostId   = id;
     requests = bl.GetGuestRequests().ToList();
     guestRequestListView.ItemsSource = requests;
     //lstOrders = lst;
     this.orderListView = ordersListView;
     this.lstOrders     = lstOrders;
 }
Example #11
0
 public MainOrdrerPage(BlApi.IBl bl, BO.Host host)
 {
     InitializeComponent();
     this.host = host;
     this.bl   = bl;
     myListview.ItemsSource = this.host.Orders;
     mailSend                     = new BackgroundWorker();
     hostID                       = this.host.Person.Id;
     mailSend.DoWork             += MailSend_DoWork;
     mailSend.RunWorkerCompleted += MailSend_RunWorkerCompleted;
 }
Example #12
0
 public NewHostPage(BlApi.IBl bl, BO.Host host)
 {
     InitializeComponent();
     this.bl                 = bl;
     this.Host               = host;
     this.DataContext        = Host;
     NewHostGrid.DataContext = Host;
     CreateXMLBankFiles();
     bankNameComboBox.ItemsSource = BankNumberDictionary.Values;
     host.BankBranch = new BO.BankBranch();
 }
Example #13
0
 public AddHostingUnit(BlApi.IBl bl, int id, List <HostingUnit> units, ListView view)
 {
     InitializeComponent();
     this.bl    = bl;
     unit       = new HostingUnit();
     unit.Diary = new bool[12, 31];
     this.units = units;
     this.view  = view;
     addHostingUnitGrid.DataContext = unit;
     unit.HostId = id;
     areaComboBox.ItemsSource = Enum.GetValues(typeof(BO.Areas));
 }
Example #14
0
 public HostingUnitDetails(BO.HostingUnit hostingUnit, BlApi.IBl bl)
 {
     InitializeComponent();
     this.bl       = bl;
     HostingUnit   = hostingUnit;
     calendarDates = new List <CalendarDateRange>();
     setBlackOutDates(HostingUnit);
     MainGrid.DataContext       = HostingUnit;
     OrdersDataGrid.ItemsSource = bl.GetOrdersOfHost(hostingUnit.Owner).Where(x => x.HostingUnit.Key == hostingUnit.Key && x.Status == BO.Order_Status.APPROVED);
     MonthlyProgressBar.Value   = Math.Round(CalculateMonthlyPercentage(), 2);
     TotalProgressBar.Value     = Math.Round(CalculateTotalPercentage(), 2);
 }
Example #15
0
 public Manager(BlApi.IBl bl)
 {
     InitializeComponent();
     this.bl = bl;
     Config  = bl.GetConfig();
     ConfigList.ItemsSource = Config;
     cfgComboBox.Items.Add("עמלה ללילה");
     cfgComboBox.Items.Add("זמן המתנה");
     information();
     ConfigAction = new Action(information);
     bl.configHandler(ConfigAction);
 }
Example #16
0
 public OrdersPage(BlApi.IBl bl, BO.Host host, ListView MyOrderListView)
 {
     InitializeComponent();
     this.bl   = bl;
     this.host = host;
     Requests  = bl.GetGetGuestRequestsExceptHostGr(host.Person.Id).ToList();
     this.host = host;
     hostID    = this.host.Person.Id;
     MainListBox.ItemsSource = Requests;
     mailSend   = new BackgroundWorker();
     myListview = MyOrderListView;
 }
 public AddHostingUnitPage(BlApi.IBl bl, BO.Host host, ListBox listBox)
 {
     InitializeComponent();
     Host                  = host;
     HostingUnit           = new BO.HostingUnit();
     HostingUnit.Diary     = new bool[12, 31];
     AddHUGrid.DataContext = HostingUnit;
     LB      = listBox;
     this.bl = bl;
     // areaComboBox.ItemsSource = BO.MyDictionary.Locations.Select(x=>BO.MyDictionary.TranslateE(x));
     areaComboBox.ItemsSource = MyDictionary.Locations.Select(x => MyDictionary.TranslateEnumToString(x));
 }
Example #18
0
 public Host(BlApi.IBl bl)
 {
     InitializeComponent();
     this.bl = bl;
     try
     {
         Hosts = bl.GetHosts().ToList();
         HsotsList.ItemsSource = Hosts;
     }
     catch
     {
     }
 }
Example #19
0
        public AvilableUnits(BlApi.IBl bl, int _id, int guestRequestKey)
        {
            InitializeComponent();

            this.bl   = bl;
            request   = bl.GetRequest(guestRequestKey);
            hostId    = _id;
            numOfDays = (request.LeaveDate - request.EntryDate).Days;
            hostId    = _id;
            lstUnits  = bl.AvailableUnits(request.EntryDate, numOfDays).ToList();
            lstUnits.RemoveAll(x => x.HostId != hostId);
            hostingUnitListView.ItemsSource = lstUnits;
        }
        public UpdateRequest(BlApi.IBl bl, GuestRequest guest)
        {
            InitializeComponent();
            this.bl                  = bl;
            updateor                 = guest;
            this.DataContext         = updateor;
            areaComboBox.ItemsSource = Enum.GetValues(typeof(Areas));
            typeComboBox.ItemsSource = Enum.GetValues(typeof(HostingType));
            var p = Enum.GetValues(typeof(Answer));

            gardenComboBox.ItemsSource = p;
            childrensAttractionsComboBox.ItemsSource = p;
            poolComboBox.ItemsSource    = p;
            jacuzziComboBox.ItemsSource = p;
        }
Example #21
0
 public AddGuestRequest(BlApi.IBl bl, int id, List <GuestRequest> lst, ListView lstView)
 {
     InitializeComponent();
     this.bl                     = bl;
     IdPerson                    = id;
     this.lst                    = lst;
     this.lstView                = lstView;
     request                     = new GuestRequest();
     request.ClientId            = IdPerson;
     AddRequestGrid.DataContext  = request;
     areaComboBox.ItemsSource    = Enum.GetValues(typeof(BO.Areas));
     typeComboBox.ItemsSource    = Enum.GetValues(typeof(BO.HostingType));
     poolComboBox.ItemsSource    = Enum.GetValues(typeof(BO.Answer));
     jacuzziComboBox.ItemsSource = Enum.GetValues(typeof(BO.Answer));
     gardenComboBox.ItemsSource  = Enum.GetValues(typeof(BO.Answer));
     childrensAttractionsComboBox.ItemsSource = Enum.GetValues(typeof(BO.Answer));
 }
Example #22
0
 public MainHostPage(BlApi.IBl bl, BO.Host host)
 {
     InitializeComponent();
     this.bl   = bl;
     this.Host = host;
     UpdateHostGrid.DataContext = Host;
     HostId = Host.Person.Id;
     try
     {
         this.Host.HostingUnits = bl.GetHostingUnitsOfHost(HostId);
         this.Host.Orders       = bl.GetOrdersOfHost(HostId);
     }
     catch
     {
         this.Host.HostingUnits = new List <BO.HostingUnit>();
         this.Host.Orders       = new List <BO.Order>();
     }
 }
Example #23
0
        public UpdateRequestPage(BlApi.IBl bl, BO.Client client, ListBox listBox, BO.GuestRequest guestRequest)
        {
            InitializeComponent();
            guest         = guestRequest;
            this.bl       = bl;
            this.clientID = client.Details.Id;
            this.Client   = client;
            this.listBox  = listBox;

            var enumPreferences = Enum.GetValues(typeof(BO.Preferences));

            #region  convert enums for Update
            typeComboBox.ItemsSource = MyDictionary.HostingTypes.Select(x => MyDictionary.TranslateEnumToString(x));
            areaComboBox.ItemsSource = MyDictionary.Locations.Select(x => MyDictionary.TranslateEnumToString(x));
            childrensAttractionsComboBox.ItemsSource = MyDictionary.Preferences.Select(x => MyDictionary.TranslateEnumToString(x));
            gardenComboBox.ItemsSource  = MyDictionary.Preferences.Select(x => MyDictionary.TranslateEnumToString(x));
            poolComboBox.ItemsSource    = MyDictionary.Preferences.Select(x => MyDictionary.TranslateEnumToString(x));
            jacuzziComboBox.ItemsSource = MyDictionary.Preferences.Select(x => MyDictionary.TranslateEnumToString(x));
            #endregion
            UpdateRequest.DataContext    = guest;
            adultsComoboBox.ItemsSource  = Numbers.ArrayNumbers;
            childrenComboBox.ItemsSource = Numbers.ArrayNumbers;
            subAreaComboBox.ItemsSource  = (XElement.Load(@"XML/CitiesList.xml").Elements().Select(x => x.Value));
        }
Example #24
0
 public AddUserPage(BlApi.IBl bl)
 {
     InitializeComponent();
     this.bl = bl;
     IdTypeComboBox.ItemsSource = MyDictionary.IDs.Select(x => MyDictionary.TranslateEnumToString(x));
 }