本文整理汇总了C#中WebSpider.Data.DatabaseManager.SqlCeDataManager类的典型用法代码示例。如果您正苦于以下问题:C# SqlCeDataManager类的具体用法?C# SqlCeDataManager怎么用?C# SqlCeDataManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
SqlCeDataManager类属于WebSpider.Data.DatabaseManager命名空间,在下文中一共展示了SqlCeDataManager类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DeleteByPart
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();
}
示例2: GetBySite
public List<FinalExport> GetBySite(String ExportSite)
{
String Query = "SELECT * FROM FinalExport WHERE ExportSite = @ExportSite ORDER BY CreatedDate";
SqlCeDataManager oDm = new SqlCeDataManager(ConnectionString, Query, true);
oDm.AddVarcharPara("ExportSite", 4000, ExportSite);
return DataParser.ToList<FinalExport>(oDm.GetTable());
}
示例3: DeleteById
public int DeleteById(Int64 TaskID)
{
String Query = "DELETE FROM TaskDetail WHERE TaskID = @TaskID";
SqlCeDataManager oDm = new SqlCeDataManager(ConnectionString, Query, true);
oDm.AddIntegerBigPara("TaskID", TaskID);
return oDm.RunActionQuery();
}
示例4: GetCategoryByParent
public List<AdiCategory> GetCategoryByParent(String ParentValue)
{
String Query = "SELECT * FROM ADICategory WITH (NOLOCK) WHERE ParentValue = @ParentValue";
SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
oDm.AddVarcharPara("ParentValue", 255, ParentValue);
return DataParser.ToList<AdiCategory>(oDm.GetTable());
}
示例5: GetDataById
public List<TaskDetail> GetDataById(Int64 TaskID)
{
String Query = "SELECT * FROM TaskDetail WHERE TaskID = @TaskID";
SqlCeDataManager oDm = new SqlCeDataManager(ConnectionString, Query, true);
oDm.AddIntegerBigPara("TaskID", TaskID);
return DataParser.ToList<TaskDetail>(oDm.GetTable());
}
示例6: ProductCount
//public List<ADIInventoryExport> FillByProduct(String PART_NUM)
//{
// String Query = "SELECT * FROM ADIInventoryExport WHERE PART_NUM = @PART_NUM";
// SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
// oDm.AddVarcharPara("PART_NUM", 4000, PART_NUM);
// return DataParser.ToList<ADIInventoryExport>(oDm.GetTable());
//}
public int ProductCount(String PART_NUM)
{
String Query = "SELECT COUNT(1) FROM ADIInventoryExport WITH (NOLOCK) WHERE PART_NUM = @PART_NUM";
SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
oDm.AddVarcharPara("PART_NUM", 4000, PART_NUM);
return (int) oDm.GetTable().Rows[0][0];
}
示例7: DeleteById
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();
}
示例8: GetDataTableByPartNumber
public DataTable GetDataTableByPartNumber(String PART_NUM)
{
String Query = "SELECT * FROM ADIChild WITH (NOLOCK) WHERE PART_NUM = @PART_NUM";
SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
oDm.AddVarcharPara("PART_NUM", 4000, PART_NUM);
return oDm.GetTable();
}
示例9: Insert
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();
}
示例10: GetTop
public FinalExport GetTop()
{
String Query = "SELECT TOP 1 * FROM FinalExport ORDER BY CreatedDate";
SqlCeDataManager oDm = new SqlCeDataManager(ConnectionString, Query, true);
List<FinalExport> finalExports = DataParser.ToList<FinalExport>(oDm.GetTable());
return finalExports.Count == 0 ? null : finalExports[0];
}
示例11: GenerateScheduleNextRun
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();
}
示例12: GetDataByCatagoryID
public List<ADICategoryExport> GetDataByCatagoryID(String Value)
{
String Query = "SELECT * FROM ADICategoryExport WITH (NOLOCK) WHERE Value = @Value";
SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
oDm.AddVarcharPara("Value", 255, Value);
return DataParser.ToList<ADICategoryExport>(oDm.GetTable());
}
示例13: GetData
public List<AdiProduct> GetData()
{
String Query = "SELECT * FROM ADIProduct1 WITH (NOLOCK)";
SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
oDm.ConnectionString = this.ConnectionString;
return DataParser.ToList<AdiProduct>(oDm.GetTable());
}
示例14: GetAllPriorityProducts
public List<AdiProduct> GetAllPriorityProducts()
{
String Query = "SELECT * FROM ADIProduct1 WITH (NOLOCK) WHERE PriorityProduct = 1 AND LastUpdateDatetime <= DATEADD(d, -1, GETDATE())";
SqlCeDataManager oDm = new SqlCeDataManager(this.ConnectionString, Query, true);
oDm.ConnectionString = this.ConnectionString;
return DataParser.ToList<AdiProduct>(oDm.GetTable());
}
示例15: Insert
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();
}