143
Catch
MsgBox("Ошибка удаления записи")
End Try
End If
DisconnectFromBD()
End If
End Sub
Private Sub BtnEditEmployee_Click(sender As System.Object, e As
System.EventArgs) Handles BtnEditEmployee.Click
Dim FormAddEditEmp As New FormAddEditEmployee
FormAddEditEmployeeLoadCB(FormAddEditEmp)
FormAddEditEmp.BtnEmployeeAdd.Visible = False
FormAddEditEmp.BtnEmployeeEdit.Location =
FormAddEditEmp.BtnEmployeeAdd.Location
FormAddEditEmp.BtnEmployeeEdit.Visible = True
FormAddEditEmp.Text = "Редактирование записи"
IdTemp = DGVEmployee.CurrentRow.DataBoundItem(0).ToString
FormAddEditEmp.TBFirstName.Text =
DGVEmployee.CurrentRow.DataBoundItem(1).ToString
FormAddEditEmp.TBSecondName.Text =
DGVEmployee.CurrentRow.DataBoundItem(2).ToString
FormAddEditEmp.TBLastName.Text =
DGVEmployee.CurrentRow.DataBoundItem(3).ToString
FormAddEditEmp.TBLogin.Text =
DGVEmployee.CurrentRow.DataBoundItem(11).ToString
FormAddEditEmp.TBEmail.Text =
DGVEmployee.CurrentRow.DataBoundItem(12).ToString
FormAddEditEmp.TBPhone.Text =
DGVEmployee.CurrentRow.DataBoundItem(13).ToString
FormAddEditEmp.TBMobile.Text =
DGVEmployee.CurrentRow.DataBoundItem(14).ToString
FormAddEditEmp.CBPosition.Text =
DGVEmployee.CurrentRow.DataBoundItem(15).ToString