private void Add_Product(object sender, RoutedEventArgs e) { if (CarImage == null || CarImage.Length == 0 || Price.Text == "" || Speed.Text == "" || ExColour.Text == "" || TankCapacity.Text == "" || Model.Text == "" || Model.Text == "" || Warranty.Text == "" || InColour.Text == "" || quantity.Text == "" || CarName.Text == "") { MessageBox.Show("Please Fill All Details"); return; } DBManager.AddCarProduct(CarImage, Price.Text, Speed.Text, ExColour.Text, InColour.Text, TankCapacity.Text, Model.Text, Warranty.Text, quantity.Text, CarName.Text); quantity.Text = Price.Text = Speed.Text = ExColour.Text = InColour.Text = TankCapacity.Text = Model.Text = Warranty.Text = ""; GlobalGrids.updateviewitems(); }