private void Btn_addTime_Click(object sender, EventArgs e) { string iDate = DateTimePickerShift.Value.ToString("yyyy-MM-dd"); int Shift = Convert.ToInt32(Txt_minutes.Text); string[] words = CmbBx_worker.SelectedItem.ToString().Split(' '); string worker_name = words[0]; string worke_surname = words[1]; string worker_id = api.getWorkerId(api.getAllWorkers(), worker_name, worke_surname); string construction_site_name = CmbBx_construction.SelectedItem.ToString(); string construction_id = api.getConstructionsId(api.getAllConstructions(), construction_site_name); api.addTime(admin_id, worker_id, construction_id, Shift, iDate); }