public void LogDocumento(Rastreo rastreo, List <Rastreo> list, string Conexion) { try { SqlDataReader dr = null; CapaDatos.CD_Datos CapaDatos = new CapaDatos.CD_Datos(Conexion); string[] Parametros = { "@Id_Emp", "@Id_Cd", "@Id_Fac" }; object[] Valores = { rastreo.Id_Emp, rastreo.Id_Cd, rastreo.Ras_Doc }; SqlCommand sqlcmd = CapaDatos.GenerarSqlCommand("FacturaBitacoraCobDetalle_Consultar", ref dr, Parametros, Valores); while (dr.Read()) { rastreo = new Rastreo(); rastreo.U_Actividad = dr.GetValue(dr.GetOrdinal("Actividad")).ToString(); rastreo.U_Nombre = dr.GetValue(dr.GetOrdinal("Usuario")).ToString(); rastreo.Doc_Fecha = Convert.ToDateTime(dr.GetValue(dr.GetOrdinal("Fecha"))); rastreo.Id_Relacion = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("Id_Relacion"))); list.Add(rastreo); } CapaDatos.LimpiarSqlcommand(ref sqlcmd); } catch (Exception ex) { throw ex; } }
public void Lista(Rastreo rastreo, List <Rastreo> list, string Conexion) { try { SqlDataReader dr = null; CapaDatos.CD_Datos CapaDatos = new CapaDatos.CD_Datos(Conexion); string[] Parametros = { "@Id_Emp", "@Id_Cd", "@Doc_Tipo", "@Id_SerieDoc", "@Id_Doc" }; object[] Valores = { rastreo.Id_Emp, rastreo.Id_Cd, rastreo.Ras_TipoDoc, rastreo.Ras_SerieDoc, rastreo.Ras_Doc }; SqlCommand sqlcmd = CapaDatos.GenerarSqlCommand("spProRastreo_Lista", ref dr, Parametros, Valores); while (dr.Read()) { rastreo = new Rastreo(); rastreo.Id_U = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("Id_U"))); rastreo.U_Nombre = dr.GetValue(dr.GetOrdinal("U_Nombre")).ToString(); rastreo.Cd_Externo = dr.GetValue(dr.GetOrdinal("Cd_Externo")).ToString(); rastreo.Doc_TipoMov = dr.GetValue(dr.GetOrdinal("Doc_TipoMov")).ToString(); rastreo.Id_Doc = Convert.ToInt32(dr.GetValue(dr.GetOrdinal("Id_Doc"))); rastreo.Doc_Fecha = Convert.ToDateTime(dr.GetValue(dr.GetOrdinal("Doc_Fecha"))); rastreo.Doc_Importe = Convert.ToDouble(dr.GetValue(dr.GetOrdinal("Doc_Importe"))); rastreo.Doc_Estatus = dr.GetValue(dr.GetOrdinal("Doc_Estatus")).ToString(); rastreo.Doc_EstatusStr = Estatus(dr.GetValue(dr.GetOrdinal("Doc_Estatus")).ToString()); list.Add(rastreo); } CapaDatos.LimpiarSqlcommand(ref sqlcmd); } catch (Exception ex) { throw ex; } }
static void Main(string[] args) { Stopwatch timeMeasure = new Stopwatch(); timeMeasure.Start(); DateTime horaInicio = DateTime.Now; Cabecera2 cabecera = new Cabecera2(); cabecera.pintarCabecera2(); SetCursorPosition(0, 10); string url = args[0]; Rastreo rastreo = new Rastreo(url, horaInicio, timeMeasure); }
private List <Rastreo> GetLogList() { try { List <Rastreo> list = new List <Rastreo>(); CN_Rastreo cn_rastreo = new CN_Rastreo(); Rastreo rastreo = new Rastreo(); rastreo.Id_Emp = session.Id_Emp; rastreo.Id_Cd = session.Id_Cd_Ver; rastreo.Ras_TipoDoc = Convert.ToInt32(cmbTipo.SelectedValue); rastreo.Ras_SerieDoc = cmbSerie.Text; rastreo.Ras_Doc = txtDocumento.Text; cn_rastreo.LogDocumento(rastreo, ref list, session.Emp_Cnx); return(list); } catch (Exception ex) { throw ex; } }
private List <Rastreo> GetList() { try { List <Rastreo> list = new List <Rastreo>(); CN_Rastreo cn_rastreo = new CN_Rastreo(); Rastreo rastreo = new Rastreo(); rastreo.Id_Emp = session.Id_Emp; rastreo.Id_Cd = session.Id_Cd_Ver; rastreo.Ras_TipoDoc = Convert.ToInt32(cmbTipo.SelectedValue); rastreo.Ras_SerieDoc = cmbSerie.Text; rastreo.Ras_Doc = txtDocumento.Text; cn_rastreo.Lista(rastreo, ref list, session.Emp_Cnx); return(list.Where(Rastreo => Rastreo.Doc_Fecha >= dpFecha.SelectedDate.Value.AddDays(-30)).ToList()); } catch (Exception ex) { throw ex; } }