public static async Task <Response <InformeResponse> > DeleteTareaMecanicosAyudante(int IdAyudante) { Response <InformeResponse> response; try { await TareaMecanicosAyudanteData.DeleteTareaMecanicosAyudante(IdAyudante); response = new Response <InformeResponse> { EsCorrecto = true, Valor = new InformeResponse { Informe = new InformeEntity() }, Mensaje = "OK", Estado = true, }; return(response); } catch (FaultException <ServiceError> ) { throw; } catch (Exception ex) { return(new Response <InformeResponse>(false, null, Functions.MessageError(ex), false)); } }
public static Response <InformeResponse> ListTareaMecanicosAyudante(int IdTareaMecanico) { try { Response <InformeResponse> response; List <TareaMecanicosAyudanteList> List; List = TareaMecanicosAyudanteData.ListTareaMecanicosAyudante(IdTareaMecanico); response = new Response <InformeResponse> { EsCorrecto = true, Valor = new InformeResponse { ListTareaMecanicosAyudante = List }, Mensaje = "OK", Estado = true, }; return(response); } catch (Exception ex) { return(new Response <InformeResponse>(false, null, Functions.MessageError(ex), false)); } }
public static async Task <Response <InformeResponse> > InsertTareaMecanicosAyudante(InformeRequest request) { Response <InformeResponse> response; TareaMecanicosAyudanteEntity objTareaMecanicosAyudante; List <TareaMecanicosAyudanteList> ListTareaMecanicosAyudanteExiste; try { objTareaMecanicosAyudante = request.TareaMecanicosAyudante; ListTareaMecanicosAyudanteExiste = TareaMecanicosAyudanteData.ListTareaMecanicosAyudante(objTareaMecanicosAyudante.IdTareaMecanicos, objTareaMecanicosAyudante.CodMecanico); if (ListTareaMecanicosAyudanteExiste.Count > 0) { BusinessException.Generar(Constants.YA_EXISTE); } await TareaMecanicosAyudanteData.InsertTareaMecanicosAyudante(objTareaMecanicosAyudante); response = new Response <InformeResponse> { EsCorrecto = true, Valor = new InformeResponse { Informe = new InformeEntity() }, Mensaje = "OK", Estado = true, }; return(response); } catch (Exception ex) { throw; } }