Exemplo n.º 1
0
 public List<EntTableroGestionQueja> ObtenerTableroGestion(EntTableroGestionQueja ent)
 {
     DataTable dt = new DatPrincipal().ObtenerTableroGestion(ent.FechaInicial, ent.FechaFinal, ent.Queja, ent.Sistema, 0, ent.EjecSAC, ent.NumServicio, ent.Cliente, ent.Etapa, ent.Definicion, ent.Estado, ent.Municipio);
     List<EntTableroGestionQueja> lst = new List<EntTableroGestionQueja>();
     foreach (DataRow dr in dt.Rows)
     {
         EntTableroGestionQueja enti = new EntTableroGestionQueja();
         enti.CausaId = Convert.ToInt32(dr["CAUSA_ID"]);
         enti.Queja = dr["QUEJA_REPORTE"].ToString();
         enti.Descripcion = dr["CATA_CAUSA_DESCRIPCION"].ToString();
         enti.NumServicio = dr["QUEJA_NUMERO_SERVICIO"].ToString();
         enti.UnidadNegocio = dr["SIST_NOMBRE"].ToString();
         enti.ClienteNombre = dr["cliente_NomCliente"].ToString();
         enti.NombServicio = dr["Servicio_NomServicio"].ToString();
         enti.FechaAlta = Convert.ToDateTime(dr["QUEJA_FECHA_ALTA"]);
         enti.fAlta = enti.FechaAlta.ToString("dd/MM/yyyy HH:mm");
         enti.NombreEjecutivoSAC = dr["CATA_EJECSAC_NOMBRE"].ToString();
         enti.FechaAsigResp = dr["BITA_FECHA_ASIGNACION_RESPONSABLE"] is DBNull ? Convert.ToDateTime("01/01/1900") : Convert.ToDateTime(dr["BITA_FECHA_ASIGNACION_RESPONSABLE"]);
         enti.fAsigResp = enti.FechaAsigResp.ToString("dd/MM/yyyy HH:mm");
         enti.FechaContResp = dr["BITA_FECHA_CONTACTAR_RESPONSABLE"] is DBNull ? Convert.ToDateTime("01/01/1900") : Convert.ToDateTime(dr["BITA_FECHA_CONTACTAR_RESPONSABLE"]);
         enti.fContResp = enti.FechaContResp.ToString("dd/MM/yyyy HH:mm");
         lst.Add(enti);
     }
     return lst;
 }
Exemplo n.º 2
0
 public static string ObtenerTableroGestion(string fechaInicial, string FechaFinal, string Queja, string UnidadNegocio, string TipoServicio, string EjecutivoSAC, string NoServicio, string Cliente, string Etapa, string Definicion, string Estado, string Municipio)
 {
     EntTableroGestionQueja ent = new EntTableroGestionQueja();
     ent.FechaInicial = Convert.ToDateTime(fechaInicial);
     ent.FechaFinal = Convert.ToDateTime(FechaFinal);
     ent.Sistema = Convert.ToInt32(UnidadNegocio);
     ent.Queja = Queja;
     ent.TipoServicio = TipoServicio == "" ? 0 : Convert.ToInt32(TipoServicio);
     ent.EjecSAC = EjecutivoSAC == "" ? 0 : Convert.ToInt32(EjecutivoSAC);
     ent.NumServicio = NoServicio;
     ent.Cliente = Cliente == "" ? 0 : Convert.ToInt32(Cliente);
     ent.Etapa = Etapa == "" ? 0 : Convert.ToInt32(Etapa);
     ent.Definicion = Definicion == "" ? true : Convert.ToBoolean(Definicion);
     ent.Estado = Estado == "" ? 0 : Convert.ToInt32(Estado);
     ent.Municipio = Municipio == "" ? 0 : Convert.ToInt32(Municipio);
     
     List<EntTableroGestionQueja> lst = new BusQueja().ObtenerTableroGestion(ent);
     JavaScriptSerializer oSerializer = new JavaScriptSerializer();
     string sJSON = oSerializer.Serialize(lst);
     return sJSON;
 }