예제 #1
0
 public ServisController(BL.ModelView.ServisView view)
 {
     try
     {
         entities = new DB.DETLT2020Entities();
         Service  = entities.Services.Where(x => x.Title == view.Title).First();;
     }
     catch
     {
         throw new Exception("Ошибка БД");
     }
 }
예제 #2
0
        public AddEndCangeServis(BL.ModelView.ServisView view)
        {
            InitializeComponent();

            try
            {
                var cn = new BL.ServisController(view);
                service = cn.Service;
                mainGrid.DataContext = service;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error");
            }
        }