示例#1
0
        private void RentHistoryButton_Click(object sender, EventArgs e)
        {
            Reception[] receptions;
            using (var context = new ApplicationDBContext())
            {
                receptions =
                    context.GetReceptions(SearchReceptionParam.SearchByEmployeeId(Employee.ID))
                    .ToArray();
            }

            var history = new RentHistoryView(receptions);

            history.ShowDialog();
        }
示例#2
0
        // обработчик кнопки "История аренд"
        private void RentHistoryButton_Click(object sender, EventArgs e)
        {
            Reception[] receptions;
            using (var context = new ApplicationDBContext())
            {
                // получаем список всех аренд для автомобиля
                receptions =
                    context.GetReceptions(SearchReceptionParam.SearchByCarId(Car.ID))
                    .ToArray();
            }

            var history = new RentHistoryView(receptions);

            history.ShowDialog();
        }