private void btn_PrintSelected_Click(object sender, EventArgs e) { CalCrystalReportForm1 f; this.gridView2.PostEditor(); this.gridView2.UpdateCurrentRow(); IList <Model.Employee> list = this._emplist.Where(d => d.IsChecked == true).ToList(); if (list == null || list.Count == 0) { MessageBox.Show("至少選擇一位員工!", this.Text, MessageBoxButtons.OK); return; } else { f = new CalCrystalReportForm1(list, this.hryear, this.hrmonth); f.Show(); } }
private void btn_PrintTotal_Click(object sender, EventArgs e) { CalCrystalReportForm1 f = new CalCrystalReportForm1(this._emplist, this.hryear, this.hrmonth); f.Show(); }