public string ConsultarReporte(int id_usuario, int id_reto, int id_gym, int id_evento) { /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Reporte_consultarReporte) ENABLED START*/ // Write here your custom code... if (id_gym != -1 && id_reto == -1 && id_evento == -1) { ReporteCEN report = new ReporteCEN(); ReporteEN reporen = new ReporteEN(); reporen = FiltrarReportePorGymkanaYUsuario(id_gym, id_usuario); return(reporen.Motivo); } else if (id_gym == -1 && id_reto != -1 && id_evento == -1) { ReporteCEN report = new ReporteCEN(); ReporteEN reporen = new ReporteEN(); reporen = FiltrarReportePorRetoYUsuario(id_reto, id_usuario); return(reporen.Motivo); } else if (id_gym == -1 && id_reto == -1 && id_evento != -1) { ReporteCEN report = new ReporteCEN(); ReporteEN reporen = new ReporteEN(); reporen = FiltrarReportePorEventoYUsuario(id_gym, id_usuario); return(reporen.Motivo); } return(null); /*PROTECTED REGION END*/ }
public void Reportar(int id_usuario, int id_gym, int id_reto, string motivo) { /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Reporte_Reportar) ENABLED START*/ // Write here your custom code... ReporteEN repor = new ReporteEN(); ReporteCEN reporcen = new ReporteCEN(); AdminCEN admincen = new AdminCEN(); System.Collections.Generic.IList <AdminEN> admin = null; System.Collections.Generic.IList <int> numadmins = null; System.Collections.Generic.IList <ReporteEN> listareporte; listareporte = reporcen.GetAll(0, 0); int aux = 0; foreach (AdminEN element in admin) { numadmins.Add(element.ID); } aux = listareporte [listareporte.Count - 1].ID; admin = admincen.GetAll(0, 0); reporcen.New_(motivo, aux + 1, id_usuario, numadmins, id_reto, id_gym); /*PROTECTED REGION END*/ }