private void populateAssignedPromotion() { DropDownLMinuteNo.Items.Clear(); DropDownLMinuteNo.Items.Add(new ListItem(" -- SELECT --", "-1")); DataTable dataTable = null; try { PromotionManager promotionManager = new PromotionManager(); dataTable = promotionManager.getUnassignedPromotion(); if (dataTable != null && dataTable.Rows.Count > 0) { // PROCESSOR DropDownLMinuteNo.DataSource = dataTable; DropDownLMinuteNo.DataValueField = "Minute_No"; DropDownLMinuteNo.DataTextField = "promotionDetial"; DropDownLMinuteNo.DataBind(); } else { clearMsgPanel(); msgPanel.Visible = true; InfoDIV.Visible = true; lblInformationMsg.Text = "Vacancy is opened for all promotion in the database, please first register new promoted employee and come back for Promotion assignment"; AssignPromotionPanel.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); } }