Esempio n. 1
0
 // get product id from product name and unit
 public static string GetProductId(string product_name_id, string unit_id)
 {
     using (SQLiteCommand cmd = new SQLiteCommand(QueriesStrings.ProductID(product_name_id, unit_id), Connection))
     {
         return((string)cmd.ExecuteScalar());
     }
 }
Esempio n. 2
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);
        }
Esempio n. 3
0
 public static DataTable GetPurchases(string year, string month)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.PurchasesQuery(year, month)));
 }
Esempio n. 4
0
 public static DataTable GetUnitsInfo(string product_name_id)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.UnitsInfoQuery(product_name_id)));
 }
Esempio n. 5
0
 public static DataTable GetProductNameData(string product_name_id)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.ProductNameDataQuery(product_name_id)));
 }
Esempio n. 6
0
 public static DataTable GetCategoryProducts(string category_id)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.CategoryProductsQuery(category_id)));
 }
Esempio n. 7
0
 public static DataTable GetMonthesOfYear(string year_id)
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.MonthesForYear(year_id)));
 }
Esempio n. 8
0
 public static DataTable GetYears()
 {
     return(DBHelber.ExecuteQuery(QueriesStrings.YearsQuery()));
 }