private void ProjectEditForm_Load(object sender, EventArgs e) { cmbEmployeeType.DataSource = _employeeTypeBLL.GetAll().OrderBy(x => x.EmployeeTypeID).ToList(); cmbEmployeeType.DisplayMember = "Name"; cmbEmployeeType.ValueMember = "EmployeeTypeID"; _cmbSelectedID = (int)cmbEmployeeType.SelectedValue; cmbCustomer.DataSource = _customerBLL.GetAll().OrderBy(x => x.CompanyName).ToList(); cmbCustomer.DisplayMember = "CompanyName"; cmbCustomer.ValueMember = "CustomerID"; EmployeeListRefresh(); }
private void EmployeeEditForm_Load(object sender, EventArgs e) { cmbEmployeeType.DataSource = _employeeTypeBLL.GetAll(); cmbEmployeeType.ValueMember = "EmployeeTypeID"; cmbEmployeeType.DisplayMember = "Name"; if (choice) { employee = _employeeBLL.Get(id); txtEmployeeName.Text = employee.FirstName; txtEmployeeLastName.Text = employee.LastName; txtEmployeeName.Enabled = false; txtEmployeeLastName.Enabled = false; cmbEmployeeType.SelectedValue = employee.EmployeeTypeID; //cmbEmployeeType.ValueMember = employee.EmployeeType.ToString(); mskdTxtPhone.Text = employee.Phone; txtEmail.Text = employee.EMail; txtPassword.Text = employee.Password; btnCreateEmployee.Text = "Güncelle"; } }