private void buttonbookingstatus_Click(object sender, EventArgs e) { if (textBox4.Text == string.Empty || textBox5.Text == string.Empty) { MessageBox.Show("All required must be fillup!"); } else { EquipmentServices foodService = new EquipmentServices(); int result = foodService.Insert(new Food() { Name = textBox5.Text, Cost = Convert.ToDouble(textBox4.Text) }); if (result > 0) { MessageBox.Show("Food added."); UpdateGridView(); } else { MessageBox.Show("Error"); } } }