public static Response <FallasDResponse> SelectFallasPorInforme(decimal IdInforme) { try { Response <FallasDResponse> response; List <FallasDEntity> List; List = FallasDData.SelectFallasPorInforme(IdInforme); response = new Response <FallasDResponse> { EsCorrecto = true, Valor = new FallasDResponse { List = List }, Mensaje = "OK", Estado = true, }; return(response); } catch (Exception ex) { return(new Response <FallasDResponse>(false, null, Functions.MessageError(ex), false)); } }
public static async Task <Response <FallasDResponse> > InsertFallasD(string IdSolicitudRevisionD, string IdSolicitudRevision, string Observacion, string UsuarioRegistro, string FechaRegistro, string HoraRegistro, int Estado, int IdSistema, int IdObservacion) { Response <FallasDResponse> response; FallasDEntity objFallasD; try { UsuarioRegistro = Convert.ToInt32(UsuarioRegistro).ToString("000#"); objFallasD = await FallasDData.InsertFallasD(IdSolicitudRevisionD, IdSolicitudRevision, Observacion, UsuarioRegistro, FechaRegistro, HoraRegistro, Estado, IdSistema, IdObservacion); response = new Response <FallasDResponse> { EsCorrecto = true, Valor = new FallasDResponse { FallasD = objFallasD }, Mensaje = "OK", Estado = true, }; return(response); } catch (FaultException <ServiceError> ) { throw; } catch (Exception ex) { return(new Response <FallasDResponse>(false, null, Functions.MessageError(ex), false)); } }
public static async Task <Response <FallasDResponse> > DeleteFallasD(string ID) { Response <FallasDResponse> response; FallasDEntity objFallasD; try { objFallasD = await FallasDData.DeleteFallasD(ID); if (objFallasD != null) { BusinessException.Generar(Constants.NO_ELIMINO); } response = new Response <FallasDResponse> { EsCorrecto = true, Valor = new FallasDResponse { FallasD = objFallasD }, Mensaje = "OK", Estado = true, }; return(response); } catch (FaultException <ServiceError> ) { throw; } catch (Exception ex) { return(new Response <FallasDResponse>(false, null, Functions.MessageError(ex), false)); } }