private void populateManagerialPosition(string branch) { DropDManagPosition.Items.Clear(); DropDManagPosition.Items.Add(new ListItem(" -- SELECT --", "-1")); DataTable dataTable = null; try { PromotionManager promotionManager = new PromotionManager(); dataTable = promotionManager.getmanagerialPosition(branch); if (dataTable != null && dataTable.Rows.Count > 0) { // PROCESSOR DropDManagPosition.DataSource = dataTable; DropDManagPosition.DataValueField = "Emp_ID"; DropDManagPosition.DataTextField = "empDetail"; DropDManagPosition.DataBind(); btnSave.Visible = true; } else { clearmsgPanel(); msgPanel.Visible = true; InfoDIV.Visible = true; lblInformationMsg.Text = "The selected Employee doesnt have a manager, please check and try again."; btnSave.Visible = false; } } //CATCH ANY OTHER EXCEPTION, dont let user see any kind of unexpected error catch (Exception ex) { //Write this exception to file for investigation of the issue later. LoggerManager.LogError(ex.ToString(), logger); } }