Exemplo n.º 1
0
        public int check_refuse(apply applyDemo, teacher teacherDemo, string refuse)
        {
            MySqlConnection conn = CP.getConnection();
            DateTime        DT   = DateTime.Now;
            string          sql;

            if (teacherDemo.getTeacher_pos() == 1)
            {
                sql = $"update tb_apply set check_tutor=2,apply_editTime='{DT}',apply_refuse='{refuse}' where apply_ID={applyDemo.getApply_ID()}";
            }
            else
            {
                sql = $"update tb_apply set check_instructor=2,apply_editTime='{DT}',apply_refuse='{refuse}' where apply_ID={applyDemo.getApply_ID()}";
            }
            MySqlCommand cmd = new MySqlCommand(sql, conn);
            int          j   = cmd.ExecuteNonQuery();

            CP.closeConnection(conn);
            return(j);
        }