Beispiel #1
0
        private void iconButton4_Click(object sender, EventArgs e) // the rows that will be updating tech team
        {
            if (dgvTechTeam.SelectedCells.Count > 0)
            {
                int             selectedrowindex = dgvTechTeam.SelectedCells[0].RowIndex;
                DataGridViewRow selectedRow      = dgvTechTeam.Rows[selectedrowindex];
                string          id              = Convert.ToString(selectedRow.Cells["TechnicalID"].Value);
                string          name            = Convert.ToString(selectedRow.Cells["Name"].Value);
                string          surname         = Convert.ToString(selectedRow.Cells["Surname"].Value);
                string          specialization  = Convert.ToString(selectedRow.Cells["Specialization"].Value);
                string          deployed        = Convert.ToString(selectedRow.Cells["Deployed"].Value);
                string          deployementDate = Convert.ToString(selectedRow.Cells["DeploymentDate"].Value);


                UpdateTechForm utf = new UpdateTechForm();
                utf.SelectedTechValuess(id, name, surname, specialization, deployed, deployementDate);
                utf.FormClosed += new FormClosedEventHandler(ChildForm_Closed);
                utf.Show();
            }
        }
Beispiel #2
0
        private void btnUpdateOrder_Click(object sender, EventArgs e)
        {
            int    id             = int.Parse(lblTechID.Text);
            string name           = txtTechName.Text;
            string surname        = txtTechSurname.Text;
            string specialization = cmbSpecialization.Text;
            string deployed       = txtTechDeployed.Text;
            string deploymentDate = dtpDeployDate.Value.ToString("dd/MM/yyyy");

            TechnicalStaff ts = new TechnicalStaff();

            ts.UpdateBLTechnical(id, name, surname, specialization, deployed, deploymentDate);

            MessageBox.Show(deploymentDate);
            FormManagement fm = new FormManagement();

            fm.RefreshPage();

            UpdateTechForm utf = new UpdateTechForm();

            utf.Close();
        }