public IHttpActionResult VentaTotales(vTotales usr)
        {
            try
            {
                var resp = new _01_Dal.Dal.Metodos().BuscarVentaTotales(usr);

                return(Ok(resp));
            }

            catch (Exception ex)
            {
                return(InternalServerError(ex));
            }
        }
Esempio n. 2
0
        public IEnumerable <vTotales> BuscarVentaTotales(vTotales ObjUser)
        {
            SqlConnection conn = new SqlConnection(ConfigurationManager.ConnectionStrings["ConCC"].ToString());

            try
            {
                using (IDbConnection db = conn)
                {
                    var p = new DynamicParameters();

                    p.Add("@FchaVenta", ObjUser.FchaVenta, dbType: DbType.Date, direction: ParameterDirection.Input);


                    return(db.Query <vTotales>("spConsultaTotalVentas", p, commandType: CommandType.StoredProcedure).AsList());
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }