private void button1_Click(object sender, EventArgs e) { dateTimePicker1.CustomFormat = "yyyy MM dd"; dateTimePicker1.Format = DateTimePickerFormat.Custom; cbVreme.Items.Add(cbVreme); cbTip.Items.Add(cbTip); try { Bazaa.zauzmiTermin(dateTimePicker1.Text, cbVreme.Text, cbTip.Text, comboBox1.Text); MessageBox.Show("Uspešno"); } catch (Exception ex) { MessageBox.Show(ex.Message); } }