private void btnAdd_Click(object sender, EventArgs e) { AddTourLogic confirmTour = new AddTourLogic(); AddToursTable objaddtourstable = new AddToursTable(); if (!string.IsNullOrEmpty(txtAddTours.Text) && !string.IsNullOrEmpty(metroComboBox1.Text) && !string.IsNullOrEmpty(txtHotelprice.Text) && !string.IsNullOrEmpty(metroComboBox2.Text) && !string.IsNullOrEmpty(metroComboBox3.Text) && !string.IsNullOrEmpty(txtTransportcost.Text)) { var addtours = txtAddTours.Text.Trim(); var addhotel = metroComboBox1.Text.Trim(); var hotelprice = txtHotelprice.Text.Trim(); var location = metroComboBox2.Text.Trim(); var destination = metroComboBox3.Text.Trim(); var transportcost = txtTransportcost.Text.Trim(); objaddtourstable.AddTour = addtours; objaddtourstable.AddHotel = addhotel; objaddtourstable.AddHotelCost = hotelprice; objaddtourstable.AddLocation = location; objaddtourstable.AddDestination = destination; objaddtourstable.Selecttransport = CmbTransport.Text; objaddtourstable.AddTransportCost = transportcost; confirmTour.AddTour(objaddtourstable); MetroMessageBox.Show(this, "Saved"); } else { MetroMessageBox.Show(this, "You Need To FillUp All Field"); } }
private void BtnAdminDelete_Click(object sender, EventArgs e) { AddTourLogic ad = new AddTourLogic(); ad.deleteData(); }