public HasilTaniJoin FindHasilTaniJoin(int idHasilTani)
        {
            HasilTaniJoin hasilTaniJoin = new HasilTaniJoin();
            JenisTani     jenisTani     = new JenisTani();
            Lokasi        lokasi        = new Lokasi();

            using (MySqlConnection conn = GetConnection())
            {
                conn.Open();
                MySqlCommand cmd = new MySqlCommand("SELECT * FROM hasil_tani INNER JOIN jenis_tani ON jenis_tani.id_jenistani = hasil_tani.id_jenistani INNER JOIN lokasi ON lokasi.id_lokasi = hasil_tani.id_lokasi WHERE id_hasil = '" + idHasilTani + "'", conn);
                using (MySqlDataReader reader = cmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        hasilTaniJoin.IdHasilTani = reader.GetInt32("id_hasil");
                        hasilTaniJoin.Jumlah      = reader.GetInt32("jumlah");
                        jenisTani.IdJenisTani     = reader.GetInt32("id_jenistani");
                        jenisTani.NamaJenisTani   = reader.GetString("nama_jenistani");
                        lokasi.IdLokasi           = reader.GetInt32("id_lokasi");
                        lokasi.Kecamatan          = reader.GetString("kecamatan");
                        lokasi.Kabupaten          = reader.GetString("kabupaten");
                        lokasi.Provinsi           = reader.GetString("provinsi");
                        lokasi.KodePos            = reader.GetInt32("kode_pos");
                        lokasi.Latitude           = reader.GetDecimal("latitude");
                        lokasi.Longitude          = reader.GetDecimal("longtitude");

                        hasilTaniJoin.jenisTani = jenisTani;
                        hasilTaniJoin.lokasi    = lokasi;
                    }
                }
            }
            return(hasilTaniJoin);
        }
        public JenisTani FindJenisTani(int idJenisTani)
        {
            JenisTani jenisTani = new JenisTani();

            using (MySqlConnection conn = GetConnection())
            {
                conn.Open();
                MySqlCommand cmd = new MySqlCommand("SELECT * FROM jenis_tani WHERE id_jenistani = ('" + idJenisTani + "')", conn);
                using (MySqlDataReader reader = cmd.ExecuteReader())
                {
                    while (reader.Read())
                    {
                        jenisTani.IdJenisTani   = reader.GetInt32("id_jenistani");
                        jenisTani.NamaJenisTani = reader.GetString("nama_jenistani");
                    }
                }
            }

            return(jenisTani);
        }