public SectionAddModify(SectionMainform sMain) { InitializeComponent(); cgrade = new ClassGrade(); section = new ClassSection(); this.sMain = sMain; }
public int update(MySqlConnection con, int id) { int gradeid = gradeID(con); // int programid = programID(con); int sectionid = new ClassSection().getSectionID(con, section, grade); query = @"UPDATE student SET rfid=?rfid, studentID=?stdid, lrn=?lrn, lname=?lname, fname=?fname, mname=?mname, sex=?sex, gradeID=?gid, sectionID=?sectionid, mobileNo=?mobile, pMobileNo=?pmobile, guardian=?guardian, img=?img, isExempted=?xmtd WHERE id=?id"; cmd = new MySqlCommand(query, con); cmd.Parameters.AddWithValue("?rfid", rfid); cmd.Parameters.AddWithValue("?stdid", studentID); cmd.Parameters.AddWithValue("?lrn", lrn); cmd.Parameters.AddWithValue("?lname", lname); cmd.Parameters.AddWithValue("?fname", fname); cmd.Parameters.AddWithValue("?mname", mname); cmd.Parameters.AddWithValue("?sex", sex); cmd.Parameters.AddWithValue("?gid", gradeid); cmd.Parameters.AddWithValue("?sectionid", sectionid); // cmd.Parameters.AddWithValue("?progID", programid); // cmd.Parameters.AddWithValue("?yrlvl", yearlvl); cmd.Parameters.AddWithValue("?mobile", mobileNo); cmd.Parameters.AddWithValue("?pmobile", pmobileNo); cmd.Parameters.AddWithValue("?guardian", guardian); cmd.Parameters.AddWithValue("?img", imgData()); cmd.Parameters.AddWithValue("?xmtd", exempted); cmd.Parameters.AddWithValue("?id", id); int i = cmd.ExecuteNonQuery(); cmd.Dispose(); return(i); }
//public StudentAddForm() //{ // InitializeComponent(); //} public StudentAddForm(StudentMainform _frm) { InitializeComponent(); std = new ClassStudent(); cGrade = new ClassGrade(); cSection = new ClassSection(); cProgram = new Programs(); open = new OpenFileDialog(); this._frm = _frm; }
public SectionMainform() { InitializeComponent(); section = new ClassSection(); cGrade = new ClassGrade(); }