public IEnumerable <object> GetReadableListOfGuestRequest(IEnumerable <GuestRequest> fromList = null) { if (fromList == null) { fromList = getListGuestRequest(); } return(from item in fromList where true select new { GuestRequestKey = item.GuestRequestKey, PrivateName = item.PrivateName, FamilyName = item.FamilyName, MailAddress = item.MailAddress, Status = HebrewEnum.GuestReqStatus(item.Status), RegistrationDate = item.RegistrationDate.ToString("dd/MM/yyyy"), EntryDate = item.EntryDate.ToString("dd/MM/yyyy"), ReleaseDate = item.ReleaseDate.ToString("dd/MM/yyyy"), Area = HebrewEnum.Area(item.Area), Type = HebrewEnum.GuestReqType(item.Type), Adults = item.Adults, Children = item.Children, Pool = HebrewEnum.options(item.Pool), Jacuzzi = HebrewEnum.options(item.Jacuzzi), Garden = HebrewEnum.options(item.Garden), ChildrensAttractions = HebrewEnum.options(item.ChildrensAttractions) }); }
public HostSignInWindow(long key) { bl = BL.FactoryBL.GetBL(); order = new Order(); InitializeComponent(); Hostkey = key; refreshHost(); cmbHostingUnitArea.ItemsSource = HebrewEnum.getListStrings <AreaEnum>(); cmbOrderUpdateStatus.ItemsSource = UpdateOrderStatus; refreshHostingUnits(); refreshGuestRequests(); refreshOrder(); refreshErrorLabels(); worker = new BackgroundWorker(); worker.DoWork += Worker_DoWork; worker.RunWorkerCompleted += Worker_RunWorkerCompleted; worker.WorkerSupportsCancellation = true; }
public GuestRequestWindow() { bl = BL.FactoryBL.GetBL(); InitializeComponent(); Refresh(); guestRequest = new GuestRequest(); this.GuestRequestGrid.DataContext = guestRequest; cmbArea.ItemsSource = HebrewEnum.getListStrings <AreaEnum>(); cmbChildrensAttractions.ItemsSource = HebrewEnum.getListStrings <optionsEnum>(); cmbGarden.ItemsSource = HebrewEnum.getListStrings <optionsEnum>(); cmbJacuzzi.ItemsSource = HebrewEnum.getListStrings <optionsEnum>(); cmbPool.ItemsSource = HebrewEnum.getListStrings <optionsEnum>(); cmbType.ItemsSource = HebrewEnum.getListStrings <GuestReqTypeEnum>(); dpEntryDate.DisplayDateStart = DateTime.Now; dpEntryDate.DisplayDateEnd = DateTime.Now.AddMonths(11); dpEntryDate.DisplayDate = DateTime.Now; dpReleaseDate.DisplayDateStart = DateTime.Now; dpReleaseDate.DisplayDateEnd = DateTime.Now.AddMonths(11); dpReleaseDate.DisplayDate = DateTime.Now; }
private void lsvUpdateHostingUnit_SelectionChanged(object sender, SelectionChangedEventArgs e) { if (lsvUpdateHostingUnit.SelectedIndex != -1) { hostingUnit = listHostingUnits[lsvUpdateHostingUnit.SelectedIndex]; HostingUnitUpdateGrid.DataContext = hostingUnit; cmbHostingUnitUpdateArea.Text = HebrewEnum.Area(hostingUnit.Area); } }
public List <object> GetReadableListOfHostingUnits(IEnumerable <HostingUnit> fromList = null) { if (fromList == null) { fromList = getListHostingUnit(); } return((from item in fromList select new { Area = HebrewEnum.Area(item.Area), HostingUnitKey = item.HostingUnitKey, HostingUnitName = item.HostingUnitName, Owner = item.Owner, }).ToList <object>()); }
public IEnumerable <object> GetReadableListOfOrder(IEnumerable <Order> fromList = null) { if (fromList == null) { fromList = getListOrders(); } return(from item in fromList where true select new { HostingUnitKey = item.HostingUnitKey, GuestRequestKey = item.GuestRequestKey, OrderKey = item.OrderKey, Status = HebrewEnum.OrderStatus(item.Status), CreateDate = item.CreateDate.ToString("dd/MM/yyyy"), OrderDate = OrderDateToString(item.OrderDate), }); }
public AdminWindow() { bl = BL.FactoryBL.GetBL(); InitializeComponent(); lsvAdminGuestRequest.ItemsSource = MainWindow.bl.GetReadableListOfGuestRequest(); lsvAdminHosts.ItemsSource = MainWindow.bl.GetReadableListOfHosts(); cmbGuestRequestArea.ItemsSource = HebrewEnum.getListStrings <AreaEnum>(); cmbHotingUnitArea.ItemsSource = HebrewEnum.getListStrings <AreaEnum>(); int i = 0; foreach (var host in MainWindow.bl.getListHostingUnit()) { HostingUnitUserControl h = new HostingUnitUserControl(host, true); AdminHostingUnitGrid.Children.Add(h); var rowDefinition = new RowDefinition(); rowDefinition.Height = GridLength.Auto; AdminHostingUnitGrid.RowDefinitions.Add(rowDefinition); Grid.SetRow(h, i++); } lsvAdminOrders.ItemsSource = MainWindow.bl.GetReadableListOfOrder(); txbNumOfGuestRequests.Text = MainWindow.bl.getListGuestRequest().Count().ToString(); txbNumOfHostes.Text = MainWindow.bl.getListHosts().Count().ToString(); txbNumOfHostingUnits.Text = MainWindow.bl.getListHostingUnit().Count().ToString(); txbNumOfOrders.Text = MainWindow.bl.getListOrders().Count().ToString(); txbNumOfSuccessfulOrders.Text = MainWindow.bl.SumOfApprovedOrderOfAllHosts().ToString(); txbSumMaildedGuestRequests.Text = MainWindow.bl.getSumMaildedOrders().ToString(); txbNumOfProfit.Text = MainWindow.bl.getAdminProfit().ToString(); }