private void button2_Click(object sender, EventArgs e) { //SqlConnection cnn ; /* * * * cnn = new SqlConnection(conString); * cnn.Open(); * string sql = "SELECT * FROM Payroll_Employee where Emp_ID like '%" + empl_ID.Text + "%' "; * SqlDataAdapter dscmd = new SqlDataAdapter(sql, cnn); * PayrollDataSet_new ds = new PayrollDataSet_new(); * dscmd.Fill(ds, "Payroll_Employee"); * MessageBox.Show(ds.Tables[1].Rows.Count.ToString()); * cnn.Close(); * * payslip objRpt = new payslip(); * objRpt.SetDataSource(ds.Tables[1]); * frmPayslip ne = new frmPayslip(); * crystalReportViewer1.ReportSource = objRpt; * crystalReportViewer1.Refresh(); */ frmPayslip pay = new frmPayslip(); pay.Show(); }
private void salarySlipToolStripMenuItem_Click(object sender, EventArgs e) { //SalarySlip payslip = new SalarySlip(); //payslip.Show(); frmPayslip pay = new frmPayslip(); pay.Show(); }