private void OrderQuery_Load(object sender, EventArgs e) { if (Sharevariables.EnableWorkFlow) { Data statuses = ShardDb.getOrderStatus(Sharevariables.UserLevel); if (!statuses.Success) { this.Close(); return; } comboBoxStatus.DisplayMember = "name"; comboBoxStatus.ValueMember = "id"; comboBoxStatus.DataSource = statuses.DataTable; comboBoxStatus.SelectedIndex = 0; } else { labelStatus.Visible = false; comboBoxStatus.Visible = false; loadOrders(); } }