Ejemplo n.º 1
0
        public DataSet GetTicketsTimeDifferencesByDateAndMobiles(IEnumerable <int> mobiles, DateTime desde, DateTime hasta, int linea)
        {
            var mobilesString = ConvertListIntoString(mobiles);

            var ds = new DataSet();

            using (var command = DAOFactory.CreateCommand() as SqlCommand)
            {
                command.CommandType = CommandType.StoredProcedure;
                command.CommandText = "sp_get_TicketTimeDifferences";

                CreateParameter(command, DbType.DateTime, "@desde", desde);
                CreateParameter(command, DbType.DateTime, "@hasta", hasta);
                CreateParameter(command, DbType.String, "@mobiles", mobilesString);
                CreateParameter(command, DbType.Int32, "@linea", linea);

                var da = new SqlDataAdapter(command);

                da.Fill(ds);
            }

            return(ds);
        }