private int  Update(InCategory category)
 {
     String Query = "UPDATE [SecLockCategory] SET [Name] = '" + category.Name
         + "' WHERE [Code] = '" + category.Code + "'";
     SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
     return oDm.RunActionQuery();
 }
        public void GenerateScheduleNextRun()
        {
            String           Query = String.Empty;
            SqlCeDataManager oDm;

            Query = "UPDATE	[TaskHeader] WITH (ROWLOCK) SET [NextRun] = DATEADD(yy, [TaskRepeatInterval], CASE WHEN [LastRun] IS NULL THEN [ScheduleFrom] ELSE [LastRun] END) WHERE	[TaskRepeatUnit] = 'YEAR' AND (ISNULL([NextRun]) = 1 OR [NextRun] < GETDATE())";
            oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);
            oDm.RunActionQuery();
            Query = "UPDATE	[TaskHeader] WITH (ROWLOCK) SET [NextRun] = DATEADD(q, [TaskRepeatInterval], CASE WHEN [LastRun] IS NULL THEN [ScheduleFrom] ELSE [LastRun] END) WHERE	[TaskRepeatUnit] = 'QUARTER' AND (ISNULL([NextRun]) = 1 OR [NextRun] < GETDATE())";
            oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);
            oDm.RunActionQuery();
            Query = "UPDATE	[TaskHeader] WITH (ROWLOCK) SET [NextRun] = DATEADD(m, [TaskRepeatInterval], CASE WHEN [LastRun] IS NULL THEN [ScheduleFrom] ELSE [LastRun] END) WHERE	[TaskRepeatUnit] = 'MONTH' AND (ISNULL([NextRun]) = 1 OR [NextRun] < GETDATE())";
            oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);
            oDm.RunActionQuery();
            Query = "UPDATE	[TaskHeader] WITH (ROWLOCK) SET [NextRun] = DATEADD(ww, [TaskRepeatInterval], CASE WHEN [LastRun] IS NULL THEN [ScheduleFrom] ELSE [LastRun] END) WHERE	[TaskRepeatUnit] = 'WEEK' AND (ISNULL([NextRun]) = 1 OR [NextRun] < GETDATE())";
            oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);
            oDm.RunActionQuery();
            Query = "UPDATE	[TaskHeader] WITH (ROWLOCK) SET [NextRun] = DATEADD(d, [TaskRepeatInterval], CASE WHEN [LastRun] IS NULL THEN [ScheduleFrom] ELSE [LastRun] END) WHERE	[TaskRepeatUnit] = 'DAY' AND (ISNULL([NextRun]) = 1 OR [NextRun] < GETDATE())";
            oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);
            oDm.RunActionQuery();
            Query = "UPDATE	[TaskHeader] WITH (ROWLOCK) SET [NextRun] = DATEADD(hh, [TaskRepeatInterval], CASE WHEN [LastRun] IS NULL THEN [ScheduleFrom] ELSE [LastRun] END) WHERE	[TaskRepeatUnit] = 'HOUR' AND (ISNULL([NextRun]) = 1 OR [NextRun] < GETDATE())";
            oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);
            oDm.RunActionQuery();
            Query = "UPDATE	[TaskHeader] WITH (ROWLOCK) SET [NextRun] = DATEADD(mi, [TaskRepeatInterval], CASE WHEN [LastRun] IS NULL THEN [ScheduleFrom] ELSE [LastRun] END) WHERE	[TaskRepeatUnit] = 'MINUTE' AND (ISNULL([NextRun]) = 1 OR [NextRun] < GETDATE())";
            oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);
            oDm.RunActionQuery();
        }
Beispiel #3
0
        public int ClearHotDeals()
        {
            String           Query = "UPDATE ADIBrands WITH (ROWLOCK) SET HotDeals = 0";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
Beispiel #4
0
        public void ClearCatagory()
        {
            String           Query = "DELETE FROM ADICategoryExport WITH (ROWLOCK)";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.RunActionQuery();
        }
Beispiel #5
0
        public int ClearStockAvailability()
        {
            String           Query = "UPDATE ADIBrands WITH (ROWLOCK) SET InStock = 0";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
 private int Insert(InCategory category)
 {
     String Query = "INSERT INTO [SecLockCategory]([Code],[Name]) VALUES('"
         + category.Code + "','" + category.Name + "');";
     SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
     return oDm.RunActionQuery();
 }
Beispiel #7
0
        public int ClearAllClearanceZone()
        {
            String           Query = "UPDATE ADIProduct1 WITH (ROWLOCK) SET ClearanceZone = 0";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
Beispiel #8
0
        public int ClearAllOnlineSpecials()
        {
            String           Query = "UPDATE ADIProduct1 WITH (ROWLOCK) SET OnlineSpecials = 0";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
Beispiel #9
0
        public int DeleteAll()
        {
            String           Query = "DELETE FROM ADIInventory";
            SqlCeDataManager oDm   = new SqlCeDataManager(ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
Beispiel #10
0
        public int Update(String AdiNumber, String id, String dc, String region, String storeName, String address1, String address2, String address3,
                          String country, String city, String state, String stateName, String zip, String phone, String fax, float?lat, float?lon, String inventory,
                          String manager, String responseCode, String responseMessage, Boolean IsHub)
        {
            String Query = "UPDATE ADIInventory  SET dc = @dc ,region = @region ,storeName = @storeName ,address1 = @address1 ,address2 = @address2 ,address3 = @address3 "
                           + ",country = @country ,city = @city ,state = @state ,stateName = @stateName ,zip = @zip ,phone = @phone ,fax = @fax ,lat = @lat ,lon = @lon "
                           + ",inventory = @inventory ,manager = @manager ,responseCode = @responseCode ,responseMessage = @responseMessage ,IsHub = @IsHub "
                           + ",LastUpdate = @LastUpdate WHERE AdiNumber = @AdiNumber AND id = @id";
            SqlCeDataManager oDm = new SqlCeDataManager(ConnectionString, Query, true);

            oDm.AddVarcharPara("AdiNumber", 4000, AdiNumber);
            oDm.AddVarcharPara("id", 4000, id);
            oDm.AddVarcharPara("dc", 4000, dc);
            oDm.AddVarcharPara("region", 4000, region);
            oDm.AddVarcharPara("storeName", 4000, storeName);
            oDm.AddVarcharPara("address1", 4000, address1);
            oDm.AddVarcharPara("address2", 4000, address2);
            oDm.AddVarcharPara("address3", 4000, address3);
            oDm.AddVarcharPara("country", 4000, country);
            oDm.AddVarcharPara("city", 4000, city);
            oDm.AddVarcharPara("state", 4000, state);
            oDm.AddVarcharPara("stateName", 4000, stateName);
            oDm.AddVarcharPara("zip", 4000, zip);
            oDm.AddVarcharPara("phone", 4000, phone);
            oDm.AddVarcharPara("fax", 4000, fax);
            oDm.AddFloatPara("lat", lat);
            oDm.AddFloatPara("lon", lon);
            oDm.AddVarcharPara("inventory", 4000, inventory);
            oDm.AddVarcharPara("manager", 4000, manager);
            oDm.AddVarcharPara("responseCode", 4000, responseCode);
            oDm.AddVarcharPara("responseMessage", 4000, responseMessage);
            oDm.AddBoolPara("IsHub", IsHub);
            oDm.AddDateTimePara("LastUpdate", DateTime.Now);
            return(oDm.RunActionQuery());
        }
Beispiel #11
0
        public int Insert(String AdiNumber, String id, String dc, String region, String storeName, String address1, String address2, String address3
                          , String country, String city, String state, String stateName, String zip, String phone, String fax, float?lat, float?lon, String inventory
                          , String manager, String responseCode, String responseMessage, Boolean IsHub)
        {
            String Query = "INSERT INTO ADIInventory (AdiNumber, id ,dc ,region ,storeName ,address1 ,address2 ,address3 ,country ,city ,state ,stateName ,zip ,phone ,fax ,lat ,lon ,inventory ,manager ,responseCode ,responseMessage ,IsHub, LastUpdate) "
                           + "VALUES (@AdiNumber, @id ,@dc ,@region ,@storeName ,@address1 ,@address2 ,@address3 ,@country ,@city ,@state ,@stateName ,@zip ,@phone ,@fax ,@lat ,@lon ,@inventory ,@manager ,@responseCode ,@responseMessage ,@IsHub, @LastUpdate)";
            SqlCeDataManager oDm = new SqlCeDataManager(ConnectionString, Query, true);

            oDm.AddVarcharPara("AdiNumber", 4000, AdiNumber);
            oDm.AddVarcharPara("id", 4000, id);
            oDm.AddVarcharPara("dc", 4000, dc);
            oDm.AddVarcharPara("region", 4000, region);
            oDm.AddVarcharPara("storeName", 4000, storeName);
            oDm.AddVarcharPara("address1", 4000, address1);
            oDm.AddVarcharPara("address2", 4000, address2);
            oDm.AddVarcharPara("address3", 4000, address3);
            oDm.AddVarcharPara("country", 4000, country);
            oDm.AddVarcharPara("city", 4000, city);
            oDm.AddVarcharPara("state", 4000, state);
            oDm.AddVarcharPara("stateName", 4000, stateName);
            oDm.AddVarcharPara("zip", 4000, zip);
            oDm.AddVarcharPara("phone", 4000, phone);
            oDm.AddVarcharPara("fax", 4000, fax);
            oDm.AddFloatPara("lat", lat);
            oDm.AddFloatPara("lon", lon);
            oDm.AddVarcharPara("inventory", 4000, inventory);
            oDm.AddVarcharPara("manager", 4000, manager);
            oDm.AddVarcharPara("responseCode", 4000, responseCode);
            oDm.AddVarcharPara("responseMessage", 4000, responseMessage);
            oDm.AddBoolPara("IsHub", IsHub);
            oDm.AddDateTimePara("LastUpdate", DateTime.Now);
            return(oDm.RunActionQuery());
        }
        public void DeleteAll()
        {
            String           Query = "DELETE FROM [SecLockManufacturer]";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.RunActionQuery();
        }
Beispiel #13
0
        public int ClearSaleCenter()
        {
            String           Query = "UPDATE ADICategory WITH (ROWLOCK) SET SaleCenter = 0 ";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
Beispiel #14
0
        public int ClearBrands()
        {
            String           Query = "DELETE FROM ADIBrands WITH (ROWLOCK)";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
        public int DeleteById(Int64 ScheduleID)
        {
            String           Query = "DELETE FROM [TaskHeader] WHERE [ScheduleID] = @ScheduleID";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddIntegerBigPara("ScheduleID", ScheduleID);
            return(oDm.RunActionQuery());
        }
Beispiel #16
0
        public int SetStockAvailability(String AdiNumber)
        {
            String           Query = "UPDATE ADIProduct1 WITH (ROWLOCK) SET InStock = 1 WHERE AdiNumber = @AdiNumber";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("AdiNumber", 4000, AdiNumber);
            return(oDm.RunActionQuery());
        }
Beispiel #17
0
        public int SetHotDealsByCategoryValue(String Value)
        {
            String           Query = "UPDATE ADICategory WITH (ROWLOCK) SET HotDeals = 1 WHERE Value = @Value";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("Value", 4000, Value);
            return(oDm.RunActionQuery());
        }
Beispiel #18
0
        public int SetStockAvailability(String Value)
        {
            String           Query = "UPDATE ADIBrands WITH (ROWLOCK) SET InStock = 1 WHERE Value = @Value";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("Value", 4000, Value);
            return(oDm.RunActionQuery());
        }
        public int DeleteByHeaderId(Int64 TaskHeaderID)
        {
            String           Query = "DELETE FROM TaskDetail WHERE TaskHeaderID = @TaskHeaderID";
            SqlCeDataManager oDm   = new SqlCeDataManager(ConnectionString, Query, true);

            oDm.AddIntegerBigPara("TaskHeaderID", TaskHeaderID);
            return(oDm.RunActionQuery());
        }
        private int Insert(InManufacturer manufacturer)
        {
            String Query = "INSERT INTO [SecLockManufacturer]([Code],[Name],[ImagePath],[Url]) VALUES('"
                           + manufacturer.Code + "','" + manufacturer.Name + "','" + manufacturer.ImagePath + "','" + manufacturer.Url + "');";
            SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
Beispiel #21
0
        public int DeleteByPart(String AdiNumber)
        {
            String           Query = "DELETE FROM ADIInventory WHERE AdiNumber = @AdiNumber";
            SqlCeDataManager oDm   = new SqlCeDataManager(ConnectionString, Query, true);

            oDm.AddVarcharPara("AdiNumber", 4000, AdiNumber);
            return(oDm.RunActionQuery());
        }
        private int Insert(String ManufacturerCode, InManufacturerSeries manufacturer)
        {
            String Query = "INSERT INTO [SecLockManufacturerSeries]([ManufacturerCode],[Name]) VALUES('"
                           + ManufacturerCode + "','" + manufacturer.Name + "');";
            SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
Beispiel #23
0
        public int SetUpdateInterval(String AdiNumber, int UpdateInterval)
        {
            String           Query = "UPDATE ADIProduct1 WITH (ROWLOCK) SET UpdateInterval = @UpdateInterval WHERE AdiNumber = @AdiNumber";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("AdiNumber", 4000, AdiNumber);
            oDm.AddIntegerPara("UpdateInterval", UpdateInterval);
            return(oDm.RunActionQuery());
        }
Beispiel #24
0
        public int SetUpdating(String AdiNumber, Boolean IsUpdating)
        {
            String           Query = "UPDATE ADIProduct1 WITH (ROWLOCK) SET IsUpdating = @IsUpdating WHERE AdiNumber = @AdiNumber";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("AdiNumber", 4000, AdiNumber);
            oDm.AddBoolPara("IsUpdating", IsUpdating);
            return(oDm.RunActionQuery());
        }
        private int Update(String ManufacturerCode, InManufacturerSeries manufacturer)
        {
            String Query = "UPDATE [SecLockManufacturerSeries] SET [Name] = '" + manufacturer.Name
                           + "',[ManufacturerCode] = '" + ManufacturerCode
                           + "' WHERE [Name] = '" + manufacturer.Name + "'";
            SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
        private int  Update(InManufacturer manufacturer)
        {
            String Query = "UPDATE [SecLockManufacturer] SET [Name] = '" + manufacturer.Name
                           + "',[ImagePath] = '" + manufacturer.ImagePath
                           + "', [Url] = '" + manufacturer.Url
                           + "' WHERE [Code] = '" + manufacturer.Code + "'";
            SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);

            return(oDm.RunActionQuery());
        }
Beispiel #27
0
        public int SetProductPriority(String AdiNumber, Boolean PriorityProduct, Int32 LeastCount)
        {
            String           Query = "UPDATE ADIProduct1 WITH (ROWLOCK) SET PriorityProduct = @PriorityProduct, LeastCount = @LeastCount WHERE AdiNumber = @AdiNumber";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("AdiNumber", 4000, AdiNumber);
            oDm.AddBoolPara("PriorityProduct", PriorityProduct);
            oDm.AddIntegerPara("LeastCount", LeastCount);
            return(oDm.RunActionQuery());
        }
Beispiel #28
0
        public int UpdateImageByID(Int64 ID, String SmallImage, String BigImage)
        {
            String           Query = "UPDATE ADIProduct1 WITH (ROWLOCK) SET SmallImage = @SmallImage, BigImage = @BigImage WHERE ID = @ID";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("SmallImage", 4000, SmallImage);
            oDm.AddVarcharPara("BigImage", 4000, BigImage);
            oDm.AddIntegerBigPara("ID", ID);
            return(oDm.RunActionQuery());
        }
        public int UpdateValue(String PART_NUM, String PropertyName, String PropertyValue)
        {
            String           Query = "UPDATE ADIChild WITH (ROWLOCK) SET PropertyValue = @PropertyValue WHERE PART_NUM = @PART_NUM AND PropertyName = @PropertyName";
            SqlCeDataManager oDm   = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("PART_NUM", 4000, PART_NUM);
            oDm.AddVarcharPara("PropertyName", 4000, PropertyName);
            oDm.AddVarcharPara("PropertyValue", 4000, PropertyValue);
            return(oDm.RunActionQuery());
        }
Beispiel #30
0
        public int Insert(String Value, String DisplayName)
        {
            String Query = "INSERT INTO ADIBrands WITH (ROWLOCK) (Value, DisplayName) "
                           + "VALUES (@Value, @DisplayName)";
            SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);

            oDm.AddVarcharPara("@Value", 255, Value);
            oDm.AddVarcharPara("@DisplayName", 255, DisplayName);
            return(oDm.RunActionQuery());
        }