protected void btnRegExtrenal_Click(object sender, EventArgs e) { clearMsgLabel(); resetLabelControl(); Promotion promotion = new Promotion(); Employee employee = new Employee(); //if Data is not valid - stop the flow if (!ValidateInputAndFillPromotionEmployee(promotion, employee)) { return; } //continue otherwise PromotionManager promotionManager = new PromotionManager(promotion); EmployeeManager employeeManager = new EmployeeManager(employee); TransactionResponse response = null; //For other district employee we need to register there information both on promotion table and other district promotion response = promotionManager.addNewPromotionForOtherDistrict(); response = employeeManager.storeEmployeefromOtherDistrictForPromotion(txtOtherMinNo.Text.Trim(), PageAccessManager.getDistrictID()); //if store to DB is successful, register notification for this Promotion if (response.isSuccessful()) { msgPanel.Visible = true; SucessDIV.Visible = true; lblSuccessMessage.Text = response.getMessage(); btnRegExtrenal.Visible = false; btnCancelExtrenal.Visible = true; } // show error message to a user. else { msgPanel.Visible = true; ErroroDIV.Visible = true; lblErrorMsg.Text = "(" + response.getErrorCode() + ") " + response.getMessage(); } }