private void searchcargoBtn_Click(object sender, EventArgs e) { int x = -1; if (cargoidTxt.Text != "") { x = int.Parse(cargoidTxt.Text); } dataView.DataSource = Kontrol_Et.sorguCargo(0, x, fromTxt.Text, toTxt.Text, cargomannameTxt.Text, cargomanidTxt.Text, cargofromnameTxt.Text); dataView.Update(); }
private void removecargoBtn_Click(object sender, EventArgs e) { int x = -1; if (cargoidTxt.Text != "") { x = int.Parse(cargoidTxt.Text); } try { dataView.DataSource = Kontrol_Et.sorguCargo(1, x, fromTxt.Text, toTxt.Text, cargomannameTxt.Text, cargomanidTxt.Text, cargofromnameTxt.Text); dataView.Update(); MessageBox.Show("Deletion Succesfull"); } catch (Exception) { MessageBox.Show("Deletion failed"); } }
private void addcargoBtn_Click(object sender, EventArgs e) { int x = -1; if (cargoidTxt.Text != "") { x = int.Parse(cargoidTxt.Text); } try { dataView.DataSource = Kontrol_Et.sorguCargo(2, x, fromTxt.Text, toTxt.Text, cargomannameTxt.Text, cargomanidTxt.Text, cargofromnameTxt.Text); dataView.Update(); MessageBox.Show("Added succesfully"); } catch (Exception) { MessageBox.Show("Failed to insert to database"); } }