private void sTUDENTLISTToolStripMenuItem_Click(object sender, EventArgs e) { stdList.DataSource = std.getListStd(); DataGridViewImageColumn picInList = (DataGridViewImageColumn)stdList.Columns["picture"]; picInList.ImageLayout = DataGridViewImageCellLayout.Stretch; stdList.AllowUserToAddRows = false; refreshBTN.Show(); }
private void checkBtn_Click(object sender, EventArgs e) { if (allrb.Checked) { printView.DataSource = std.getListStd(); DataGridViewImageColumn picInList = (DataGridViewImageColumn)printView.Columns["picture"]; picInList.ImageLayout = DataGridViewImageCellLayout.Stretch; printView.AllowUserToAddRows = false; } else if (yesrb.Checked && fmalerb.Checked) { DateTime start = dateTimePicker1.Value; DateTime end = dateTimePicker2.Value; printView.DataSource = std.getListFemaleYes(start, end); DataGridViewImageColumn picInList = (DataGridViewImageColumn)printView.Columns["picture"]; picInList.ImageLayout = DataGridViewImageCellLayout.Stretch; printView.AllowUserToAddRows = false; } else if (yesrb.Checked && malerb.Checked) { DateTime start = dateTimePicker1.Value; DateTime end = dateTimePicker2.Value; printView.DataSource = std.getListMaleYes(start, end); DataGridViewImageColumn picInList = (DataGridViewImageColumn)printView.Columns["picture"]; picInList.ImageLayout = DataGridViewImageCellLayout.Stretch; printView.AllowUserToAddRows = false; } else if (malerb.Checked) { printView.DataSource = std.getListMale(); DataGridViewImageColumn picInList = (DataGridViewImageColumn)printView.Columns["picture"]; picInList.ImageLayout = DataGridViewImageCellLayout.Stretch; printView.AllowUserToAddRows = false; } else if (fmalerb.Checked) { printView.DataSource = std.getListFemale(); DataGridViewImageColumn picInList = (DataGridViewImageColumn)printView.Columns["picture"]; picInList.ImageLayout = DataGridViewImageCellLayout.Stretch; printView.AllowUserToAddRows = false; } }