/// <summary>
        /// Updates a Permission into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="permission_id">permission_id</param>
        /// <param name="role_nameId">role_nameId</param>
        /// <param name="admin_id">admin_id</param>
        /// <param name="company_id">company_id</param>
        /// <param name="authoriser_id">authoriser_id</param>
        /// <param name="company_position">company_position</param>
        /// <param name="creation_datetime">creation_datetime</param>
        /// <param name="helper">helper</param>
        internal static void UpdatePermission(int @permission_id, string @role_nameId, int @admin_id, int @company_id, int @authoriser_id, string @company_position, DateTime @creation_datetime, SqlHelper @helper)
        {
            string commandText = "PermissionUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@permission_id", EntityBase.GetDatabaseValue(@permission_id)));
            parameters.Add(new SqlParameter("@role_name", EntityBase.GetDatabaseValue(@role_nameId)));
            parameters.Add(new SqlParameter("@admin_id", EntityBase.GetDatabaseValue(@admin_id)));
            parameters.Add(new SqlParameter("@company_id", EntityBase.GetDatabaseValue(@company_id)));
            parameters.Add(new SqlParameter("@authoriser_id", EntityBase.GetDatabaseValue(@authoriser_id)));
            parameters.Add(new SqlParameter("@company_position", EntityBase.GetDatabaseValue(@company_position)));
            parameters.Add(new SqlParameter("@creation_datetime", EntityBase.GetDatabaseValue(@creation_datetime)));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Updates a RewardSetting into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="setting_id">setting_id</param>
        /// <param name="company_id">company_id</param>
        /// <param name="expiry_days">expiry_days</param>
        /// <param name="points_per_dollar">points_per_dollar</param>
        /// <param name="points_threshold">points_threshold</param>
        /// <param name="voucher_amount">voucher_amount</param>
        /// <param name="enable_vouchers">enable_vouchers</param>
        /// <param name="helper">helper</param>
        internal static void UpdateRewardSetting(int @setting_id, int @company_id, int @expiry_days, int @points_per_dollar, int @points_threshold, decimal @voucher_amount, bool @enable_vouchers, SqlHelper @helper)
        {
            string commandText = "RewardSettingUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@setting_id", EntityBase.GetDatabaseValue(@setting_id)));
            parameters.Add(new SqlParameter("@company_id", EntityBase.GetDatabaseValue(@company_id)));
            parameters.Add(new SqlParameter("@expiry_days", EntityBase.GetDatabaseValue(@expiry_days)));
            parameters.Add(new SqlParameter("@points_per_dollar", EntityBase.GetDatabaseValue(@points_per_dollar)));
            parameters.Add(new SqlParameter("@points_threshold", EntityBase.GetDatabaseValue(@points_threshold)));
            parameters.Add(new SqlParameter("@voucher_amount", EntityBase.GetDatabaseValue(@voucher_amount)));
            parameters.Add(new SqlParameter("@enable_vouchers", @enable_vouchers));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes a PurchaseOrderItem from the data store based on the primitive primary keys. This can be used as the 
        /// delete method for an ObjectDataSource.
        /// </summary>
        /// <param name="purchaseorder_id">purchaseorder_id</param>
        /// <param name="product_code">product_code</param>
        /// <param name="helper">helper</param>
        internal static void DeletePurchaseOrderItem(int @purchaseorder_id, string @product_code, SqlHelper @helper)
        {
            string commandText = "PurchaseOrderItemDelete";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@purchaseorder_id", @purchaseorder_id));
            parameters.Add(new SqlParameter("@product_code", @product_code));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes Trigger objects by a UploadedAd unique identifier.
        /// </summary>
        /// <param name="uploadedad_id">uploadedad_id</param>
        public static void DeleteTriggersByuploadedad_(int uploadedad_id)
        {
            string commandText = "TriggerDeleteByUploadedAd";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@uploadedad_id", uploadedad_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Deletes RewardSetting objects by a Company unique identifier.
        /// </summary>
        /// <param name="company_id">company_id</param>
        public static void DeleteRewardSettingsBycompany_(int company_id)
        {
            string commandText = "RewardSettingDeleteByCompany";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@company_id", company_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Updates a DocketItem into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="docketitem_id">docketitem_id</param>
        /// <param name="docket_id">docket_id</param>
        /// <param name="product_code">product_code</param>
        /// <param name="description">description</param>
        /// <param name="quantity">quantity</param>
        /// <param name="product_barcode">product_barcode</param>
        /// <param name="department">department</param>
        /// <param name="cost_ex">cost_ex</param>
        /// <param name="sale_ex">sale_ex</param>
        /// <param name="category">category</param>
        /// <param name="sale_inc">sale_inc</param>
        /// <param name="helper">helper</param>
        internal static void UpdateDocketItem(int @docketitem_id, int @docket_id, string @product_code, string @description, double @quantity, string @product_barcode, string @department, decimal @cost_ex, decimal @sale_ex, string @category, decimal @sale_inc, SqlHelper @helper)
        {
            string commandText = "DocketItemUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@docketitem_id", EntityBase.GetDatabaseValue(@docketitem_id)));
            parameters.Add(new SqlParameter("@docket_id", EntityBase.GetDatabaseValue(@docket_id)));
            parameters.Add(new SqlParameter("@product_code", EntityBase.GetDatabaseValue(@product_code)));
            parameters.Add(new SqlParameter("@description", EntityBase.GetDatabaseValue(@description)));
            parameters.Add(new SqlParameter("@quantity", @quantity));
            parameters.Add(new SqlParameter("@product_barcode", EntityBase.GetDatabaseValue(@product_barcode)));
            parameters.Add(new SqlParameter("@department", EntityBase.GetDatabaseValue(@department)));
            parameters.Add(new SqlParameter("@cost_ex", EntityBase.GetDatabaseValue(@cost_ex)));
            parameters.Add(new SqlParameter("@sale_ex", EntityBase.GetDatabaseValue(@sale_ex)));
            parameters.Add(new SqlParameter("@category", EntityBase.GetDatabaseValue(@category)));
            parameters.Add(new SqlParameter("@sale_inc", EntityBase.GetDatabaseValue(@sale_inc)));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes Trigger objects by a Admin unique identifier.
        /// </summary>
        /// <param name="admin_id">admin_id</param>
        public static void DeleteTriggersBycreator_(int admin_id)
        {
            string commandText = "TriggerDeleteByAdmin";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@creator_id", admin_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Deletes a RequestedAd from the data store based on the primitive primary keys. This can be used as the 
        /// delete method for an ObjectDataSource.
        /// </summary>
        /// <param name="admatch_id">admatch_id</param>
        /// <param name="uploadedad_id">uploadedad_id</param>
        /// <param name="helper">helper</param>
        internal static void DeleteRequestedAd(int @admatch_id, int @uploadedad_id, SqlHelper @helper)
        {
            string commandText = "RequestedAdDelete";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@admatch_id", @admatch_id));
            parameters.Add(new SqlParameter("@uploadedad_id", @uploadedad_id));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Updates a RequestedAd into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="admatch_id">admatch_id</param>
        /// <param name="uploadedad_id">uploadedad_id</param>
        /// <param name="num_wanted">num_wanted</param>
        /// <param name="daily_quota">daily_quota</param>
        /// <param name="num_printed">num_printed</param>
        /// <param name="is_active">is_active</param>
        /// <param name="helper">helper</param>
        internal static void UpdateRequestedAd(int @admatch_id, int @uploadedad_id, int @num_wanted, int @daily_quota, int @num_printed, bool @is_active, SqlHelper @helper)
        {
            string commandText = "RequestedAdUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@admatch_id", EntityBase.GetDatabaseValue(@admatch_id)));
            parameters.Add(new SqlParameter("@uploadedad_id", EntityBase.GetDatabaseValue(@uploadedad_id)));
            parameters.Add(new SqlParameter("@num_wanted", EntityBase.GetDatabaseValue(@num_wanted)));
            parameters.Add(new SqlParameter("@daily_quota", EntityBase.GetDatabaseValue(@daily_quota)));
            parameters.Add(new SqlParameter("@num_printed", EntityBase.GetDatabaseValue(@num_printed)));
            parameters.Add(new SqlParameter("@is_active", @is_active));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
Example #10
0
        /// <summary>
        /// Updates a Role into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="role_name">role_name</param>
        /// <param name="notes">notes</param>
        /// <param name="helper">helper</param>
        internal static void UpdateRole(string @role_name, string @notes, SqlHelper @helper)
        {
            string commandText = "RoleUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@role_name", EntityBase.GetDatabaseValue(@role_name)));
            parameters.Add(new SqlParameter("@notes", EntityBase.GetDatabaseValue(@notes)));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes RequestedAd objects by a AdMatch unique identifier.
        /// </summary>
        /// <param name="admatch_id">admatch_id</param>
        public static void DeleteRequestedAdsByadmatch_(int admatch_id)
        {
            string commandText = "RequestedAdDeleteByAdMatch";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@admatch_id", admatch_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
Example #12
0
        /// <summary>
        /// Deletes a Role from the data store based on the primitive primary keys. This can be used as the 
        /// delete method for an ObjectDataSource.
        /// </summary>
        /// <param name="role_name">role_name</param>
        /// <param name="helper">helper</param>
        internal static void DeleteRole(string @role_name, SqlHelper @helper)
        {
            string commandText = "RoleDelete";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@role_name", @role_name));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes Permission objects by a Role unique identifier.
        /// </summary>
        /// <param name="role_name">role_name</param>
        public static void DeletePermissionsByrole_name(string role_name)
        {
            string commandText = "PermissionDeleteByRole";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@role_name", role_name));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Deletes Permission objects by a Admin object.
        /// </summary>
        /// <param name="admin">admin</param>
        public static void DeletePermissionsByauthoriser_(Admin admin)
        {
            string commandText = "PermissionDeleteByAdmin";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@authoriser_id", admin.admin_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Deletes DocketItem objects by a Docket unique identifier.
        /// </summary>
        /// <param name="docket_id">docket_id</param>
        public static void DeleteDocketItemsBydocket_(int docket_id)
        {
            string commandText = "DocketItemDeleteByDocket";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@docket_id", docket_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Updates a Docket into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="docket_id">docket_id</param>
        /// <param name="local_id">local_id</param>
        /// <param name="code">code</param>
        /// <param name="customer_id">customer_id</param>
        /// <param name="store_id">store_id</param>
        /// <param name="placedad_id">placedad_id</param>
        /// <param name="total">total</param>
        /// <param name="reward_points">reward_points</param>
        /// <param name="raw_content">raw_content</param>
        /// <param name="creation_datetime">creation_datetime</param>
        /// <param name="helper">helper</param>
        internal static void UpdateDocket(int @docket_id, int @local_id, string @code, int @customer_id, int @store_id, int @placedad_id, decimal @total, int @reward_points, string @raw_content, DateTime @creation_datetime, SqlHelper @helper)
        {
            string commandText = "DocketUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@docket_id", EntityBase.GetDatabaseValue(@docket_id)));
            parameters.Add(new SqlParameter("@local_id", EntityBase.GetDatabaseValue(@local_id)));
            parameters.Add(new SqlParameter("@code", EntityBase.GetDatabaseValue(@code)));
            parameters.Add(new SqlParameter("@customer_id", EntityBase.GetDatabaseValue(@customer_id)));
            parameters.Add(new SqlParameter("@store_id", EntityBase.GetDatabaseValue(@store_id)));
            parameters.Add(new SqlParameter("@placedad_id", EntityBase.GetDatabaseValue(@placedad_id)));
            parameters.Add(new SqlParameter("@total", EntityBase.GetDatabaseValue(@total)));
            parameters.Add(new SqlParameter("@reward_points", EntityBase.GetDatabaseValue(@reward_points)));
            parameters.Add(new SqlParameter("@raw_content", EntityBase.GetDatabaseValue(@raw_content)));
            parameters.Add(new SqlParameter("@creation_datetime", EntityBase.GetDatabaseValue(@creation_datetime)));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes a DocketItem from the data store based on the primitive primary keys. This can be used as the 
        /// delete method for an ObjectDataSource.
        /// </summary>
        /// <param name="docketitem_id">docketitem_id</param>
        /// <param name="helper">helper</param>
        internal static void DeleteDocketItem(int @docketitem_id, SqlHelper @helper)
        {
            string commandText = "DocketItemDelete";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@docketitem_id", @docketitem_id));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes Docket objects by a Customer object.
        /// </summary>
        /// <param name="customer">customer</param>
        public static void DeleteDocketsBycustomer_(Customer customer)
        {
            string commandText = "DocketDeleteByCustomer";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@customer_id", customer.customer_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Updates a Trigger into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="trigger_id">trigger_id</param>
        /// <param name="store_id">store_id</param>
        /// <param name="uploadedad_id">uploadedad_id</param>
        /// <param name="creator_id">creator_id</param>
        /// <param name="priority">priority</param>
        /// <param name="header">header</param>
        /// <param name="type">type</param>
        /// <param name="value">value</param>
        /// <param name="notes">notes</param>
        /// <param name="is_active">is_active</param>
        /// <param name="creation_datetime">creation_datetime</param>
        /// <param name="helper">helper</param>
        internal static void UpdateTrigger(int @trigger_id, int @store_id, int @uploadedad_id, int @creator_id, int @priority, string @header, string @type, string @value, string @notes, bool @is_active, DateTime @creation_datetime, SqlHelper @helper)
        {
            string commandText = "TriggerUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@trigger_id", EntityBase.GetDatabaseValue(@trigger_id)));
            parameters.Add(new SqlParameter("@store_id", EntityBase.GetDatabaseValue(@store_id)));
            parameters.Add(new SqlParameter("@uploadedad_id", EntityBase.GetDatabaseValue(@uploadedad_id)));
            parameters.Add(new SqlParameter("@creator_id", EntityBase.GetDatabaseValue(@creator_id)));
            parameters.Add(new SqlParameter("@priority", EntityBase.GetDatabaseValue(@priority)));
            parameters.Add(new SqlParameter("@header", EntityBase.GetDatabaseValue(@header)));
            parameters.Add(new SqlParameter("@type", EntityBase.GetDatabaseValue(@type)));
            parameters.Add(new SqlParameter("@value", EntityBase.GetDatabaseValue(@value)));
            parameters.Add(new SqlParameter("@notes", EntityBase.GetDatabaseValue(@notes)));
            parameters.Add(new SqlParameter("@is_active", @is_active));
            parameters.Add(new SqlParameter("@creation_datetime", EntityBase.GetDatabaseValue(@creation_datetime)));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes Docket objects by a PlacedAd unique identifier.
        /// </summary>
        /// <param name="placedad_id">placedad_id</param>
        public static void DeleteDocketsByplacedad_(int placedad_id)
        {
            string commandText = "DocketDeleteByPlacedAd";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@placedad_id", placedad_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Deletes Trigger objects by a Store object.
        /// </summary>
        /// <param name="store">store</param>
        public static void DeleteTriggersBystore_(Store store)
        {
            string commandText = "TriggerDeleteByStore";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@store_id", store.store_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Updates a Company into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="company_id">company_id</param>
        /// <param name="name">name</param>
        /// <param name="brand_name">brand_name</param>
        /// <param name="company_number">company_number</param>
        /// <param name="contact_name">contact_name</param>
        /// <param name="contact_email">contact_email</param>
        /// <param name="transactions_email">transactions_email</param>
        /// <param name="address">address</param>
        /// <param name="suburb">suburb</param>
        /// <param name="state">state</param>
        /// <param name="country">country</param>
        /// <param name="postcode">postcode</param>
        /// <param name="phone">phone</param>
        /// <param name="website">website</param>
        /// <param name="api_key">api_key</param>
        /// <param name="notes">notes</param>
        /// <param name="is_active">is_active</param>
        /// <param name="is_customer">is_customer</param>
        /// <param name="is_supplier">is_supplier</param>
        /// <param name="is_manufacturer">is_manufacturer</param>
        /// <param name="paidto_datetime">paidto_datetime</param>
        /// <param name="creation_datetime">creation_datetime</param>
        /// <param name="has_POSSystem">has_POSSystem</param>
        /// <param name="helper">helper</param>
        internal static void UpdateCompany(int @company_id, string @name, string @brand_name, string @company_number, string @contact_name, string @contact_email, string @transactions_email, string @address, string @suburb, string @state, string @country, string @postcode, string @phone, string @website, string @api_key, string @notes, bool @is_active, bool @is_customer, bool @is_supplier, bool @is_manufacturer, DateTime @paidto_datetime, DateTime @creation_datetime, bool @has_POSSystem, SqlHelper @helper)
        {
            string commandText = "CompanyUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@company_id", EntityBase.GetDatabaseValue(@company_id)));
            parameters.Add(new SqlParameter("@name", EntityBase.GetDatabaseValue(@name)));
            parameters.Add(new SqlParameter("@brand_name", EntityBase.GetDatabaseValue(@brand_name)));
            parameters.Add(new SqlParameter("@company_number", EntityBase.GetDatabaseValue(@company_number)));
            parameters.Add(new SqlParameter("@contact_name", EntityBase.GetDatabaseValue(@contact_name)));
            parameters.Add(new SqlParameter("@contact_email", EntityBase.GetDatabaseValue(@contact_email)));
            parameters.Add(new SqlParameter("@transactions_email", EntityBase.GetDatabaseValue(@transactions_email)));
            parameters.Add(new SqlParameter("@address", EntityBase.GetDatabaseValue(@address)));
            parameters.Add(new SqlParameter("@suburb", EntityBase.GetDatabaseValue(@suburb)));
            parameters.Add(new SqlParameter("@state", EntityBase.GetDatabaseValue(@state)));
            parameters.Add(new SqlParameter("@country", EntityBase.GetDatabaseValue(@country)));
            parameters.Add(new SqlParameter("@postcode", EntityBase.GetDatabaseValue(@postcode)));
            parameters.Add(new SqlParameter("@phone", EntityBase.GetDatabaseValue(@phone)));
            parameters.Add(new SqlParameter("@website", EntityBase.GetDatabaseValue(@website)));
            parameters.Add(new SqlParameter("@api_key", EntityBase.GetDatabaseValue(@api_key)));
            parameters.Add(new SqlParameter("@notes", EntityBase.GetDatabaseValue(@notes)));
            parameters.Add(new SqlParameter("@is_active", @is_active));
            parameters.Add(new SqlParameter("@is_customer", @is_customer));
            parameters.Add(new SqlParameter("@is_supplier", @is_supplier));
            parameters.Add(new SqlParameter("@is_manufacturer", @is_manufacturer));
            parameters.Add(new SqlParameter("@paidto_datetime", EntityBase.GetDatabaseValue(@paidto_datetime)));
            parameters.Add(new SqlParameter("@creation_datetime", EntityBase.GetDatabaseValue(@creation_datetime)));
            parameters.Add(new SqlParameter("@has_POSSystem", @has_POSSystem));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
Example #23
0
        /// <summary>
        /// Updates a Admin into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="admin_id">admin_id</param>
        /// <param name="first_name">first_name</param>
        /// <param name="last_name">last_name</param>
        /// <param name="email">email</param>
        /// <param name="phone">phone</param>
        /// <param name="mobile">mobile</param>
        /// <param name="password_hash">password_hash</param>
        /// <param name="is_active">is_active</param>
        /// <param name="creation_datetime">creation_datetime</param>
        /// <param name="helper">helper</param>
        internal static void UpdateAdmin(int @admin_id, string @first_name, string @last_name, string @email, string @phone, string @mobile, string @password_hash, bool @is_active, DateTime @creation_datetime, SqlHelper @helper)
        {
            string commandText = "AdminUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@admin_id", EntityBase.GetDatabaseValue(@admin_id)));
            parameters.Add(new SqlParameter("@first_name", EntityBase.GetDatabaseValue(@first_name)));
            parameters.Add(new SqlParameter("@last_name", EntityBase.GetDatabaseValue(@last_name)));
            parameters.Add(new SqlParameter("@email", EntityBase.GetDatabaseValue(@email)));
            parameters.Add(new SqlParameter("@phone", EntityBase.GetDatabaseValue(@phone)));
            parameters.Add(new SqlParameter("@mobile", EntityBase.GetDatabaseValue(@mobile)));
            parameters.Add(new SqlParameter("@password_hash", EntityBase.GetDatabaseValue(@password_hash)));
            parameters.Add(new SqlParameter("@is_active", @is_active));
            parameters.Add(new SqlParameter("@creation_datetime", EntityBase.GetDatabaseValue(@creation_datetime)));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes AllowedStore objects by a Company unique identifier.
        /// </summary>
        /// <param name="company_id">company_id</param>
        public static void DeleteAllowedStoresBysupplier_(int company_id)
        {
            string commandText = "AllowedStoreDeleteByCompany";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@supplier_id", company_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Deletes a RewardSetting from the data store based on the primitive primary keys. This can be used as the 
        /// delete method for an ObjectDataSource.
        /// </summary>
        /// <param name="setting_id">setting_id</param>
        /// <param name="helper">helper</param>
        internal static void DeleteRewardSetting(int @setting_id, SqlHelper @helper)
        {
            string commandText = "RewardSettingDelete";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@setting_id", @setting_id));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes a AllowedStore from the data store based on the primitive primary keys. This can be used as the 
        /// delete method for an ObjectDataSource.
        /// </summary>
        /// <param name="entry_id">entry_id</param>
        /// <param name="helper">helper</param>
        internal static void DeleteAllowedStore(int @entry_id, SqlHelper @helper)
        {
            string commandText = "AllowedStoreDelete";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@entry_id", @entry_id));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes PurchaseOrderItem objects by a PurchaseOrder unique identifier.
        /// </summary>
        /// <param name="purchaseorder_id">purchaseorder_id</param>
        public static void DeletePurchaseOrderItemsBypurchaseorder_(int purchaseorder_id)
        {
            string commandText = "PurchaseOrderItemDeleteByPurchaseOrder";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@purchaseorder_id", purchaseorder_id));

            using (SqlHelper helper = new SqlHelper())
            {
                helper.Execute(commandText, CommandType.StoredProcedure, parameters);
            }
        }
        /// <summary>
        /// Updates a AllowedStore into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="entry_id">entry_id</param>
        /// <param name="customer_id">customer_id</param>
        /// <param name="supplier_id">supplier_id</param>
        /// <param name="account_number">account_number</param>
        /// <param name="is_member">is_member</param>
        /// <param name="authoriser_email">authoriser_email</param>
        /// <param name="creation_datetime">creation_datetime</param>
        /// <param name="helper">helper</param>
        internal static void UpdateAllowedStore(int @entry_id, int @customer_id, int @supplier_id, string @account_number, bool @is_member, string @authoriser_email, DateTime @creation_datetime, SqlHelper @helper)
        {
            string commandText = "AllowedStoreUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@entry_id", EntityBase.GetDatabaseValue(@entry_id)));
            parameters.Add(new SqlParameter("@customer_id", EntityBase.GetDatabaseValue(@customer_id)));
            parameters.Add(new SqlParameter("@supplier_id", EntityBase.GetDatabaseValue(@supplier_id)));
            parameters.Add(new SqlParameter("@account_number", EntityBase.GetDatabaseValue(@account_number)));
            parameters.Add(new SqlParameter("@is_member", @is_member));
            parameters.Add(new SqlParameter("@authoriser_email", EntityBase.GetDatabaseValue(@authoriser_email)));
            parameters.Add(new SqlParameter("@creation_datetime", EntityBase.GetDatabaseValue(@creation_datetime)));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Updates a PurchaseOrderItem into the data store based on the primitive properties. This can be used as the 
        /// update method for an ObjectDataSource.
        /// </summary>
        /// <param name="purchaseorder_id">purchaseorder_id</param>
        /// <param name="product_code">product_code</param>
        /// <param name="barcode">barcode</param>
        /// <param name="description">description</param>
        /// <param name="quantity">quantity</param>
        /// <param name="cost_price">cost_price</param>
        /// <param name="helper">helper</param>
        internal static void UpdatePurchaseOrderItem(int @purchaseorder_id, string @product_code, string @barcode, string @description, double @quantity, decimal @cost_price, SqlHelper @helper)
        {
            string commandText = "PurchaseOrderItemUpdate";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@purchaseorder_id", EntityBase.GetDatabaseValue(@purchaseorder_id)));
            parameters.Add(new SqlParameter("@product_code", EntityBase.GetDatabaseValue(@product_code)));
            parameters.Add(new SqlParameter("@barcode", EntityBase.GetDatabaseValue(@barcode)));
            parameters.Add(new SqlParameter("@description", EntityBase.GetDatabaseValue(@description)));
            parameters.Add(new SqlParameter("@quantity", @quantity));
            parameters.Add(new SqlParameter("@cost_price", EntityBase.GetDatabaseValue(@cost_price)));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }
        /// <summary>
        /// Deletes a Permission from the data store based on the primitive primary keys. This can be used as the 
        /// delete method for an ObjectDataSource.
        /// </summary>
        /// <param name="permission_id">permission_id</param>
        /// <param name="helper">helper</param>
        internal static void DeletePermission(int @permission_id, SqlHelper @helper)
        {
            string commandText = "PermissionDelete";

            System.Collections.Generic.List<SqlParameter> parameters = new System.Collections.Generic.List<SqlParameter>();
            parameters.Add(new SqlParameter("@permission_id", @permission_id));

            @helper.Execute(commandText, CommandType.StoredProcedure, parameters);
        }