Example #1
0
        public static void UpdateFood(Model.Food food)
        {
            string query =
                "BEGIN " +
                "food_pkg.update_food(" + food.Id + ", '" + food.Name + "', " + food.Price + ", '" + food.Description + "', " + food.Type_Id + ", " + food.Discount_Rate + ", '" + food.Availability + "', " + food.Other_Charges + ", '" + food.Picture + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void UpdateIngredient(Model.Ingredient ingredient)
        {
            string query =
                "BEGIN " +
                "ingredient_pkg.update_ingredient(" + ingredient.Id + ", '" + ingredient.Name + "', '" + ingredient.Description + "', " + ingredient.Unit_Id + ", " + ingredient.Unit_Cost + ", " + ingredient.Amount + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #3
0
        public static void UpdateChangelog(Model.Changelog changelogs)
        {
            string query =
                "BEGIN " +
                "change_log_pkg.update_change_log('" + changelogs.Id + "', '" + changelogs.Employee_Id + "', '" + changelogs.Description + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #4
0
        public static void UpdateData(Model.Data Data)
        {
            string query =
                "BEGIN " +
                "data_pkg.update_data('" + Data.Id + "', '" + Data.Data_Name + "', '" + Data.Data_Value + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #5
0
        public static void InsertOrder(POS_Order order)
        {
            string query =
                "BEGIN " +
                "order_pkg.insert_order('" + order.Description + "', '" + order.Place_Time.ToString(string.Format("dd/MMM/yyyy")) + "', " + order.Employee_ID + ", " + order.Bill + ", " + order.Discount_Rate + ", " + order.Other_Charges + ", " + order.Total_Bill + ", '" + order.CardNumber + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void DeleteCustomer(int id)
        {
            string query =
                "BEGIN " +
                "customer_pkg.delete_customer(" + id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void UpdateUnit_Type(Model.Unit_Type type)
        {
            string query =
                "BEGIN " +
                "unit_type_pkg.update_unit_type(" + type.Id + ", '" + type.Name + "', '" + type.Symbol + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void InsertFood_Type(Model.Food_Type food_Type)
        {
            string query =
                "BEGIN " +
                "food_type_pkg.insert_food_type('" + food_Type.Type_Name + "', '" + food_Type.Description + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void UpdateFood_Type(Model.Food_Type food_Type)
        {
            string query =
                "BEGIN " +
                "food_type_pkg.update_food_type(" + food_Type.Id + ", '" + food_Type.Type_Name + "', '" + food_Type.Description + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #10
0
        public static void InsertFoodIngredient(Model.Food_Ingredient fi, int Id)
        {
            string query =
                "BEGIN " +
                "food_ingredient_pkg.insert_food_ingredient(" + Id + ", " + fi.Ingredient_Id + ", " + fi.Amount + ");" +
                " END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #11
0
        public static void DeleteFoodIngredient(int Id)
        {
            string query =
                "BEGIN " +
                "food_ingredient_pkg.delete_food_ingredient(" + Id + ");" +
                " END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #12
0
        public static void DeleteSupplier(int id)
        {
            string query =
                "BEGIN " +
                "supplier_pkg.delete_supplier(" + id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #13
0
        public static void UpdateSupplier(Model.Supplier supplier)
        {
            string query =
                "BEGIN " +
                "supplier_pkg.update_supplier(" + supplier.Id + ", '" + supplier.Name + "', '" + supplier.Contact_No + "', '" + supplier.Email + "', '" + supplier.Address + "', '" + supplier.Date_Added.ToString(string.Format("dd/MMM/yyyy")) + "', '" + supplier.Description + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #14
0
        public static void DeleteFood(int id)
        {
            string query =
                "BEGIN " +
                "food_pkg.delete_food(" + id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void UpdateCustomer_Type(Model.Customer_Type customer_Type)
        {
            string query =
                "BEGIN " +
                "customer_type_pkg.update_customer_type(" + customer_Type.Id + ", '" + customer_Type.Type_Title + "', " + customer_Type.Order_Count + ", " + customer_Type.Total_Bill + ", " + customer_Type.Discount_Rate + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #16
0
        public static void InsertCustomer_Type(Model.Customer_Type customer_Type)
        {
            string query =
                "BEGIN " +
                "customer_type_pkg.insert_customer_type('" + customer_Type.Type_Title + "', " + customer_Type.Discount_Rate + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void UpdateCustomer(Model.Customer customer)
        {
            string query =
                "BEGIN " +
                "customer_pkg.update_customer(" + customer.Id + ", '" + customer.Name + "', '" + customer.Contact_No + "', '" + customer.Email + "', '" + customer.Address + "', " + customer.Type_Id + ", '" + customer.Picture + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void InsertPurchase(Model.POS_Purchase purchase)
        {
            string query =
                "BEGIN " +
                "purchase_pkg.insert_purchase('" + purchase.Description + "', '" + purchase.Time.ToString(string.Format("dd/MMM/yyyy")) + "', " + purchase.Employee_Id + ", " + purchase.Supplier_Id + ", " + purchase.Cost + ", " + purchase.Discount_Rate + ", " + purchase.Total_Cost + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void InsertUnit_Type(Model.Unit_Type type)
        {
            string query =
                "BEGIN " +
                "unit_type_pkg.insert_unit_type('" + type.Name + "', '" + type.Symbol + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void DeletePurchase(int id)
        {
            string query =
                "BEGIN " +
                "purchase_pkg.delete_purchase(" + id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void DeleteUnit_Type(int id)
        {
            string query =
                "BEGIN " +
                "unit_type_pkg.delete_unit_type(" + id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void InsertJob(Model.Job job)
        {
            string query =
                "BEGIN " +
                "job_pkg.insert_job('" + job.Job_Title + "', " + job.Salary + ", '" + job.Description + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #23
0
        public static void DeleteData(int id)
        {
            string query =
                "BEGIN " +
                "data_pkg.delete_data(" + id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void UpdateJob(Model.Job job)
        {
            string query =
                "BEGIN " +
                "job_pkg.update_job(" + job.Id + ", '" + job.Job_Title + "', " + job.Salary + ", '" + job.Description + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #25
0
        public static void DeleteOrder(int Id)
        {
            string query =
                "BEGIN " +
                "order_pkg.delete_order(" + Id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void DeleteJob(int id)
        {
            string query =
                "BEGIN " +
                "job_pkg.delete_job(" + id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void DeleteIngredient(int id)
        {
            string query =
                "BEGIN " +
                "ingredient_pkg.delete_ingredient(" + id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #28
0
        public static void InsertOrderFood(Software.Model.Order_Food food)
        {
            string query =
                "BEGIN " +
                "insert_order_food(" + food.Food_Id + ", " + food.Count + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
Example #29
0
        public static void DeleteChangelog(int id)
        {
            string query =
                "BEGIN " +
                "change_log_pkg.delete_change_log(" + id + "); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }
        public static void UpdatePeriod(Model.Period period)
        {
            string query =
                "BEGIN " +
                "period_pkg.update_period(" + period.Id + ", " + period.Employee_Id + ", '" + period.Login_Time.ToString(string.Format("dd/MMM/yyyy")) + "', '" + period.Logout_Time.ToString(string.Format("dd/MMM/yyyy")) + "'); " +
                "END;";

            DB_Handler.ExecuteQuery(query);
        }