Example #1
0
        private void EmployeeAdd_Load(object sender, EventArgs e)
        {
            ddlDepartments.DataSource    = LookupFactory.Create(dbTable.department);
            ddlDepartments.DisplayMember = "title";
            ddlDepartments.ValueMember   = "id";
            ddlDepartments.SelectedValue = -1;

            ddlJobs.DataSource    = LookupFactory.Create(dbTable.job);
            ddlJobs.DisplayMember = "title";
            ddlJobs.ValueMember   = "id";
            ddlJobs.SelectedValue = -1;
        }
Example #2
0
        private void EmployeeModification_Load(object sender, EventArgs e)
        {
            ddlStatus.Items.Add("Retired");
            ddlStatus.Items.Add("Terminated");

            ddlDepartments.DataSource    = LookupFactory.Create(dbTable.department);
            ddlDepartments.DisplayMember = "title";
            ddlDepartments.ValueMember   = "id";
            ddlDepartments.SelectedValue = -1;

            ddlJobs.DataSource    = LookupFactory.Create(dbTable.job);
            ddlJobs.DisplayMember = "title";
            ddlJobs.ValueMember   = "id";
            ddlJobs.SelectedValue = -1;

            ddlDepartments.SelectedIndexChanged += new EventHandler(ddlDepartments_SelectedIndexChanged);
            LoadEmp();
        }