示例#1
0
文件: MainForm.cs 项目: ashsvis/hotel
        /// <summary>
        /// Вызов отчёта по клиентам за прошедший месяц
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsmiLastMonthClients_Click(object sender, EventArgs e)
        {
            var rc = new ReportViewControl()
            {
                Dock = DockStyle.Fill
            };
            var generator = new ReportsBuilder();
            var report    = generator.GetClientsByLastMonth(_hotel);

            rc.Build(_hotel, report);
            CreateAndShowUserControl(rc);
        }
示例#2
0
文件: MainForm.cs 项目: ashsvis/hotel
        /// <summary>
        /// Вызов отчёта по занятым номерам
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsmiBusyRooms_Click(object sender, EventArgs e)
        {
            var rc = new ReportViewControl()
            {
                Dock = DockStyle.Fill
            };
            var generator = new ReportsBuilder();
            var report    = generator.GetBusyRoomsByDate(_hotel, DateTime.Now);

            rc.Build(_hotel, report);
            CreateAndShowUserControl(rc);
        }
示例#3
0
文件: MainForm.cs 项目: ashsvis/hotel
        /// <summary>
        /// Вызов списка клиентов за указанный период
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void tsmiByDateClients_Click(object sender, EventArgs e)
        {
            var frm = new SelectPeriodForm();

            if (frm.ShowDialog(this) != DialogResult.OK)
            {
                return;
            }
            var rc = new ReportViewControl()
            {
                Dock = DockStyle.Fill
            };
            var generator = new ReportsBuilder();
            var report    = generator.GetClientsByDate(_hotel, frm.FirstDate, frm.LastDate);

            rc.Build(_hotel, report);
            CreateAndShowUserControl(rc);
        }