示例#1
0
        private void dateTimePicker1_ValueChanged(object sender, EventArgs e)
        {
            DeklaracjeTableAdapter deklaracjeTableAdapter = new DeklaracjeTableAdapter();

            dataGridView1.DataSource = deklaracjeTableAdapter.GetDataByReport(dateTimePicker1.Value.Date, dateTimePicker2.Value.Date);
            dataGridView1.Refresh();
        }
示例#2
0
        public RaportForm()
        {
            InitializeComponent();
            DeklaracjeTableAdapter deklaracjeTableAdapter = new DeklaracjeTableAdapter();

            dataGridView1.DataSource                    = deklaracjeTableAdapter.GetDataByReport(dateTimePicker1.Value.Date, dateTimePicker2.Value.Date);
            dataGridView1.Columns["ID"].Visible         = false;
            dataGridView1.Columns["IdPacjenta"].Visible = false;
            dataGridView1.Columns["IdLekarza"].Visible  = false;
            dataGridView1.Columns["Pozytywna"].Visible  = false;
        }
示例#3
0
        private void button1_Click(object sender, EventArgs e)
        {
            SaveFileDialog saveFileDialog = new SaveFileDialog();

            if (saveFileDialog.ShowDialog() == DialogResult.OK)
            {
                if (saveFileDialog.FileName != "")
                {
                    CreateZipFile          czf = new CreateZipFile(Path.GetDirectoryName(saveFileDialog.FileName), saveFileDialog.FileName);
                    DeklaracjeTableAdapter deklaracjeTableAdapter = new DeklaracjeTableAdapter();
                    DataTable dataTable = new DataTable("Deklaracja");
                    dataTable = deklaracjeTableAdapter.GetDataByReport(dateTimePicker1.Value.Date, dateTimePicker2.Value.Date);
                    czf.CreateZipFileFromDataTable(dataTable);
                }
            }
        }