private void txtget_Click(object sender, EventArgs e) { // the following code string ct = CAP2.getsn(); txtstdname2.Text = ct; int cno = CAP2.getcours(); txtenrolled2.Text = Convert.ToString(cno); DateTime dttime = CAP2.getstartdate(); txtstartdate.Text = Convert.ToString(dttime); string type1 = CAP2.gettype(); txtclasstype.Text = type1; }
private void txtget_Click(object sender, EventArgs e) { // the following code is used to get values of the entered data from the second class. string ct = CAP2.getsn(); txtstdname2.Text = ct; int cno = CAP2.getcours(); txtenrolled2.Text = Convert.ToString(cno); DateTime dttime = CAP2.getstartdate(); txtstartdate.Text = Convert.ToString(dttime); string type1 = CAP2.gettype(); txtclasstype.Text = type1; string t = CAP2.getcrsno(); txtcoursename2.Text = t; }
public static void gettype() { CAP2.settype(type); }
public static void getdate() { CAP2.setstartdate(datTime); }
public static void getnocours() { CAP2.setscours(nocourse); }
public static void getsn() { CAP2.setsn(txtstdname1); }
// used to pass the value to class 2. public static void getcoursno() { CAP2.setcours(t); }