private void btnAddSubject_Click(object sender, EventArgs e)
 {
     // Create Object
     Subject newObj = new Subject();
     newObj.SubjectName1 = txtAddSubjectName.Text;
     newObj.Class_ID1 = int.Parse(txtClassID.SelectedValue.ToString());
     newObj.SubjectDescription1 = txtAddSubjectDescription.Text;
     // Assign read form's fields to object's fields
     // Call Save
     newObj.save();
     // http://tech.pro/tutorial/776/csharp-tutorial-binding-a-datagridview-to-a-collection
     this.Close();
 }
 /// <summary>
 /// Object Specific function
 /// </summary>
 /// <param name="dr"></param>
 /// <returns></returns>
 public override object convertFromReader(OleDbDataReader dr)
 {
     Subject gotUserFromDB = new Subject();
     // Gaurav - Replace below as first one
     gotUserFromDB.Subject_ID = int.Parse(dr[DatabaseCoachingInst.Subject.Subject_ID.ToString()].ToString());
     gotUserFromDB.SubjectName = dr[DatabaseCoachingInst.Subject.SubjectName.ToString()].ToString();
     gotUserFromDB.Class_ID = int.Parse(dr[DatabaseCoachingInst.Subject.Class_ID.ToString()].ToString());
     gotUserFromDB.SubjectDescription = dr[DatabaseCoachingInst.Subject.SubjectDescription.ToString()].ToString();
     // write similar code for other fields.
     return gotUserFromDB;
 }