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_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); }
public static Model.Customer_Type RowToEntity(DataRow row) { Model.Customer_Type customer_Type = new Model.Customer_Type { Id = Int32.Parse(row["Id"].ToString()), Type_Title = row["Type_Title"].ToString(), Discount_Rate = Int32.Parse(row["Discount_Rate"].ToString()) }; return(customer_Type); }