Пример #1
0
        //======================================================================//
        //======================================================================//
        //======================================================================//
        #endregion

        #region EMPLOYEES FUNCTIONS
        //======================================================================//
        //=======================  EMPLOYEES ===================================//
        //======================================================================//
        private void btnAddEmployee_Click(object sender, EventArgs e)
        {
            FormEmployees f = new FormEmployees();

            f.ShowDialog();
            UpdateEmployeeList("", false);
        }
Пример #2
0
 private void dgEmployees_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
 {
     if (dgEmployees.SelectedRows.Count != 0)
     {
         try
         {
             DBConnector   db = new DBConnector();
             Employee      es = db.SearchEmployee("id", dgEmployees.SelectedRows[0].Cells[1].Value.ToString(), false)[0];
             FormEmployees f  = new FormEmployees();
             f.EditingMode(es);
             f.ShowDialog();
             //UpdateEmployeeList();
         }
         catch (Exception ex)
         {
             MessageBox.Show(ex.Message);
             //throw;
         }
     }
 }