/**
  * Deletes an existing Subcodigos model.
  * If deletion is successful, the browser will be redirected to the 'index' page.
  * @param integer $id
  * @return mixed
  */
 public function actionDelete($id)
 {
     $model = $this->findModel($id);
     $identificador = $model->identificador;
     $code = $model->codigo;
     $model->delete();
     Subcodigos::getDb()->createCommand('call ajustarIdentificadores(' . $identificador . ',' . $code . ')')->execute();
     return $this->redirect(['index']);
 }