예제 #1
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);
        }
 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;
 }
예제 #3
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;
 }
예제 #4
0
 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));
 }
예제 #5
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));
        }
예제 #6
0
 public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
 {
     return(MyDictionary.TranslateEnumToString((Enum)value));//return string
 }
예제 #7
0
 public AddUserPage(BlApi.IBl bl)
 {
     InitializeComponent();
     this.bl = bl;
     IdTypeComboBox.ItemsSource = MyDictionary.IDs.Select(x => MyDictionary.TranslateEnumToString(x));
 }