Exemple #1
0
        private void MainForm_Load(object sender, EventArgs e)
        {
            GridBuilder.FillTheGrid(getVReservation.GetVReservations(), dgvVReservation);
            SetEnabledClientControl(false);
            SetEnabledServiceControl(false);
            ComboBoxSetData.SetDataToCmbClient(cmbClientList);

            ComboBoxSetData.SetDataToCmbServices(cmbListServices);
            FillClientControls(null, true);
            ComboBoxSetData.SetDataToCmbEmployee(tscmbEmployee.ComboBox);
            // dtpDateFind.Value = DateTime.Now;
        }
Exemple #2
0
        private void BtnAddEmployee_Click(object sender, EventArgs e)
        {
            int employeID = -1;

            if (tscmbEmployee.ComboBox.SelectedIndex == 0)
            {
                employeID = insertObjectToDB.GetEmployeeIdAndInsertToDB(tstxbEmployeeName.TextBox.Text);
                ComboBoxSetData.SetDataToCmbEmployee(tscmbEmployee.ComboBox);
            }
            else
            {
                MessageBox.Show("Nie można dodać nowego pracownika");
            }
        }