public int insert(apply applyDemo) { MySqlConnection conn = CP.getConnection(); string sql; sql = "insert into tb_apply(stu_ID,tutor_ID,instructor_ID,apply_time,apply_start,apply_end," + "apply_reason,check_tutor,check_instructor,apply_editTime) values" + $"({applyDemo.getStu_ID()},{applyDemo.getTutor_ID()},{applyDemo.getInstructor_ID()}," + $"'{applyDemo.getApply_time()}','{applyDemo.getApply_start()}','{applyDemo.getApply_end()}'," + $"'{applyDemo.getApply_reason()}',{applyDemo.getCheck_tutor()},{applyDemo.getCheck_instructor()}," + $"'{applyDemo.getApply_editTime()}')"; MySqlCommand cmd = new MySqlCommand(sql, conn); int j = cmd.ExecuteNonQuery(); CP.closeConnection(CP.getConnection()); return(j); }