コード例 #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
ファイル: Car.cs プロジェクト: S1ber1anPLague/RentWay
        // обработчик кнопки "История аренд"
        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();
        }