Ejemplo n.º 1
0
 private void frmHobbies_Load_1(object sender, EventArgs e)
 {
     dgvHobby.AutoGenerateColumns = false;
     el                  = new HobbyList();
     el.Savable         += El_Savable;
     el                  = el.GetAll();
     dgvHobby.DataSource = el.List;
 }
Ejemplo n.º 2
0
        private void Form1_Load(object sender, EventArgs e)
        {
            el = new EmployeeList();

            departments = new DepartmentList();
            departments = departments.GetAll();


            phoneTypes = new PhoneTypeList();
            phoneTypes = phoneTypes.GetAll();

            emailTypes = new EmailTypeList();
            emailTypes = emailTypes.GetAll();

            HobbyList hobbyList;

            hobbyList = new HobbyList();
            hobbyList.GetAll();
            LoadHobbies(hobbyList);

            dgvFamily.DataError                  += DgvFamily_DataError;
            dgvFamily.CellFormatting             += DgvFamily_CellFormatting;
            dgvEmployee.CellFormatting           += DgvEmployee_CellFormatting;
            dgvEmployeePhones.CellFormatting     += DgvEmployeePhones_CellFormatting;
            dgvEmployeeEmail.CellFormatting      += DgvEmployeeEmail_CellFormatting;
            dgvEmployeePhones.DataError          += DgvEmployeePhones_DataError;
            dgvEmployeeEmail.DataError           += DgvEmployeeEmail_DataError;
            dgvEmployee.DataError                += DgvEmployee_DataError;
            dgvEmployee.AutoGenerateColumns       = false;
            dgvSubordinate.AutoGenerateColumns    = false;
            dgvSubordinate.CellFormatting        += DgvSubordinate_CellFormatting;
            dgvSubordinate.DataError             += DgvSubordinate_DataError;
            dgvFamily.AutoGenerateColumns         = false;
            dgvEmployeePhones.AutoGenerateColumns = false;
            dgvEmployeeEmail.AutoGenerateColumns  = false;
            el.Savable     += El_Savable;
            mnuSave.Enabled = false;
            dgvEmployee.RowHeaderMouseDoubleClick    += DgvEmployee_RowHeaderMouseDoubleClick;
            dgvSubordinate.RowHeaderMouseDoubleClick += DgvSubordinate_RowHeaderMouseDoubleClick;
        }