Ejemplo n.º 1
0
        public List <ServicioResumen> getIntervals()
        {
            List <ServicioResumen> Services = new List <ServicioResumen>();

            try
            {
                using (SqlConnection con = new SqlConnection(BDCon))
                {
                    using (SqlCommand cmd = new SqlCommand("[Conf].[Usp_ObtieneIntervaloServicio]", con))
                    {
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.AddWithValue("@CodeService", "ADE.Services.SummaryDelivery");
                        con.Open();
                        SqlDataReader dr;
                        dr = cmd.ExecuteReader();
                        while (dr.Read())
                        {
                            ServicioResumen line = new ServicioResumen();
                            line.Id             = dr[0].ToString().Trim();
                            line.CodeService    = dr[1].ToString().Trim();
                            line.NameService    = dr[2].ToString().Trim();
                            line.ValueTime      = dr[3].ToString().Trim();
                            line.IntervalValue  = dr[4].ToString().Trim();
                            line.MaxNumAttempts = dr[5].ToString().Trim();
                            line.RucEntity      = dr[6].ToString().Trim();
                            line.IdEstado       = dr[7].ToString().Trim();
                            line.SubType        = dr[8].ToString().Trim();
                            Services.Add(line);
                        }
                        con.Close();
                    }
                }
            }
            catch (SqlException ex)
            {
            }
            return(Services);
        }
Ejemplo n.º 2
0
 public SummaryTask()
 {
     Timer = new Timer();
     SR    = new ServicioResumen();
 }