private void UpdateFuncionario(Int32 idFuncionario)
{
ENTFuncionario oENTFuncionario = new ENTFuncionario();
ENTResponse oENTResponse = new ENTResponse();
BPFuncionario oBPFuncionario = new BPFuncionario();
try
{
// Formulario
oENTFuncionario.FuncionarioId = idFuncionario;
oENTFuncionario.idUsuario = this.wucBusquedaUsuario.UsuarioID;
oENTFuncionario.TituloId = Int16.Parse(this.ddlActionTitulo.SelectedValue);
oENTFuncionario.PuestoId = Int16.Parse(this.ddlActionPuesto.SelectedValue);
oENTFuncionario.FechaIngreso = this.wucCalendar.BeginDate;
// Transacción
oENTResponse = oBPFuncionario.UpdateFuncionario(oENTFuncionario);
// Validaciones
if (oENTResponse.GeneratesException) { throw (new Exception(oENTResponse.sErrorMessage)); }
if (oENTResponse.sMessage != "") { throw (new Exception(oENTResponse.sMessage)); }
// Transacción exitosa
ClearActionPanel();
// Actualizar grid
SelectFuncionario();
// Mensaje de usuario
ScriptManager.RegisterStartupScript(this.Page, this.GetType(), Convert.ToString(Guid.NewGuid()), "alert('Información actualizada con éxito!'); focusControl('" + this.ddlArea.ClientID + "');", true);
}catch (Exception ex){
throw (ex);
}
}