1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- using System;
- using System.Collections.Generic;
- using System.Drawing;
- using System.IO;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- namespace ПодготовкаКДемо1
- {
- public partial class Tour
- {
- public string ImageTour { get; set; }
- public string IsActualTour { get; set; }
- public string IsActualTourColor { get; set; }
- public string PriceTour { get; set; }
- public static List<Tour> getListTour()
- {
- List<Tour> tours = BaseConnect.BaseModel.Tour.ToList();
- foreach (Tour tour in tours)
- {
- if (tour.ImagePath != null)
- {
- tour.ImageTour = tour.ImagePath;
- }
- else
- {
- tour.ImageTour = "\\Туры фото\\picture.png";
- }
- tour.PriceTour = Math.Round(Convert.ToDecimal(tour.Price), 2).ToString();
- if (tour.IsActual)
- {
- tour.IsActualTour = "Актуален";
- tour.IsActualTourColor = "#bae3e8";
- }
- else
- {
- tour.IsActualTour = "Не актуален";
- tour.IsActualTourColor = "#e31e24";
- }
- }
- return tours;
- }
- }
- }
|