Ejemplo n.º 1
0
        // get units for product name in purchases table
        public static DataTable GetProductUnitsInfo(string product_name_id)
        {
            DataTable baseQueryResult = DBHelber.ExecuteQuery(QueriesStrings.BaseUnitQuery(product_name_id));
            DataTable subQueryResult  = DBHelber.ExecuteQuery(QueriesStrings.SubUnitQuery(product_name_id));

            baseQueryResult.Merge(subQueryResult);
            return(baseQueryResult);
        }
Ejemplo n.º 2
0
        public static DataTable GetAllProducts(string category_id)
        {
            string query = string.Format("SELECT * FROM products_data_view ");

            if (category_id != "0")
            {
                query += string.Format("WHERE category_id = {0}", category_id);
            }
            return(DBHelber.ExecuteQuery(query));
        }
Ejemplo n.º 3
0
        public static DataTable GetProductData(string product_id)
        {
            string query = "";

            return(DBHelber.ExecuteQuery(query));
        }
Ejemplo n.º 4
0
 public static DataTable GetPurchases(string year, string month)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.PurchasesQuery(year, month)));
 }
Ejemplo n.º 5
0
        // Get the sales table for a process id
        public static DataTable GetProcessSales(string process_id)
        {
            string query = string.Format("SELECT * FROM sales_view WHERE process_id = {0}", process_id);

            return(DBHelber.ExecuteQuery(query));
        }
Ejemplo n.º 6
0
 public static DataTable GetUnitsInfo(string product_name_id)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.UnitsInfoQuery(product_name_id)));
 }
Ejemplo n.º 7
0
 public static DataTable GetProductNameData(string product_name_id)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.ProductNameDataQuery(product_name_id)));
 }
Ejemplo n.º 8
0
 public static DataTable GetCategoryProducts(string category_id)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.CategoryProductsQuery(category_id)));
 }
Ejemplo n.º 9
0
 public static DataTable GetMonthesOfYear(string year_id)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.MonthesForYear(year_id)));
 }
Ejemplo n.º 10
0
 public static DataTable GetYears()
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.YearsQuery()));
 }