Ejemplo n.º 1
0
        public dsProducts getAllProducts()
        {
            var dsp = new dsProducts();
            var pta = new dsProductsTableAdapters.ProductsTableAdapter();

            pta.Fill(dsp.Products);
            return(dsp);
        }
Ejemplo n.º 2
0
    /// <summary>
    /// Method that obtain all the necessary information to create a Report by a Route
    /// </summary>
    /// <param name="route">Int ID of the Route</param>
    /// <returns>Returns a DataSet with all the information of the Route</returns>
    public static DataSet getReportByRoute(int route)
    {
        dsProducts dsP = new dsProducts();
        dsProductsTableAdapters.reportsTableAdapter table = new dsProductsTableAdapters.reportsTableAdapter();

        try
        {
            table.FillByRoute(dsP.reports, route);
            return dsP;
        }
        catch (Exception ex)
        {
            return null;
        }
    }
Ejemplo n.º 3
0
    /// <summary>
    /// Method that obtain all the necessary information to create a Report by Expired Products
    /// </summary>
    /// <returns>Returns a DataSet with all the information of Expired Products</returns>
    public static DataSet getReportByExpired()
    {
        dsProducts dsP = new dsProducts();
        dsProductsTableAdapters.reportsByExpiredTableAdapter table = new dsProductsTableAdapters.reportsByExpiredTableAdapter();

        try
        {
            table.Fill(dsP.reportsByExpired);
            return dsP;
        }
        catch (Exception ex)
        {
            return null;
        }
    }