// 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); }
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)); }
public static DataTable GetProductData(string product_id) { string query = ""; return(DBHelber.ExecuteQuery(query)); }
public static DataTable GetPurchases(string year, string month) { return(DBHelber.ExecuteQuery(QueriesStrings.PurchasesQuery(year, month))); }
// 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)); }
public static DataTable GetUnitsInfo(string product_name_id) { return(DBHelber.ExecuteQuery(QueriesStrings.UnitsInfoQuery(product_name_id))); }
public static DataTable GetProductNameData(string product_name_id) { return(DBHelber.ExecuteQuery(QueriesStrings.ProductNameDataQuery(product_name_id))); }
public static DataTable GetCategoryProducts(string category_id) { return(DBHelber.ExecuteQuery(QueriesStrings.CategoryProductsQuery(category_id))); }
public static DataTable GetMonthesOfYear(string year_id) { return(DBHelber.ExecuteQuery(QueriesStrings.MonthesForYear(year_id))); }
public static DataTable GetYears() { return(DBHelber.ExecuteQuery(QueriesStrings.YearsQuery())); }