コード例 #1
0
 public void EditDrink(string drinkID, string drinkName, int active, int price)
 {
     try
     {
         DrinkDataProvider drink_Data_Provider = new DrinkDataProvider();
         drink_Data_Provider.EditDrink(drinkID, drinkName, active, price);
         return; // Important
     }
     catch
     {
         throw;
     }
 }
コード例 #2
0
 public void DeleteDrink(string drinkID)
 {
     try
     {
         DrinkDataProvider drink_Data_Provider = new DrinkDataProvider();
         drink_Data_Provider.DeleteDrink(drinkID);
         return;
     }
     catch
     {
         throw;
     }
 }
コード例 #3
0
 public DataTable GetListDrink()
 {
     try
     {
         DrinkDataProvider drink_Data_Provider = new DrinkDataProvider();
         return(drink_Data_Provider.FetchListDrinks());
     }
     catch (Exception ex)
     {
         Console.WriteLine(ex.Message);
     }
     return(null);
 }
コード例 #4
0
 public string GetID_FromName(string name)
 {
     try
     {
         string            res = "";
         DrinkDataProvider drink_Data_Provider = new DrinkDataProvider();
         res = drink_Data_Provider.SelectID_FromName(name);
         return(res); // Important
     }
     catch
     {
         throw;
     }
 }
コード例 #5
0
 public int GetPrice_FromID(string ID)
 {
     try
     {
         int res = 0;
         DrinkDataProvider drink_Data_Provider = new DrinkDataProvider();
         res = drink_Data_Provider.SelectPrice_FromID(ID);
         return(res); // Important
     }
     catch
     {
         throw;
     }
 }
コード例 #6
0
        public DataTable GetName_Drink()
        {
            try
            {
                DataTable         dt = new DataTable();
                DrinkDataProvider drink_Data_Provider = new DrinkDataProvider();

                dt = drink_Data_Provider.Select_ListDrinkName();
                return(dt);
            }
            catch
            {
                throw;
            }
        }