public ChangeStatus(int UserId, object[] values) { employee = values; this.UserID = UserId; InitializeComponent(); List <InOutStatus> inOutStatuses = InOutStatus.GetStatuses(); BindingSource bindingSourcestatuses = new BindingSource(inOutStatuses, null); cmbStatus.DataSource = bindingSourcestatuses; cmbStatus.DisplayMember = "Description"; cmbStatus.ValueMember = "InOutStatusID"; }
public Form4(int UserId) { this.UserId = UserId; InitializeComponent(); List <InOutStatus> inOutStatuses = InOutStatus.GetStatuses(); List <Staff> staffs = Staff.GetStaffs(); BindingSource bindingSourcestatuses = new BindingSource(inOutStatuses, null); BindingSource bindingSourceStaff = new BindingSource(staffs, null); cmbStatus.DataSource = bindingSourcestatuses; cmbManagerID.DataSource = bindingSourceStaff; cmbStatus.DisplayMember = "Description"; cmbStatus.ValueMember = "InOutStatusID"; cmbManagerID.DisplayMember = "FirstName"; cmbManagerID.ValueMember = "StaffID"; cmbManagerID.SelectedIndex = -1; }