public void obtenerTiemposPorEstado() { Ticket objTpE = null; DateTime dtFecIni; DateTime dtFecFin; List<String> lsGrupo = null; List<String> lsEstado = null; objTpE = new Ticket(); dtFecIni = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1); dtFecFin = DateTime.Now; //dtFecIni = new DateTime(2012, 7, 1); //dtFecFin = new DateTime(2012, 8, 1); lsEstado = new List<string>(); lsEstado.Add("CL"); lsEstado.Add("RE"); lsGrupo = new List<string>(); lsGrupo.Add("SOPORTE EN SITIO - LIMA"); lsGrupo.Add("SOPORTE EN SITIO - PROV"); try { dtNivel2 = objTpE.Listar_TiemposPorEstado(dtFecIni, dtFecFin, lsEstado, lsGrupo, new List<string>(), "I"); dtNivel2 = DataHelper.Filter(dtNivel2, "Prioridad in ('0','1','2','3','4')"); } catch (SqlException ex) { throw new Exception("Ocurrió un error con la Base de datos cuando se intentó obtener los tiempos por estado.", ex); } catch (Exception ex) { throw new Exception("Ocurrió un error no controlado cuando se intento obtener los tiempos por estado.", ex); } }
private DataTable ObtenerRequerimientos() { DataTable dt = null; Ticket objTpE = null; DateTime dtFecIni; DateTime dtFecFin; List<string> lsGrupo = null; List<string> lsEstado = null; List<string> lsCategoria = null; string sTipo = null; objTpE = new Ticket(); dtFecIni = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1); dtFecFin = DateTime.Now; //dtFecIni = new DateTime(2012, 7, 1); //dtFecFin = new DateTime(2012, 8, 1); lsEstado = new List<string>(); lsEstado.Add("CL"); lsEstado.Add("RE"); lsGrupo = new List<string>(); lsGrupo.Add("SOPORTE EN SITIO - LIMA"); lsCategoria = new List<string>(); lsCategoria.Add("Asignacion.PC"); lsCategoria.Add("Asignacion.Laptop"); sTipo = "R"; try { dt = objTpE.Listar_TiemposPorEstado(dtFecIni, dtFecFin, lsEstado, lsGrupo, lsCategoria, sTipo); //Se filtran los tickets abiertos desde el 2012-09-17 porque esa es la fecha en que se activó el SLA dt = DataHelper.Filter(dt, "open_date > #2012-09-17#"); } catch (SqlException ex) { throw new Exception("Ocurrió un error con la Base de datos cuando se intentó obtener los tiempos por estado.", ex); } catch (Exception ex) { throw new Exception("Ocurrió un error no controlado cuando se intento obtener los tiempos por estado.", ex); } return dt; }
public void obtenerTickets() { Ticket objTkt = null; DateTime dtFecIni; DateTime dtFecFin; List<string> lsGrupo = null; List<string> lsEstado = null; objTkt = new Ticket(); dtFecIni = new DateTime(DateTime.Today.Year, DateTime.Today.Month, 1); dtFecFin = DateTime.Now; //dtFecIni = new DateTime(2013, 1, 1); //dtFecFin = new DateTime(2013, 2, 1); lsEstado = new List<string>(); lsEstado.Add("CL"); lsEstado.Add("RE"); lsGrupo = new List<string>(); lsGrupo.Add("INGENIERÍA"); lsGrupo.Add("PRODUCCION"); try { dtDatos = objTkt.Listar_TiemposPorEstado(dtFecIni, dtFecFin, lsEstado, lsGrupo, new List<string>(), "I"); //Se filtran las prioridades que no pertenecen a Ingeniería dtDatos = DataHelper.Filter(dtDatos, "Prioridad in ('0-l','1-l','2-l','3-l','0-lfh','1-lfh','2-lfh','3-lfh')"); } catch (SqlException ex) { throw new Exception("Ocurrió un error con la Base de datos cuando se intentaba obtener el listado de tickets de ingeniería.", ex); } catch (Exception ex) { throw new Exception("Ocurrió un error no controlado cuando se intentaba obtener el listado de tickets de ingeniería.", ex); } }