public void fillNo() { ConnexionBD obj = new ConnexionBD(); obj.connect(); obj.com.CommandText = "select COUNT (*) from tblFichePaie"; int maxrow = (int)obj.com.ExecuteScalar(); maxrow = maxrow + 1; lblSlipNo.Text = maxrow.ToString(); obj.con.Close(); }
private void fillId() { ConnexionBD obj = new ConnexionBD(); obj.connect(); obj.com.CommandText = "select COUNT (EmployeeId) from tblDetailPersonnel"; int maxrow = (int)obj.com.ExecuteScalar(); maxrow = maxrow + 1; txtEmpid.Text = maxrow.ToString(); txtEmpIdContct.Text = maxrow.ToString(); txtIdQualication.Text = maxrow.ToString(); txtEmpIdJob.Text = maxrow.ToString(); obj.con.Close(); }