コード例 #1
0
        public void Delete(RetireTcasesClass p)
        {
            MysqlConnect();
            string       query = "Delete from `tcase`  where case_id=" + p.case_id;
            MySqlCommand comm  = new MySqlCommand(query);

            comm.Connection = mysql;
            mysql.Open();
            comm.ExecuteNonQuery();
            mysql.Close();
            return;
        }
コード例 #2
0
        public RetireTcasesClass Detail(string case_id_name)
        {
            MysqlConnect();
            string       query = "select * from tcase where retire=1 and case_id_name='" + case_id_name + "'";
            MySqlCommand comm  = new MySqlCommand(query);

            comm.Connection = mysql;
            mysql.Open();

            MySqlDataReader dr = comm.ExecuteReader();

            dr.Read();
            RetireTcasesClass x = new RetireTcasesClass
            {
                case_id      = (int)dr["case_id"],
                case_id_name = dr["case_id_name"].ToString()
            };

            mysql.Close();
            return(x);
        }