using System;
using Grove.ORM;
using System.Collections;
using Grove.Sql;
using Grove.Util;
namespace ConsoleApplication1
{
/// <summary>
/// dnt_wordsDB 的摘要说明。
/// </summary>
public class dnt_wordsDB
{
public static void Main()
{
dnt_words dw=new dnt_words();
// dw.admin="a4647";
// dw.find="aaa";
//dw.replacement="ccc";
dw.id=2;
//dnt_wordsDB.Insert(dw);
//dnt_wordsDB.Update(dw);
// dnt_wordsDB.Remove(dw);
// dnt_words_Collection dwc= dnt_wordsDB.Read_dnt_words();
// Console.WriteLine(dwc.Count);
Console.WriteLine(Get_dnt_words_Count());
}
public static Int32 Get_dnt_words_Count()
{
IDbOperator dbOperator=DbOperatorFactory.GetDbOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
try
{
return Convert.ToInt32(dbOperator.ExecScalar("select count(*) from dnt_words"));
}
finally
{
dbOperator.Dispose();
}
}
public static dnt_words_Collection Read_dnt_words()
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
dnt_words_Collection dwc=new dnt_words_Collection();
try
{
ArrayList orders=a.GetObjectSet(new ObjectQuery(typeof(dnt_words),"dnt_words.find='aaa'"));
foreach(object c in orders)
{
dnt_words d=(dnt_words)c;
dwc.Add(d);
}
}
catch(Exception e)
{
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
}
finally
{
a.Dispose();
}
return dwc;
}
public static void Remove(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Remove(dw);
a.Commit();
}
catch
{
a.Rollback();
throw;
}
finally
{
a.Dispose();
}
}
public static void Insert(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Insert(dw);
a.Commit();
Console.WriteLine("succeed");
}
catch
{
a.Rollback();
Console.WriteLine("error");
throw;
}
finally
{
a.Dispose();
Console.WriteLine("end");
}
}
public static void Update(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Update(dw);
a.Commit();
}
catch
{
a.Rollback();
throw;
}
finally
{
a.Dispose();
}
}
}
}
using Grove.ORM;
using System.Collections;
using Grove.Sql;
using Grove.Util;
namespace ConsoleApplication1
{
/// <summary>
/// dnt_wordsDB 的摘要说明。
/// </summary>
public class dnt_wordsDB
{
public static void Main()
{
dnt_words dw=new dnt_words();
// dw.admin="a4647";
// dw.find="aaa";
//dw.replacement="ccc";
dw.id=2;
//dnt_wordsDB.Insert(dw);
//dnt_wordsDB.Update(dw);
// dnt_wordsDB.Remove(dw);
// dnt_words_Collection dwc= dnt_wordsDB.Read_dnt_words();
// Console.WriteLine(dwc.Count);
Console.WriteLine(Get_dnt_words_Count());
}
public static Int32 Get_dnt_words_Count()
{
IDbOperator dbOperator=DbOperatorFactory.GetDbOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
try
{
return Convert.ToInt32(dbOperator.ExecScalar("select count(*) from dnt_words"));
}
finally
{
dbOperator.Dispose();
}
}
public static dnt_words_Collection Read_dnt_words()
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
dnt_words_Collection dwc=new dnt_words_Collection();
try
{
ArrayList orders=a.GetObjectSet(new ObjectQuery(typeof(dnt_words),"dnt_words.find='aaa'"));
foreach(object c in orders)
{
dnt_words d=(dnt_words)c;
dwc.Add(d);
}
}
catch(Exception e)
{
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
}
finally
{
a.Dispose();
}
return dwc;
}
public static void Remove(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Remove(dw);
a.Commit();
}
catch
{
a.Rollback();
throw;
}
finally
{
a.Dispose();
}
}
public static void Insert(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Insert(dw);
a.Commit();
Console.WriteLine("succeed");
}
catch
{
a.Rollback();
Console.WriteLine("error");
throw;
}
finally
{
a.Dispose();
Console.WriteLine("end");
}
}
public static void Update(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Update(dw);
a.Commit();
}
catch
{
a.Rollback();
throw;
}
finally
{
a.Dispose();
}
}
}
}
using System;
using Grove.ORM;
using System.Collections;
namespace ConsoleApplication1
{
//自动生成
[DataTable("dnt_words")]
public class dnt_words
{
Int32 _id;
String _admin;
String _find;
String _replacement;
// [DataField("id")]
// [KeyField("id",KeyType = UniqueIDType.OtherDefinition)] // w
// [KeyField("id",KeyType = UniqueIDType.AutoIdentitiy)] // r
[KeyField("id")] //r
public Int32 id
{
get{return this._id;}
set{this._id=value;}
}
[DataField("admin")]
public String admin
{
get{return this._admin;}
set{this._admin=value;}
}
[DataField("find")]
public String find
{
get{return this._find;}
set{this._find=value;}
}
[DataField("replacement")]
public String replacement
{
get{return this._replacement;}
set{this._replacement=value;}
}
}
//不是自动生成,但可以做成code_smith模板
public class dnt_words_Collection : System.Collections.CollectionBase
{
public dnt_words this[Int32 index]
{
set
{
this.List[index] = value;
}
get
{
return (dnt_words)this.List[index];
}
}
public Int32 Add(dnt_words value)
{
return this.List.Add(value);
}
}
}
ing System;using Grove.ORM;
using System.Collections;
namespace ConsoleApplication1
{
//自动生成
[DataTable("dnt_words")]
public class dnt_words
{
Int32 _id;
String _admin;
String _find;
String _replacement;
// [DataField("id")]
// [KeyField("id",KeyType = UniqueIDType.OtherDefinition)] // w
// [KeyField("id",KeyType = UniqueIDType.AutoIdentitiy)] // r
[KeyField("id")] //r
public Int32 id
{
get{return this._id;}
set{this._id=value;}
}
[DataField("admin")]
public String admin
{
get{return this._admin;}
set{this._admin=value;}
}
[DataField("find")]
public String find
{
get{return this._find;}
set{this._find=value;}
}
[DataField("replacement")]
public String replacement
{
get{return this._replacement;}
set{this._replacement=value;}
}
}
//不是自动生成,但可以做成code_smith模板
public class dnt_words_Collection : System.Collections.CollectionBase
{
public dnt_words this[Int32 index]
{
set
{
this.List[index] = value;
}
get
{
return (dnt_words)this.List[index];
}
}
public Int32 Add(dnt_words value)
{
return this.List.Add(value);
}
}
}
2 using Grove.ORM;
3 using System.Collections;
4 using Grove.Sql;
5 using Grove.Util;
6
7
8 namespace ConsoleApplication1
9 {
10
11 /// <summary>
12 /// dnt_wordsDB 的摘要说明。
13 /// </summary>
14 public class dnt_wordsDB
15 {
16 public static void Main()
17 {
18 dnt_words dw=new dnt_words();
19 // dw.admin="a4647";
20 // dw.find="aaa";
21 //dw.replacement="ccc";
22 dw.id=2;
23 //dnt_wordsDB.Insert(dw);
24 //dnt_wordsDB.Update(dw);
25 // dnt_wordsDB.Remove(dw);
26 // dnt_words_Collection dwc= dnt_wordsDB.Read_dnt_words();
27 // Console.WriteLine(dwc.Count);
28 Console.WriteLine(Get_dnt_words_Count());
29 }
30
31 public static Int32 Get_dnt_words_Count()
32 {
33 IDbOperator dbOperator=DbOperatorFactory.GetDbOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
34 try
35 {
36 return Convert.ToInt32(dbOperator.ExecScalar("select count(*) from dnt_words"));
37 }
38 finally
39 {
40 dbOperator.Dispose();
41 }
42 }
43
44 public static dnt_words_Collection Read_dnt_words()
45
46 {
47
48 ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
49 dnt_words_Collection dwc=new dnt_words_Collection();
50 try
51 {
52 ArrayList orders=a.GetObjectSet(new ObjectQuery(typeof(dnt_words),"dnt_words.find='aaa'"));
53 foreach(object c in orders)
54 {
55 dnt_words d=(dnt_words)c;
56 dwc.Add(d);
57 }
58 }
59 catch(Exception e)
60 {
61 Console.WriteLine(e.Message);
62 Console.WriteLine(e.StackTrace);
63 }
64
65 finally
66 {
67 a.Dispose();
68 }
69 return dwc;
70
71 }
72 public static void Remove(dnt_words dw)
73
74 {
75
76 ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
77 a.BeginTranscation();
78 try
79 {
80 a.Remove(dw);
81 a.Commit();
82 }
83 catch
84 {
85 a.Rollback();
86 throw;
87 }
88
89 finally
90 {
91 a.Dispose();
92
93 }
94
95 }
96 public static void Insert(dnt_words dw)
97 {
98 ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
99 a.BeginTranscation();
100 try
101 {
102 a.Insert(dw);
103 a.Commit();
104 Console.WriteLine("succeed");
105
106 }
107 catch
108 {
109 a.Rollback();
110 Console.WriteLine("error");
111 throw;
112 }
113 finally
114 {
115 a.Dispose();
116 Console.WriteLine("end");
117 }
118
119 }
120
121 public static void Update(dnt_words dw)
122 {
123 ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
124 a.BeginTranscation();
125 try
126 {
127 a.Update(dw);
128 a.Commit();
129 }
130 catch
131 {
132 a.Rollback();
133 throw;
134 }
135 finally
136 {
137 a.Dispose();
138 }
139
140 }
141
142 }
143 }
144
using System;
using Grove.ORM;
using System.Collections;
namespace ConsoleApplication1
{
//自动生成
[DataTable("dnt_words")]
public class dnt_words
{
Int32 _id;
String _admin;
String _find;
String _replacement;
// [DataField("id")]
// [KeyField("id",KeyType = UniqueIDType.OtherDefinition)] // w
// [KeyField("id",KeyType = UniqueIDType.AutoIdentitiy)] // r
[KeyField("id")] //r
public Int32 id
{
get{return this._id;}
set{this._id=value;}
}
[DataField("admin")]
public String admin
{
get{return this._admin;}
set{this._admin=value;}
}
[DataField("find")]
public String find
{
get{return this._find;}
set{this._find=value;}
}
[DataField("replacement")]
public String replacement
{
get{return this._replacement;}
set{this._replacement=value;}
}
}
//不是自动生成,但可以做成code_smith模板
public class dnt_words_Collection : System.Collections.CollectionBase
{
public dnt_words this[Int32 index]
{
set
{
this.List[index] = value;
}
get
{
return (dnt_words)this.List[index];
}
}
public Int32 Add(dnt_words value)
{
return this.List.Add(value);
}
}
}
using Grove.ORM;
using System.Collections;
namespace ConsoleApplication1
{
//自动生成
[DataTable("dnt_words")]
public class dnt_words
{
Int32 _id;
String _admin;
String _find;
String _replacement;
// [DataField("id")]
// [KeyField("id",KeyType = UniqueIDType.OtherDefinition)] // w
// [KeyField("id",KeyType = UniqueIDType.AutoIdentitiy)] // r
[KeyField("id")] //r
public Int32 id
{
get{return this._id;}
set{this._id=value;}
}
[DataField("admin")]
public String admin
{
get{return this._admin;}
set{this._admin=value;}
}
[DataField("find")]
public String find
{
get{return this._find;}
set{this._find=value;}
}
[DataField("replacement")]
public String replacement
{
get{return this._replacement;}
set{this._replacement=value;}
}
}
//不是自动生成,但可以做成code_smith模板
public class dnt_words_Collection : System.Collections.CollectionBase
{
public dnt_words this[Int32 index]
{
set
{
this.List[index] = value;
}
get
{
return (dnt_words)this.List[index];
}
}
public Int32 Add(dnt_words value)
{
return this.List.Add(value);
}
}
}
using System;
using Grove.ORM;
using System.Collections;
using Grove.Sql;
using Grove.Util;
namespace ConsoleApplication1
{
/// <summary>
/// dnt_wordsDB 的摘要说明。
/// </summary>
public class dnt_wordsDB
{
public static void Main()
{
dnt_words dw=new dnt_words();
// dw.admin="a4647";
// dw.find="aaa";
//dw.replacement="ccc";
dw.id=2;
//dnt_wordsDB.Insert(dw);
//dnt_wordsDB.Update(dw);
// dnt_wordsDB.Remove(dw);
// dnt_words_Collection dwc= dnt_wordsDB.Read_dnt_words();
// Console.WriteLine(dwc.Count);
Console.WriteLine(Get_dnt_words_Count());
}
public static Int32 Get_dnt_words_Count()
{
IDbOperator dbOperator=DbOperatorFactory.GetDbOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
try
{
return Convert.ToInt32(dbOperator.ExecScalar("select count(*) from dnt_words"));
}
finally
{
dbOperator.Dispose();
}
}
public static dnt_words_Collection Read_dnt_words()
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
dnt_words_Collection dwc=new dnt_words_Collection();
try
{
ArrayList orders=a.GetObjectSet(new ObjectQuery(typeof(dnt_words),"dnt_words.find='aaa'"));
foreach(object c in orders)
{
dnt_words d=(dnt_words)c;
dwc.Add(d);
}
}
catch(Exception e)
{
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
}
finally
{
a.Dispose();
}
return dwc;
}
public static void Remove(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Remove(dw);
a.Commit();
}
catch
{
a.Rollback();
throw;
}
finally
{
a.Dispose();
}
}
public static void Insert(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Insert(dw);
a.Commit();
Console.WriteLine("succeed");
}
catch
{
a.Rollback();
Console.WriteLine("error");
throw;
}
finally
{
a.Dispose();
Console.WriteLine("end");
}
}
public static void Update(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Update(dw);
a.Commit();
}
catch
{
a.Rollback();
throw;
}
finally
{
a.Dispose();
}
}
}
}
using Grove.ORM;
using System.Collections;
using Grove.Sql;
using Grove.Util;
namespace ConsoleApplication1
{
/// <summary>
/// dnt_wordsDB 的摘要说明。
/// </summary>
public class dnt_wordsDB
{
public static void Main()
{
dnt_words dw=new dnt_words();
// dw.admin="a4647";
// dw.find="aaa";
//dw.replacement="ccc";
dw.id=2;
//dnt_wordsDB.Insert(dw);
//dnt_wordsDB.Update(dw);
// dnt_wordsDB.Remove(dw);
// dnt_words_Collection dwc= dnt_wordsDB.Read_dnt_words();
// Console.WriteLine(dwc.Count);
Console.WriteLine(Get_dnt_words_Count());
}
public static Int32 Get_dnt_words_Count()
{
IDbOperator dbOperator=DbOperatorFactory.GetDbOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
try
{
return Convert.ToInt32(dbOperator.ExecScalar("select count(*) from dnt_words"));
}
finally
{
dbOperator.Dispose();
}
}
public static dnt_words_Collection Read_dnt_words()
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
dnt_words_Collection dwc=new dnt_words_Collection();
try
{
ArrayList orders=a.GetObjectSet(new ObjectQuery(typeof(dnt_words),"dnt_words.find='aaa'"));
foreach(object c in orders)
{
dnt_words d=(dnt_words)c;
dwc.Add(d);
}
}
catch(Exception e)
{
Console.WriteLine(e.Message);
Console.WriteLine(e.StackTrace);
}
finally
{
a.Dispose();
}
return dwc;
}
public static void Remove(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Remove(dw);
a.Commit();
}
catch
{
a.Rollback();
throw;
}
finally
{
a.Dispose();
}
}
public static void Insert(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Insert(dw);
a.Commit();
Console.WriteLine("succeed");
}
catch
{
a.Rollback();
Console.WriteLine("error");
throw;
}
finally
{
a.Dispose();
Console.WriteLine("end");
}
}
public static void Update(dnt_words dw)
{
ObjectOperator a=new ObjectOperator(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=D:\web\dnt_acc_n1_1_src_access\Source Code\database\access_db.mdb;Persist Security Info=False");
a.BeginTranscation();
try
{
a.Update(dw);
a.Commit();
}
catch
{
a.Rollback();
throw;
}
finally
{
a.Dispose();
}
}
}
}