|
 |
BookNC Database Window Application
developed with Microsoft Visual C#
2019 | |
 |
|
|
|
|
|
|
|
The Microsoft Visual C# 2019 member of the Microsoft
Visual Studio Community 2019 |
|
|
|
|
|
|
|
|
|
|
BookNC
Database
Window Application.., describe
how to use Microsoft Visual C# 2019 to create game application
1- |
BookNC Database Executable (exe file)
| |
|
-
BookNC
Database Software,
Developed with
Microsoft Visual
C# 2019 (& used .Net
Framework 4.7.2),
but The Microsoft Access database manage the data.
(The Microsoft
Access database
file -
Book_VC19.mdb)
-
Functions:
Use the Menu items,
Toolbar Buttons, to
call group of
Froms,
Navigation, Add new record,
Modify/Edit, Save, Search,
Add and remove
picture,
Large search operation,
show and modify record,
Animation,
...
-
Executable
Database Software
(exe file), Developed with
Microsoft Visual C# 2019
|
| |
|
|
2- |
The
Microsoft Visual C# 2019 member of the Microsoft
Visual Studio Community 2019 |
|
|
3- |
How Create
a C# application project. |
|
-
Open Visual Studio 2019.
-
On the start window, choose Create
a new project.
-
On the Create
a new project window, choose
the Windows
Forms App (.NET Framework) template for
C#.
(If you prefer, you can refine your search to quickly get to
the template you want. For example, enter or type Windows
Forms App in the search box. Next,
choose C# from
the Language list, and then choose Windows from
the Platform list.)
-
In the Configure
your new project window, type or
enter HelloWorld in
the Project
name box. Then,
choose Create.
-
Visual Studio opens your new project.
-
Create the application After you
select your C# project template and name your file, Visual Studio
opens a form for you. A form is a Windows user interface.
We'll create a "Hello World" application by adding controls
to the form, and then we'll run the application.
-
Note:
the Name of the
default Form created - Form1.cs, Before to Add controls,
it is Available to Modify the name and Proprieties of this
Form
-
Add
a "Controls" to this form ...
-
Note: Example, to Create DataSource / Dataset ... - KJV2002.mdb
|
|
|
 |
Note: Example, to Create DataSource / Dataset ... - KJV2002.mdb | |
|
|
1- |
Create a dataset for an .mdb
file - (Ex: KJV2002.mdb) |
|
|
1.1- |
Connect to databases created with Access 2000-2003 by
using the following procedure.
- Open a Windows Forms or WPF application project in Visual Studio.
- On the View menu, select Other
Windows > Data Sources.
- In the Data Sources window, click Add New
Data Source
The Data Source Configuration
Wizard opens.
.
- Select Database on the Choose a Data Source
Type page, and then select Next.
- Select Dataset on the Choose a Database
Model page, and then select
Next.
-
Add & Test
Connection
- On the Choose your Data Connection page, select New Connection to configure a new data connection
-
If the data source is not Microsoft Access Database File
(OLE DB), select Change to open the Change Data Source dialog box and select Microsoft Access Database File, and then select OK.
-
In the Database file name, specify the path and
name of the .mdb file you want to connect to, and then select OK.

-
Select Next on the Choose your Data
Connection page.
-
Select Next on the Save connection string
to the Application Configuration file page.
-
Expand the Tables node on the Choose your
Database Objects page.
-
Select whatever tables or views you want in your dataset
, and then select Finish.
The dataset is added to your project, and the tables and views appear
in the Data Sources window.
|
|
|
2- |
Drag a data source from
the Data Sources window onto a form design surface
|
|
You can drag a data source from the Data
Sources window onto a form design surface or control. This causes
boilerplate code to be generated that displays the data from the data
store.
The following illustration shows a dataset that has been dropped onto a
Windows form. If you select F5 on the application, the
data from the underlying database appears in the form's controls.
|
|
|
|
|
|
| | | |
|
|
|
|
|
|
|
4- |
BookNC Database Proprieties and
Solution
Explorer |
|
- BookNC Database
Proprieties:
- the
Assembly/Project name : BookNC
-
Assembly Project Folder: C:\Users\...\source\repos\BookNC\
-
the Target framework: .Net Framework 4.7.2
-
the Output
type: Window Application
-
Startup
object: BookNC.Program
|
 |
-
BookNC Solution Explorer
- BookNC
project developed with C# 2019, consist
of:
- 5 Form
files:
MainForm.cs,
BookForm.cs,
Book_Search.cs,
Intro.cs,
AboutB.cs
- 2
Folder - pic and Data
-
pic folder stores 31 picture files
- Data folder stores Book_VC19.mdb
and ptc_face
folder. ( where ptc_face folder stores 5 picture files)
|
|
 |
|
|
|
5- |
How
to Run this
application
|
|
-
Remove the read-only attribute
of all files in the folder -
C:\Users\...\source\repos\BookNC
-
Run
the Microsoft Visual Studio
Community 2019.
-
From
File menu, choose
Open then
choose Project/Solution,
the Open Project dialog
box appears, select the
BookNC project file -Type:
Microsoft Visual Studio Solution
(C:\Users\...\source\repos\BookNC \BookNC .sln)
and then click Open.
-
From
Debug menu, choose and
click Start Debugging
|
|
|
6- |
After
running BookNC, the following View design
display by order |
|
|
 |
BookNC Database Application developed with Microsoft
Visual Studio Community 2019, C# - Face Game
| |
BookNC Database Application
developed with Microsoft
Visual
Studio Community 2019, C# - Face
Game |
1. |
-
Database
Software Application , but The Microsoft Access database
- (Book_VC19.mdb) manage the data
-
Operations: Menu, digital bookForm,
Search Form, ...
-
Includes 5 Forms
-
Classes used :
DataSet,
Toolbar,
TabControl,, ComboBox, MainMenu,
Timer,
PictureBox, Label,
TextBox, Button, ScrolBar,
Check Box, Radio Box, ImageList,
ListBox DataGrid and ...
-
Logical Classes:
DbConnection, DbDataAdapter,
DbCommand
|
2. |
1st Form -
MainForm.cs |
|
The design
|
 |
Functions
|
Use the Menu items,
Toolbar Buttons, to
call group of
Froms .. | |
3. |
BookForm.cs
and
Book_search.cs
a. |
2nd Form
- BookForm.cs |
|
The design
|
 |
Functions |
data form, uses Access
database file -
work_VBNet.mdb.
Navigation -
(First, previous, Next, Last)
Add new record
Modify/Edit
Save
Search
Add and remove picture
...-
|
|
b. |
3th Form
- Book_search.cs |
|
The design
|
 |
|
|
Functions |
Uses to display or to
show and modify specific
record at the form
book_note.
Large search operation
...
|
|
|
3. |
4th Form
- Intro.cs |
|
The design
|
 |
Functions
|
Show the picture ... | |
4. |
5th Form
- AboutB.cs |
|
|
|
The design
|
 |
Functions
|
Animation
General Info
....
Information data, about
your PC
|
|
|
|
| | | |
|
|
|
|
|
|
7- |
MainForm.cs,
1st
Form of BookNC project/Application |
|
7.1 |
View
Designer |
|
 |
|
|
7.2 |
View
Codes |
|
|
 |
the
Code of MainForm
Form | |
the Code of MainForm
Form of BookNC Database Application
developed with
Microsoft Visual
Studio Community 2019, C# - Face
Game |
|
|
|
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Windows.Forms;
namespace
BookNC
{
public
partial
class
MainForm
: Form
{
public
class
MainForm_cl
{
public
static
string
Title =
"Book C# 2019 application,
Message";
//cuurent directory, chk
folder = name of computer
folder
public
static
string
current_path =
"C:\\Users\\chk\\source\\repos\\BookNC";
}
System.Windows.Forms.DialogResult
Response;
string
Msg_inf;
public
MainForm()
{
InitializeComponent();
}
private
void
MainForm_Load(object
sender, EventArgs e)
{
this.Bbuttontools.Text
=
"tools detail";
Sub_tools();
}
private
void
Sub_tools()
{
if
(this.Bbuttontools.Text
==
"tools detail")
{
this.Bbuttontools.Text
=
"tools hide";
Sub_toolsp();
this.panel2.Visible
=
true;
this.panel3.Visible
=
true;
}
else
if
(this.Bbuttontools.Text
==
"tools hide")
{
this.Bbuttontools.Text
=
"tools detail";
Sub_toolsp();
this.panel2.Visible
=
false;
this.panel3.Visible
=
false;
}
}
private
void
Sub_toolsp()
{
this.Panel1.Width
= 4 +
this.PictureBoxB.Width
+ 4;
this.Panel1.Left
= 4;
this.Panel1.Top
=
this.toolStrip1.Height
* 3 / 2;
this.Panel1.Height
=
this.Height
- (this.toolStrip1.Height
* 3);
this.Bbuttontools.Top
=
this.Bbuttontools.Height
/ 2;
this.Bbuttontools.Left
= 4;
this.Bbuttontools.Width
=
this.PictureBoxB.Width;
this.panel2.Width
=
this.Panel1.Width;
this.panel2.Left
= 0;
this.panel2.Top
=
this.Bbuttontools.Height
* 2;
this.panel2.Height
=
this.Panel1.Height
- ((this.Bbuttontools.Height
* 2));
this.panel3.Width
=
this.PictureBoxB.Width;
this.panel3.Top
= 4;
this.panel3.Left
= 4;
this.panel3.Height
=
this.panel2.Height
- 6;
this.PictureBoxB.Top
= ((this.PictureBoxB.Height
* 2)/ 3);
this.PictureBoxI.Left
=
this.PictureBoxB.Left;
this.PictureBoxI.Top
= ((this.PictureBoxB.Height
* 7)/3);
this.PictureBoxA.Left
=
this.PictureBoxB.Left;
this.PictureBoxA.Top
= ((this.PictureBoxB.Height
* 12)/3) ;
this.PictureBoxE.Left
=
this.PictureBoxB.Left;
this.PictureBoxE.Top
= ((this.PictureBoxB.Height
* 17) / 3);
this.LabelC1.Top
= (this.PictureBoxB.Height
* 7) ;
this.LabelC1.Text
=
"Computer: "
+
System.Environment.MachineName.ToString();
this.LabelC2.Top
= (this.PictureBoxB.Height
* 7) +
this.LabelC1.Height
;
this.LabelC2.Text
=
"Owner: "
+
System.Environment.UserName.ToString();
this.LabelC3.Top
= (this.PictureBoxB.Height
* 7) + +this.LabelC1.Height*3;
this.LabelC3.Text
=
"Time: "
+
System.DateTime.Now.ToLongTimeString();
}
private
void
Sub_intro()
{
Intro Fintro =
new
Intro();
Fintro.Show();
}
private
void
Sub_about()
{
AboutB Fabout =
new
AboutB();
Fabout.Show();
}
private
void
Sub_booknote()
{
BookForm Fbook_note =
new
BookForm();
Fbook_note.Show();
}
private
void
BookToolStripMenuItem_Click(object
sender, EventArgs e)
{
Sub_booknote();
}
private
void
IntroToolStripMenuItem1_Click(object
sender, EventArgs e)
{
Sub_intro();
}
private
void
AboutToolStripMenuItem_Click(object
sender, EventArgs e)
{
Sub_about();
}
private
void
ToolStripBook_Click(object
sender, EventArgs e)
{
Sub_booknote();
}
private
void
ToolStripIntro_Click(object
sender, EventArgs e)
{
Sub_intro();
}
private
void
ToolStripAbout_Click(object
sender, EventArgs e)
{
Sub_about();
}
private
void
ToolStripExit_Click(object
sender, EventArgs e)
{
Sub_close();
}
private
void
Sub_close()
{
//Message Box
Msg_inf =
"are you sure want to exit,
Book C# 2019";
Response =
MessageBox.Show(Msg_inf,
"Book, C# 2019, main",
MessageBoxButtons.YesNo,
System.Windows.Forms.MessageBoxIcon.Information);
if
(Response == DialogResult.Yes)
// Closes the parent form
Application.Exit();
}
private
void
ExitToolStripMenuItem1_Click(object
sender, EventArgs e)
{
Sub_close();
}
private
void
PictureBoxB_Click(object
sender, EventArgs e)
{
Sub_booknote();
}
private
void
PictureBoxI_Click(object
sender, EventArgs e)
{
Sub_intro();
}
private
void
PictureBoxA_Click(object
sender, EventArgs e)
{
Sub_about();
}
private
void
PictureBoxE_Click(object
sender, EventArgs e)
{
Sub_close();
}
private
void
Bbuttontools_Click(object
sender, EventArgs e)
{
Sub_tools();
}
}
} |
|
| | | |
|
| |
|
|
8- |
BookForm.cs,
2nd
Form of BookNC
project/Application |
|
8.1 |
View
Designer |
|
|
|
 |
8.2 |
View
Codes |
|
|
 |
the
Code of BookForm
Form | |
the Code of BookForm.cs Form
of
BookNC Database Application
developed with
Microsoft Visual
Studio Community 2019, C# - Face
Game |
|
|
|
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BookNC
{
public partial class BookForm : Form
{
// public variables
public class BookF_cl
{
public static string booknote_type;
public static int booknote_width;
public static int booknote_left;
public static int booknote_top;
}
// Variables
//connection
System.Data.OleDb.OleDbConnection DbConnection1
= new System.Data.OleDb.OleDbConnection();
//Select command
System.Data.OleDb.OleDbCommand vselect1 = new
System.Data.OleDb.OleDbCommand();
//Dataadapter
System.Data.OleDb.OleDbDataAdapter vda1 = new
System.Data.OleDb.OleDbDataAdapter();
//DataSet
System.Data.DataSet vdset1;
//Dataadapter1
System.Data.OleDb.OleDbDataAdapter DbDdapter1 =
new System.Data.OleDb.OleDbDataAdapter();
System.Data.OleDb.OleDbCommand DbSCommand1 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbICommand1 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbUCommand1 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbDCommand1 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbCommand1 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbCommand2 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbCommand3 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbCommand4 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbCommand5 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbCommand7 = new
System.Data.OleDb.OleDbCommand();
System.Data.OleDb.OleDbCommand DbCommand8 = new
System.Data.OleDb.OleDbCommand();
bool Mbeditflag;
bool Mbaddflag;
public BookForm()
{
InitializeComponent();
}
private void BookForm_Load(object sender,
EventArgs e)
{
this.DbConnection1.ConnectionString =
@"Provider=""Microsoft.Jet.OLEDB.4.0"";Data
Source=""C:\Users\chk\source\repos\BookNC\data\Book_VC19.mdb"";Persist
Security Info=False;User ID=Admin;Mode=Share
Deny None;Jet OLEDB:Engine Type=5;Jet
OLEDB:Database Locking Mode=1;Jet OLEDB:Global
Partial Bulk Ops=2;Jet OLEDB:Global Bulk
Transactions=1;Jet OLEDB:Create System Database=False;Jet
OLEDB:Encrypt Database=False;Jet OLEDB:Don't
Copy Locale on Compact=False;Jet OLEDB:Compact
Without Replica Repair=False;Jet OLEDB:SFP=False";
//move
this.editphoto_photo.Top = -this.editphoto_photo.Height;
//resize
this.Panel21.Top = (this.Panel2.Height -
this.Panel21.Height) / 2;
this.Panel22.Left = (this.Panel21.Width -
this.Panel22.Width) / 2;
this.lblNavLocation.Width = this.Panel22.Left -
16;
this.lblNavLocation.Left = (this.Panel22.Left -
this.lblNavLocation.Width) / 2;
this.lblNavLocation.Top = 0;
this.lboperation.Width =
this.lblNavLocation.Width;
this.lboperation.Left = this.Panel22.Left +
(this.Panel22.Left - this.lblNavLocation.Width)
/ 2;
this.lboperation.Top = this.lblNavLocation.Top;
this.Panel91.Top = this.Panel4.Top;
this.Panel41.Left = this.Panel91.Left;
this.Panel42.Left = this.Panel91.Left;
this.Panel91.Height = this.Panel4.Height +
this.Panel41.Height + this.Panel5.Height +
this.Panel42.Height + this.Panel6.Height;
this.Panel41.Top = this.Panel4.Top +
this.Panel4.Height;
this.Panel5.Top = this.Panel41.Top +
this.Panel41.Height;
this.Panel42.Top = this.Panel5.Top +
this.Panel5.Height;
this.Panel6.Top = this.Panel42.Top +
this.Panel42.Height;
this.Panel43.Top = this.Panel6.Top +
this.Panel6.Height;
this.Panel5.Left = this.Panel4.Left;
this.Panel6.Left = this.Panel4.Left;
this.Pic_line01.Width = this.Panel4.Width;
this.Pic_line01.Left = this.Panel91.Width;
this.Pic_line02.Width = this.Pic_line01.Width;
this.Pic_line02.Left = this.Pic_line01.Left;
this.Panel3.Height = this.Panel43.Top - 8;
this.Panel3.Top = 4;
this.Pic_book.Left = (this.Panel3.Width -
this.Pic_book.Width) / 2;
this.Pic_book.Top = this.Panel33.Top +
this.Panel33.Height + (this.Panel3.Height -
(this.Panel33.Top + this.Panel33.Height +
this.Pic_book.Height)) / 2;
BookF_cl.booknote_width = this.Width;
BookF_cl.booknote_left = this.Left;
BookF_cl.booknote_top = this.Top;
//Initialized DataAdapter, dataAdaper and
Command
sub_data_dapterCmd();
//load book table, Book_DSet1 dataset
LoadDataSet();
BookF_cl.booknote_type = "";
Mbeditflag = false;
Mbaddflag = false;
NavFirst();
sub_load("name");
sub_load("first");
sub_load("father");
sub_load("city");
sub_load("civil_status");
this.ltoday.Text =
DateTime.Today.ToLongDateString();
}
// Load data Adaper and Command
private void sub_data_dapterCmd()
{
// DbDadapter1
//
DbDdapter1.DeleteCommand = DbDCommand1;
DbDdapter1.InsertCommand = DbICommand1;
DbDdapter1.SelectCommand = DbSCommand1;
DbDdapter1.TableMappings.AddRange(new
System.Data.Common.DataTableMapping[] {
new System.Data.Common.DataTableMapping("Table",
"book", new System.Data.Common.DataColumnMapping[]
{
new System.Data.Common.DataColumnMapping("address1",
"address1"),
new System.Data.Common.DataColumnMapping("address2",
"address2"),
new
System.Data.Common.DataColumnMapping("alternativePhone",
"alternativePhone"),
new System.Data.Common.DataColumnMapping("birth",
"birth"),
new
System.Data.Common.DataColumnMapping("birth_d",
"birth_d"),
new
System.Data.Common.DataColumnMapping("birth_m",
"birth_m"),
new
System.Data.Common.DataColumnMapping("birth_y",
"birth_y"),
new System.Data.Common.DataColumnMapping("bookid",
"bookid"),
new System.Data.Common.DataColumnMapping("city",
"city"),
new
System.Data.Common.DataColumnMapping("civil_status",
"civil_status"),
new
System.Data.Common.DataColumnMapping("country",
"country"),
new System.Data.Common.DataColumnMapping("email",
"email"),
new
System.Data.Common.DataColumnMapping("father_name",
"father_name"),
new System.Data.Common.DataColumnMapping("fax",
"fax"),
new
System.Data.Common.DataColumnMapping("first_name",
"first_name"),
new
System.Data.Common.DataColumnMapping("function",
"function"),
new
System.Data.Common.DataColumnMapping("homephone",
"homephone"),
new
System.Data.Common.DataColumnMapping("mobilephone",
"mobilephone"),
new System.Data.Common.DataColumnMapping("name",
"name"),
new
System.Data.Common.DataColumnMapping("originalfirst_name",
"originalfirst_name"),
new System.Data.Common.DataColumnMapping("Photo",
"Photo"),
new
System.Data.Common.DataColumnMapping("post-office_box",
"post-office_box"),
new System.Data.Common.DataColumnMapping("sex",
"sex"),
new System.Data.Common.DataColumnMapping("web",
"web"),
new
System.Data.Common.DataColumnMapping("workphone",
"workphone")})});
DbDdapter1.UpdateCommand = DbUCommand1;
//
//
// oleDbDeleteCommand1
//
DbDCommand1.CommandText = @"DELETE FROM book
WHERE (bookid = ?) AND (Photo = ? OR ? IS NULL
AND Photo IS NULL) AND (address1 = ? OR ? IS
NULL AND address1 IS NULL) AND (address2 = ? OR
? IS NULL AND address2 IS NULL) AND (alternativePhone
= ? OR ? IS NULL AND alternativePhone IS NULL)
AND (birth = ? OR ? IS NULL AND birth IS NULL)
AND (birth_d = ? OR ? IS NULL AND birth_d IS
NULL) AND (birth_m = ? OR ? IS NULL AND birth_m
IS NULL) AND (birth_y = ? OR ? IS NULL AND
birth_y IS NULL) AND (city = ? OR ? IS NULL AND
city IS NULL) AND (civil_status = ? OR ? IS NULL
AND civil_status IS NULL) AND (country = ? OR ?
IS NULL AND country IS NULL) AND (email = ? OR ?
IS NULL AND email IS NULL) AND (father_name = ?
OR ? IS NULL AND father_name IS NULL) AND (fax =
? OR ? IS NULL AND fax IS NULL) AND (first_name
= ? OR ? IS NULL AND first_name IS NULL) AND
(function = ? OR ? IS NULL AND function IS NULL)
AND (homephone = ? OR ? IS NULL AND homephone IS
NULL) AND (mobilephone = ? OR ? IS NULL AND
mobilephone IS NULL) AND (name = ? OR ? IS NULL
AND name IS NULL) AND (originalfirst_name = ? OR
? IS NULL AND originalfirst_name IS NULL) AND
([post-office_box] = ? OR ? IS NULL AND [post-office_box]
IS NULL) AND (sex = ? OR ? IS NULL AND sex IS
NULL) AND (web = ? OR ? IS NULL AND web IS NULL)
AND (workphone = ? OR ? IS NULL AND workphone IS
NULL)";
DbDCommand1.Connection = DbConnection1;
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_bookid",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "bookid",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address11",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address21",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y1",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
DbDCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
//
// oleDbInsertCommand1
//
DbICommand1.CommandText = @"INSERT INTO
book(address1, address2, alternativePhone,
birth, birth_d, birth_m, birth_y, city,
civil_status, country, email, father_name, fax,
first_name, function, homephone, mobilephone,
name, originalfirst_name, Photo, [post-office_box],
sex, web, workphone) VALUES (?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?)";
DbICommand1.Connection = DbConnection1;
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address1"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address2"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30, "alternativePhone"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth",
System.Data.OleDb.OleDbType.DBDate, 0,
"birth"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_d"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_m"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4, "birth_y"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("city",
System.Data.OleDb.OleDbType.VarWChar, 25,
"city"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50, "civil_status"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("country",
System.Data.OleDb.OleDbType.VarWChar, 25,
"country"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("email",
System.Data.OleDb.OleDbType.VarWChar, 50,
"email"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("father_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "father_name"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
"fax"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("first_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "first_name"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("function",
System.Data.OleDb.OleDbType.VarWChar, 150,
"function"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("homephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "homephone"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "mobilephone"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("name",
System.Data.OleDb.OleDbType.VarWChar, 50,
"name"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "originalfirst_name"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
"Photo"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25, "post-office_box"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
"sex"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("web",
System.Data.OleDb.OleDbType.VarWChar, 50,
"web"));
DbICommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("workphone",
System.Data.OleDb.OleDbType.VarWChar, 30, "workphone"));
//
// oleDbSelectCommand1
//
DbSCommand1.CommandText = @"SELECT address1,
address2, alternativePhone, birth, birth_d,
birth_m, birth_y, bookid, city, civil_status,
country, email, father_name, fax, first_name,
function, homephone, mobilephone, name,
originalfirst_name, Photo, [post-office_box],
sex, web, workphone FROM book ORDER BY bookid";
DbSCommand1.Connection = DbConnection1;
//
// oleDbUpdateCommand1
//
DbUCommand1.CommandText = "UPDATE book SET
address1 = ?, address2 = ?, alternativePhone =
?, birth = ?, birt" +
"h_d = ?, birth_m = ?, birth_y = ?, city = ?,
civil_status = ?, country = ?, emai" +
"l = ?, father_name = ?, fax = ?, first_name =
?, function = ?, homephone = ?, mo" +
"bilephone = ?, name = ?, originalfirst_name =
?, Photo = ?, [post-office_box] = " +
"?, sex = ?, web = ?, workphone = ? WHERE (bookid
= ?) AND (Photo = ? OR ? IS NUL" +
"L AND Photo IS NULL) AND (address1 = ? OR ? IS
NULL AND address1 IS NULL) AND (a" +
"ddress2 = ? OR ? IS NULL AND address2 IS NULL)
AND (alternativePhone = ? OR ? IS" +
" NULL AND alternativePhone IS NULL) AND (birth
= ? OR ? IS NULL AND birth IS NUL" +
"L) AND (birth_d = ? OR ? IS NULL AND birth_d IS
NULL) AND (birth_m = ? OR ? IS N" +
"ULL AND birth_m IS NULL) AND (birth_y = ? OR ?
IS NULL AND birth_y IS NULL) AND " +
"(city = ? OR ? IS NULL AND city IS NULL) AND (civil_status
= ? OR ? IS NULL AND " +
"civil_status IS NULL) AND (country = ? OR ? IS
NULL AND country IS NULL) AND (em" +
"ail = ? OR ? IS NULL AND email IS NULL) AND (father_name
= ? OR ? IS NULL AND fa" +
"ther_name IS NULL) AND (fax = ? OR ? IS NULL
AND fax IS NULL) AND (first_name = " +
"? OR ? IS NULL AND first_name IS NULL) AND
(function = ? OR ? IS NULL AND functi" +
"on IS NULL) AND (homephone = ? OR ? IS NULL AND
homephone IS NULL) AND (mobileph" +
"one = ? OR ? IS NULL AND mobilephone IS NULL)
AND (name = ? OR ? IS NULL AND nam" +
"e IS NULL) AND (originalfirst_name = ? OR ? IS
NULL AND originalfirst_name IS NU" +
"LL) AND ([post-office_box] = ? OR ? IS NULL AND
[post-office_box] IS NULL) AND (" +
"sex = ? OR ? IS NULL AND sex IS NULL) AND (web
= ? OR ? IS NULL AND web IS NULL)" +
" AND (workphone = ? OR ? IS NULL AND workphone
IS NULL)";
DbUCommand1.Connection = DbConnection1;
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address1"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address2"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30, "alternativePhone"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth",
System.Data.OleDb.OleDbType.DBDate, 0,
"birth"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_d"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_m"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4, "birth_y"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("city",
System.Data.OleDb.OleDbType.VarWChar, 25,
"city"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50, "civil_status"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("country",
System.Data.OleDb.OleDbType.VarWChar, 25,
"country"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("email",
System.Data.OleDb.OleDbType.VarWChar, 50,
"email"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("father_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "father_name"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
"fax"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("first_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "first_name"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("function",
System.Data.OleDb.OleDbType.VarWChar, 150,
"function"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("homephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "homephone"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "mobilephone"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("name",
System.Data.OleDb.OleDbType.VarWChar, 50,
"name"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "originalfirst_name"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
"Photo"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25, "post-office_box"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
"sex"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("web",
System.Data.OleDb.OleDbType.VarWChar, 50,
"web"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("workphone",
System.Data.OleDb.OleDbType.VarWChar, 30, "workphone"));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_bookid",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "bookid",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address11",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address21",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y1",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
DbUCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
// OleDbCommand2
//
DbCommand2.CommandText = @"SELECT address1,
address2, alternativePhone, birth, birth_d,
birth_m, birth_y, bookid, city, civil_status,
country, email, father_name, fax, first_name,
function, homephone, mobilephone, name,
originalfirst_name, [post-office_box], sex, web,
workphone, Photo FROM book ORDER BY bookid";
DbCommand2.Connection = DbConnection1;
// OleDbCommand4
//
DbCommand4.CommandText = @"INSERT INTO
book(address1, address2, alternativePhone,
birth, birth_d, birth_m, birth_y, city,
civil_status, country, email, father_name, fax,
first_name, function, homephone, mobilephone,
name, originalfirst_name, [post-office_box],
sex, web, workphone, Photo) VALUES (?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?, ?, ?)";
DbCommand4.Connection = DbConnection1;
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address1"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address2"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30, "alternativePhone"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth",
System.Data.OleDb.OleDbType.DBDate, 0,
"birth"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_d"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_m"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4, "birth_y"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("city",
System.Data.OleDb.OleDbType.VarWChar, 25,
"city"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50, "civil_status"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("country",
System.Data.OleDb.OleDbType.VarWChar, 25,
"country"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("email",
System.Data.OleDb.OleDbType.VarWChar, 50,
"email"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("father_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "father_name"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
"fax"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("first_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "first_name"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("function",
System.Data.OleDb.OleDbType.VarWChar, 150,
"function"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("homephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "homephone"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "mobilephone"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("name",
System.Data.OleDb.OleDbType.VarWChar, 50,
"name"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "originalfirst_name"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25, "post-office_box"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
"sex"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("web",
System.Data.OleDb.OleDbType.VarWChar, 50,
"web"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("workphone",
System.Data.OleDb.OleDbType.VarWChar, 30, "workphone"));
DbCommand4.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
"Photo"));
// oleDbCommand1
//
DbCommand1.CommandText = "UPDATE book SET
address1 = ?, address2 = ?, alternativePhone =
?, birth = ?, birt" +
"h_d = ?, birth_m = ?, birth_y = ?, city = ?,
civil_status = ?, country = ?, emai" +
"l = ?, father_name = ?, fax = ?, first_name =
?, function = ?, homephone = ?, mo" +
"bilephone = ?, name = ?, originalfirst_name =
?, Photo = ?, [post-office_box] = " +
"?, sex = ?, web = ?, workphone = ? WHERE (bookid
= ?) AND (Photo = ? OR ? IS NUL" +
"L AND Photo IS NULL) AND (address1 = ? OR ? IS
NULL AND address1 IS NULL) AND (a" +
"ddress2 = ? OR ? IS NULL AND address2 IS NULL)
AND (alternativePhone = ? OR ? IS" +
" NULL AND alternativePhone IS NULL) AND (birth
= ? OR ? IS NULL AND birth IS NUL" +
"L) AND (birth_d = ? OR ? IS NULL AND birth_d IS
NULL) AND (birth_m = ? OR ? IS N" +
"ULL AND birth_m IS NULL) AND (birth_y = ? OR ?
IS NULL AND birth_y IS NULL) AND " +
"(city = ? OR ? IS NULL AND city IS NULL) AND (civil_status
= ? OR ? IS NULL AND " +
"civil_status IS NULL) AND (country = ? OR ? IS
NULL AND country IS NULL) AND (em" +
"ail = ? OR ? IS NULL AND email IS NULL) AND (father_name
= ? OR ? IS NULL AND fa" +
"ther_name IS NULL) AND (fax = ? OR ? IS NULL
AND fax IS NULL) AND (first_name = " +
"? OR ? IS NULL AND first_name IS NULL) AND
(function = ? OR ? IS NULL AND functi" +
"on IS NULL) AND (homephone = ? OR ? IS NULL AND
homephone IS NULL) AND (mobileph" +
"one = ? OR ? IS NULL AND mobilephone IS NULL)
AND (name = ? OR ? IS NULL AND nam" +
"e IS NULL) AND (originalfirst_name = ? OR ? IS
NULL AND originalfirst_name IS NU" +
"LL) AND ([post-office_box] = ? OR ? IS NULL AND
[post-office_box] IS NULL) AND (" +
"sex = ? OR ? IS NULL AND sex IS NULL) AND (web
= ? OR ? IS NULL AND web IS NULL)" +
" AND (workphone = ? OR ? IS NULL AND workphone
IS NULL)";
DbCommand1.Connection = DbConnection1;
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address1"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address2"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30, "alternativePhone"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth",
System.Data.OleDb.OleDbType.DBDate, 0,
"birth"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_d"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_m"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4, "birth_y"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("city",
System.Data.OleDb.OleDbType.VarWChar, 25,
"city"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50, "civil_status"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("country",
System.Data.OleDb.OleDbType.VarWChar, 25,
"country"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("email",
System.Data.OleDb.OleDbType.VarWChar, 50,
"email"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("father_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "father_name"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
"fax"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("first_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "first_name"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("function",
System.Data.OleDb.OleDbType.VarWChar, 150,
"function"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("homephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "homephone"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "mobilephone"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("name",
System.Data.OleDb.OleDbType.VarWChar, 50,
"name"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "originalfirst_name"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
"Photo"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25, "post-office_box"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
"sex"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("web",
System.Data.OleDb.OleDbType.VarWChar, 50,
"web"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("workphone",
System.Data.OleDb.OleDbType.VarWChar, 30, "workphone"));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_bookid",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "bookid",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address11",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address21",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y1",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
DbCommand1.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
//
// oleDbCommand3
//
DbCommand3.CommandText = @"INSERT INTO
book(address1, address2, alternativePhone,
birth, birth_d, birth_m, birth_y, city,
civil_status, country, email, father_name, fax,
first_name, function, homephone, mobilephone,
name, originalfirst_name, Photo, [post-office_box],
sex, web, workphone) VALUES (?, ?, ?, ?, ?, ?,
?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?,
?, ?)";
DbCommand3.Connection = DbConnection1;
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address1"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address2"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30, "alternativePhone"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth",
System.Data.OleDb.OleDbType.DBDate, 0,
"birth"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_d"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_m"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4, "birth_y"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("city",
System.Data.OleDb.OleDbType.VarWChar, 25,
"city"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50, "civil_status"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("country",
System.Data.OleDb.OleDbType.VarWChar, 25,
"country"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("email",
System.Data.OleDb.OleDbType.VarWChar, 50,
"email"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("father_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "father_name"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
"fax"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("first_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "first_name"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("function",
System.Data.OleDb.OleDbType.VarWChar, 150,
"function"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("homephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "homephone"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "mobilephone"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("name",
System.Data.OleDb.OleDbType.VarWChar, 50,
"name"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "originalfirst_name"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
"Photo"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25, "post-office_box"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
"sex"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("web",
System.Data.OleDb.OleDbType.VarWChar, 50,
"web"));
DbCommand3.Parameters.Add(new
System.Data.OleDb.OleDbParameter("workphone",
System.Data.OleDb.OleDbType.VarWChar, 30, "workphone"));
//
// oleDbCommand5
//
DbCommand5.CommandText = @"DELETE FROM book
WHERE (bookid = ?) AND (Photo = ? OR ? IS NULL
AND Photo IS NULL) AND (address1 = ? OR ? IS
NULL AND address1 IS NULL) AND (address2 = ? OR
? IS NULL AND address2 IS NULL) AND (alternativePhone
= ? OR ? IS NULL AND alternativePhone IS NULL)
AND (birth = ? OR ? IS NULL AND birth IS NULL)
AND (birth_d = ? OR ? IS NULL AND birth_d IS
NULL) AND (birth_m = ? OR ? IS NULL AND birth_m
IS NULL) AND (birth_y = ? OR ? IS NULL AND
birth_y IS NULL) AND (city = ? OR ? IS NULL AND
city IS NULL) AND (civil_status = ? OR ? IS NULL
AND civil_status IS NULL) AND (country = ? OR ?
IS NULL AND country IS NULL) AND (email = ? OR ?
IS NULL AND email IS NULL) AND (father_name = ?
OR ? IS NULL AND father_name IS NULL) AND (fax =
? OR ? IS NULL AND fax IS NULL) AND (first_name
= ? OR ? IS NULL AND first_name IS NULL) AND
(function = ? OR ? IS NULL AND function IS NULL)
AND (homephone = ? OR ? IS NULL AND homephone IS
NULL) AND (mobilephone = ? OR ? IS NULL AND
mobilephone IS NULL) AND (name = ? OR ? IS NULL
AND name IS NULL) AND (originalfirst_name = ? OR
? IS NULL AND originalfirst_name IS NULL) AND
([post-office_box] = ? OR ? IS NULL AND [post-office_box]
IS NULL) AND (sex = ? OR ? IS NULL AND sex IS
NULL) AND (web = ? OR ? IS NULL AND web IS NULL)
AND (workphone = ? OR ? IS NULL AND workphone IS
NULL)";
DbCommand5.Connection = DbConnection1;
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_bookid",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "bookid",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address11",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address21",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y1",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
DbCommand5.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
// oleDbCommand7
//
DbCommand7.CommandText = "UPDATE book SET
address1 = ?, address2 = ?, alternativePhone =
?, birth = ?, birt" +
"h_d = ?, birth_m = ?, birth_y = ?, city = ?,
civil_status = ?, country = ?, emai" +
"l = ?, father_name = ?, fax = ?, first_name =
?, function = ?, homephone = ?, mo" +
"bilephone = ?, name = ?, originalfirst_name =
?, [post-office_box] = ?, sex = ?," +
" web = ?, workphone = ?, Photo = ? WHERE (bookid
= ?) AND (Photo = ? OR ? IS NUL" +
"L AND Photo IS NULL) AND (address1 = ? OR ? IS
NULL AND address1 IS NULL) AND (a" +
"ddress2 = ? OR ? IS NULL AND address2 IS NULL)
AND (alternativePhone = ? OR ? IS" +
" NULL AND alternativePhone IS NULL) AND (birth
= ? OR ? IS NULL AND birth IS NUL" +
"L) AND (birth_d = ? OR ? IS NULL AND birth_d IS
NULL) AND (birth_m = ? OR ? IS N" +
"ULL AND birth_m IS NULL) AND (birth_y = ? OR ?
IS NULL AND birth_y IS NULL) AND " +
"(city = ? OR ? IS NULL AND city IS NULL) AND (civil_status
= ? OR ? IS NULL AND " +
"civil_status IS NULL) AND (country = ? OR ? IS
NULL AND country IS NULL) AND (em" +
"ail = ? OR ? IS NULL AND email IS NULL) AND (father_name
= ? OR ? IS NULL AND fa" +
"ther_name IS NULL) AND (fax = ? OR ? IS NULL
AND fax IS NULL) AND (first_name = " +
"? OR ? IS NULL AND first_name IS NULL) AND
(function = ? OR ? IS NULL AND functi" +
"on IS NULL) AND (homephone = ? OR ? IS NULL AND
homephone IS NULL) AND (mobileph" +
"one = ? OR ? IS NULL AND mobilephone IS NULL)
AND (name = ? OR ? IS NULL AND nam" +
"e IS NULL) AND (originalfirst_name = ? OR ? IS
NULL AND originalfirst_name IS NU" +
"LL) AND ([post-office_box] = ? OR ? IS NULL AND
[post-office_box] IS NULL) AND (" +
"sex = ? OR ? IS NULL AND sex IS NULL) AND (web
= ? OR ? IS NULL AND web IS NULL)" +
" AND (workphone = ? OR ? IS NULL AND workphone
IS NULL)";
DbCommand7.Connection = DbConnection1;
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address1"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
"address2"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30, "alternativePhone"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth",
System.Data.OleDb.OleDbType.DBDate, 0,
"birth"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_d"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2, "birth_m"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4, "birth_y"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("city",
System.Data.OleDb.OleDbType.VarWChar, 25,
"city"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50, "civil_status"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("country",
System.Data.OleDb.OleDbType.VarWChar, 25,
"country"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("email",
System.Data.OleDb.OleDbType.VarWChar, 50,
"email"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("father_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "father_name"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
"fax"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("first_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "first_name"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("function",
System.Data.OleDb.OleDbType.VarWChar, 150,
"function"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("homephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "homephone"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30, "mobilephone"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("name",
System.Data.OleDb.OleDbType.VarWChar, 50,
"name"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50, "originalfirst_name"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25, "post-office_box"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
"sex"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("web",
System.Data.OleDb.OleDbType.VarWChar, 50,
"web"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("workphone",
System.Data.OleDb.OleDbType.VarWChar, 30, "workphone"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
"Photo"));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_bookid",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "bookid",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address11",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address21",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y1",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
DbCommand7.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
// oleDbCommand8
//
DbCommand8.CommandText = @"DELETE FROM book
WHERE (bookid = ?) AND (Photo = ? OR ? IS NULL
AND Photo IS NULL) AND (address1 = ? OR ? IS
NULL AND address1 IS NULL) AND (address2 = ? OR
? IS NULL AND address2 IS NULL) AND (alternativePhone
= ? OR ? IS NULL AND alternativePhone IS NULL)
AND (birth = ? OR ? IS NULL AND birth IS NULL)
AND (birth_d = ? OR ? IS NULL AND birth_d IS
NULL) AND (birth_m = ? OR ? IS NULL AND birth_m
IS NULL) AND (birth_y = ? OR ? IS NULL AND
birth_y IS NULL) AND (city = ? OR ? IS NULL AND
city IS NULL) AND (civil_status = ? OR ? IS NULL
AND civil_status IS NULL) AND (country = ? OR ?
IS NULL AND country IS NULL) AND (email = ? OR ?
IS NULL AND email IS NULL) AND (father_name = ?
OR ? IS NULL AND father_name IS NULL) AND (fax =
? OR ? IS NULL AND fax IS NULL) AND (first_name
= ? OR ? IS NULL AND first_name IS NULL) AND
(function = ? OR ? IS NULL AND function IS NULL)
AND (homephone = ? OR ? IS NULL AND homephone IS
NULL) AND (mobilephone = ? OR ? IS NULL AND
mobilephone IS NULL) AND (name = ? OR ? IS NULL
AND name IS NULL) AND (originalfirst_name = ? OR
? IS NULL AND originalfirst_name IS NULL) AND
([post-office_box] = ? OR ? IS NULL AND [post-office_box]
IS NULL) AND (sex = ? OR ? IS NULL AND sex IS
NULL) AND (web = ? OR ? IS NULL AND web IS NULL)
AND (workphone = ? OR ? IS NULL AND workphone IS
NULL)";
DbCommand8.Connection = DbConnection1;
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_bookid",
System.Data.OleDb.OleDbType.Integer, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "bookid",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_Photo1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "Photo",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address1",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address11",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address1",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address2",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_address21",
System.Data.OleDb.OleDbType.VarWChar, 255,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "address2",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_alternativePhone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "alternativePhone",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth1",
System.Data.OleDb.OleDbType.DBDate, 0,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_d1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_d",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_m1",
System.Data.OleDb.OleDbType.VarWChar, 2,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_m",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_birth_y1",
System.Data.OleDb.OleDbType.VarWChar, 4,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "birth_y",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_city1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "city",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_civil_status1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "civil_status",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_country1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "country",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_email1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "email",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_father_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "father_name",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_fax1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "fax",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_first_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "first_name",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_function1",
System.Data.OleDb.OleDbType.VarWChar, 150,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "function",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_homephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "homephone",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_mobilephone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "mobilephone",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "name",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_originalfirst_name1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "originalfirst_name",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_post_office_box1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "post-office_box",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_sex1",
System.Data.OleDb.OleDbType.VarWChar, 25,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "sex",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_web1",
System.Data.OleDb.OleDbType.VarWChar, 50,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "web",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
DbCommand8.Parameters.Add(new
System.Data.OleDb.OleDbParameter("Original_workphone1",
System.Data.OleDb.OleDbType.VarWChar, 30,
System.Data.ParameterDirection.Input, false, ((System.Byte)(0)),
((System.Byte)(0)), "workphone",
System.Data.DataRowVersion.Original, null));
}
//load book table, Book_DSet1 dataset
public void LoadDataSet()
{
try
{
// Attempt to load the dataset.
this.LoadDataSet1();
}
catch (System.Exception eLoad)
{
// Add your error
System.Windows.Forms.MessageBox.Show(eLoad.Message);
}
}
public void LoadDataSet1()
{
// Create a new dataset to hold the records
returned from the call to FillDataSet.
// A temporary dataset is used because filling
the existing dataset would
// require the databindings to be rebound.
BookNC.Book_DSet objDataSetTemp;
objDataSetTemp = new BookNC.Book_DSet();
try
{
// Attempt to fill the temporary dataset.
this.FillDataSet(objDataSetTemp);
}
catch (System.Exception eFillDataSet)
{
// Add your error handling code here.
throw eFillDataSet;
}
try
{
// Empty the old records from the dataset.
Book_DSet1.Clear();
// Merge the records into the main dataset.
Book_DSet1.Merge(objDataSetTemp);
}
catch (System.Exception eLoadMerge)
{
// Add your error handling code here.
throw eLoadMerge;
}
}
public void FillDataSet(BookNC.Book_DSet dataSet)
{
// Turn off constraint checking before the
dataset is filled.
// This allows the adapters to fill the dataset
without concern
// for dependencies between the tables.
dataSet.EnforceConstraints = false;
try
{
// Open the connection.
DbConnection1.Open();
// Attempt to fill the dataset through the
DbDadapter1.
DbDdapter1.Fill(dataSet, "book");
}
catch (System.Exception fillException)
{
// Add your error handling code here.
throw fillException;
}
finally
{
// Turn constraint checking back on.
dataSet.EnforceConstraints = true;
// Close the connection whether or not the
exception was thrown.
DbConnection1.Close();
}
}
//add data to comboboxes
private void sub_load(string v_field)
{
int i;
switch (v_field)
{
case "name":
vselect1 = new
System.Data.OleDb.OleDbCommand("SELECT DISTINCT
Trim(name) AS vname FROM book WHERE (Trim(name)
<> '') ORDER BY Trim(name)");
break;
case "first":
vselect1 = new
System.Data.OleDb.OleDbCommand("SELECT DISTINCT
Trim(first_name) AS vfirst FROM book WHERE (Trim(first_name)
<>'')ORDER BY Trim(first_name)");
break;
case "father":
vselect1 = new
System.Data.OleDb.OleDbCommand("SELECT DISTINCT
Trim(father_name) AS vfather FROM book WHERE (Trim(father_name)
<>'')ORDER BY Trim(father_name)");
break;
case "city":
vselect1 = new
System.Data.OleDb.OleDbCommand("SELECT DISTINCT
Trim(city) AS vcity FROM book WHERE (Trim(city)<>'')ORDER
BY Trim(city)");
break;
case "civil_status":
vselect1 = new
System.Data.OleDb.OleDbCommand("SELECT DISTINCT
Trim(civil_status) AS vcivil FROM book WHERE (Trim(civil_status)
<>'')ORDER BY Trim(civil_status)");
break;
}
vda1 = new
System.Data.OleDb.OleDbDataAdapter(vselect1);
vdset1 = new System.Data.DataSet();
vselect1.Connection = DbConnection1;
vdset1.EnforceConstraints = false;
try
{
DbConnection1.Open();
vda1.Fill(vdset1, "book");
}
catch (System.Exception fillException)
{
System.Windows.Forms.MessageBox.Show(fillException.Message);
}
vdset1.EnforceConstraints = true;
DbConnection1.Close();
if (vdset1.Tables["book"].Rows.Count > 0)
{
for (i = 0; i <= (vdset1.Tables["book"].Rows.Count
- 1); i++)
{
switch (v_field)
{
case "name":
this.cmbname.Items.Add(vdset1.Tables["book"].Rows[i]["vname"].ToString().Trim());
break;
case "first":
this.cmbfirst_name.Items.Add(vdset1.Tables["book"].Rows[i]["vfirst"].ToString().Trim());
break;
case "father":
this.cmbfather_name.Items.Add(vdset1.Tables["book"].Rows[i]["vfather"].ToString().Trim());
break;
case "city":
this.cmbcity.Items.Add(vdset1.Tables["book"].Rows[i]["vcity"].ToString().Trim());
break;
case "civil_status":
this.cmbcivil_status.Items.Add(vdset1.Tables["book"].Rows[i]["vcivil"].ToString().Trim());
break;
}
}
}
}
private void BookForm_FormClosed(object sender,
FormClosedEventArgs e)
{
if ((Mbaddflag == true) || (Mbeditflag == true))
{
this.close_response();
}
//else
//{
// this.Close();
//}
}
private void close_response()
{
System.Windows.Forms.DialogResult response;
string msg_inf;
msg_inf = "are you sure want to lose all
changes, Book ...";
response = MessageBox.Show(msg_inf,
BookNC.MainForm.MainForm_cl.Title,
MessageBoxButtons.YesNo,
MessageBoxIcon.Information);
//Gets the result of the MessageBox display.
if (response == DialogResult.Yes)
{
Mbaddflag = false;
Mbeditflag = false;
this.Close();
}
}
//Add or New Fuunction
private void Newbtn_Click(object sender,
EventArgs e)
{
this.sub_add();
}
//modify or edit Fuunction
private void Modbtn_Click(object sender,
EventArgs e)
{
this.Sub_modify();
}
//Save or update Fuunction
private void Sbtn_Click(object sender, EventArgs
e)
{
this.sub_Update();
}
//Cancel Fuunction
private void Cbtn_Click(object sender, EventArgs
e)
{
this.Sub_Cancel();
}
//Search Fuunction
private void Searbtn_Click(object sender,
EventArgs e)
{
//search
this.sub_find();
}
//Add or New Fuunction
private void Prbtn_Click(object sender,
EventArgs e)
{
//print
this.sub_print();
}
//Close BookForm
private void button8_Click(object sender,
EventArgs e)
{
if ((Mbaddflag == true) || (Mbeditflag == true))
this.close_response();
else
this.Close();
}
//navigation operation ...
*****************************
private void Fbtn_Click(object sender, EventArgs
e)
{
this.NavFirst();
}
private void NavFirst()
{
this.BindingContext[Book_DSet1, "book"].Position
= 0;
this.Book_DSet1_PositionChanged();
}
private void Book_DSet1_PositionChanged()
{
//this.editbirth.Text =
System.Convert.ToString(this.DateTime_birth.Value.Month)
+ "/" +
System.Convert.ToString(this.DateTime_birth.Value.Day)
+ "/" +
System.Convert.ToString(this.DateTime_birth.Value.Year);
this.editbirth.Visible = true;
this.lblNavLocation.Text =
((((this.BindingContext[Book_DSet1, "book"].Position
+ 1)).ToString() + " of ")
+ this.BindingContext[Book_DSet1, "book"].Count.ToString());
switch (Mbaddflag || Mbeditflag)
{
case false:
visible_control(false);
// Navigation controls enabled
if ((this.BindingContext[Book_DSet1, "book"].Position
+ 1) == 1)
{
NavigationFP(false);
NavigationNL(true);
goto PP1;
}
if ((this.BindingContext[Book_DSet1, "book"].Position
+ 1) == (this.BindingContext[Book_DSet1, "book"].Count))
{
NavigationFP(true);
NavigationNL(false);
goto PP1;
}
else
{
NavigationFP(true);
NavigationNL(true);
}
PP1:
if (this.Newbtn.Enabled == false)
Enabled_AMS(true);
if (this.Searbtn.Enabled == false)
Enabled_CFP(true);
break;
case true:
if (Mbaddflag == true)
lboperation.Text = "add operation";
if (Mbeditflag == true)
this.lboperation.Text = "mudify operation";
visible_control(true);
NavigationFP(false);
NavigationNL(false);
Enabled_AMS(false);
Enabled_CFP(false);
//if (this.Sbtn.Enabled == false)
// this.Sbtn.Enabled = true;
//if (this.Cbtn.Enabled == false)
// this.Cbtn.Enabled = true;
break;
}
//show photo
sub_showphoto();
this.lblNavLocation.Focus();
}
private void visible_control(bool bval)
{
this.cmbname.Visible = bval;
this.cmbfirst_name.Visible = bval;
this.cmbfather_name.Visible = bval;
this.DateTime_birth.Visible = bval;
this.cmbsex.Visible = bval;
this.cmbcivil_status.Visible = bval;
this.cmbcountry.Visible = bval;
this.cmbcity.Visible = bval;
this.editname.Visible = !bval;
this.editfirst_name.Visible = !bval;
this.editfather_name.Visible = !bval;
this.editbirth.Visible = !bval;
this.editcivil_status.Visible = !bval;
this.editsex.Visible = !bval;
this.editcountry.Visible = !bval;
this.editcity.Visible = !bval;
this.editname.Left = this.cmbname.Left;
this.editname.Width = this.cmbname.Width;
this.editname.Top = this.cmbname.Top;
this.editfirst_name.Left =
this.cmbfirst_name.Left;
this.editfirst_name.Width =
this.cmbfirst_name.Width;
this.editfirst_name.Top = this.cmbfirst_name.Top;
this.editfather_name.Left =
this.cmbfather_name.Left;
this.editfather_name.Width =
this.cmbfather_name.Width;
this.editfather_name.Top =
this.cmbfather_name.Top;
this.editbirth.Left = this.DateTime_birth.Left;
this.editbirth.Width = this.DateTime_birth.Width;
this.editbirth.Top = this.DateTime_birth.Top;
this.editsex.Left = this.cmbsex.Left;
this.editsex.Width = this.cmbsex.Width;
this.editsex.Top = this.cmbsex.Top;
this.editcivil_status.Left =
this.cmbcivil_status.Left;
this.editcivil_status.Width =
this.cmbcivil_status.Width;
this.editcivil_status.Top =
this.cmbcivil_status.Top;
this.editcountry.Left = this.cmbcountry.Left;
this.editcountry.Width = this.cmbcountry.Width;
this.editcountry.Top = this.cmbcountry.Top;
this.editcity.Left = this.cmbcity.Left;
this.editcity.Width = this.cmbcity.Width;
this.editcity.Top = this.cmbcity.Top;
}
private void NavigationFP(bool bval)
{
this.Fbtn.Enabled = bval;
this.Pbtn.Enabled = bval;
}
private void NavigationNL(bool bval)
{
this.Nbtn.Enabled = bval;
this.Lbtn.Enabled = bval;
}
private void Enabled_CFP(bool bval)
{
//this.Cbtn.Enabled = bval;
this.Searbtn.Enabled = bval;
this.Prbtn.Enabled = bval;
}
private void Enabled_AMS(bool bval)
{
this.Newbtn.Enabled = bval;
this.Modbtn.Enabled = bval;
this.Sbtn.Enabled = !bval;
this.Cbtn.Enabled = !bval;
this.lblNavLocation.Enabled = bval;
}
//show photo
private void sub_showphoto()
{
if (Mbaddflag == false)
{
if (this.editphoto_photo.Text.Trim() != "")
{
if (System.IO.File.Exists(this.editphoto_photo.Text.Trim())
== true)
{
this.Panel_photo.BorderStyle = BorderStyle.None;
this.Pic_photo.Image =
Image.FromFile(this.editphoto_photo.Text.Trim());
this.Pic_photo.Left = (this.Panel_photo.Width -
this.Pic_photo.Width) / 2;
this.Pic_photo.Top = (this.Panel_photo.Height -
this.Pic_photo.Height) / 2;
this.Plbtn.Enabled = false;
this.Plbtn.Enabled = false;
if (Mbeditflag == true)
{
this.Plbtn.Enabled = true;
this.Plbtn.Enabled = true;
}
}
else
{
//goto PP2;
this.Pic_photo.Image = null; //nothing();
this.Panel_photo.BorderStyle =
BorderStyle.FixedSingle;
if (Mbeditflag == true)
{
this.Plbtn.Enabled = true;
}
else
{
this.Plbtn.Enabled = false;
}
this.Plbtn.Enabled = false;
return;
}
}
else
{
//PP2:
this.Pic_photo.Image = null; //nothing();
this.Panel_photo.BorderStyle =
BorderStyle.FixedSingle;
if (Mbeditflag == true)
{
this.Plbtn.Enabled = true;
}
else
{
this.Plbtn.Enabled = false;
}
this.Plbtn.Enabled = false;
return;
}
}
}
private void Pbtn_Click(object sender, EventArgs
e)
{
this.BindingContext[Book_DSet1, "book"].Position
= (this.BindingContext[Book_DSet1, "book"].Position
- 1);
this.Book_DSet1_PositionChanged();
}
private void Nbtn_Click(object sender, EventArgs
e)
{
this.BindingContext[Book_DSet1, "book"].Position
= (this.BindingContext[Book_DSet1, "book"].Position
+ 1);
this.Book_DSet1_PositionChanged();
}
private void Lbtn_Click(object sender, EventArgs
e)
{
this.BindingContext[Book_DSet1, "book"].Position
= (this.Book_DSet1.Tables["book"].Rows.Count -
1);
this.Book_DSet1_PositionChanged();
}
//BookForm Add event ...
*****************************
private void sub_add()
{
this.cmbname.SelectedIndex = -1;
this.cmbfirst_name.SelectedIndex = -1;
this.cmbfather_name.SelectedIndex = -1;
this.cmbsex.SelectedIndex = -1;
this.cmbcivil_status.SelectedIndex = -1;
this.cmbcountry.SelectedIndex = -1;
this.cmbcity.SelectedIndex = -1;
try
{
// Clear out the current edits
this.BindingContext[Book_DSet1, "book"].EndCurrentEdit();
this.BindingContext[Book_DSet1, "book"].AddNew();
Mbaddflag = true;
}
catch (System.Exception eEndEdit)
{
System.Windows.Forms.MessageBox.Show(eEndEdit.Message);
}
//show photo ...
this.Plbtn.Enabled = false;
this.Plbtn.Enabled = true;
this.Book_DSet1_PositionChanged();
}
//show photo, add or remove/delete photo
'''''''''''''''''''''
private void Plbtn_Click(object sender,
EventArgs e)
{
if ((Mbaddflag == true) || (Mbeditflag == true))
{
//OpenFileDialog control, displays the Photo
corresponding and save it ...
sub_addphoto();
}
}
//OpenFileDialog control, displays the Photo
corresponding and save it ...
private void sub_addphoto()
{
string vfilename;
this.OpenFileDialog1.Title = "Book, Select
Picture";
this.OpenFileDialog1.Filter = "All Files|*.*|JPeg
Image|*.jpg|Bitmap Image|*.bmp|Gif Image|*.gif";
this.OpenFileDialog1.FilterIndex = 3;
// Show the Dialog, if the user clicked in the
dialog and a picture file was selected, open it.
if (OpenFileDialog1.ShowDialog() ==
DialogResult.OK)
{
//add record to table per_appphoto
vfilename = OpenFileDialog1.FileName;
this.Panel_photo.BorderStyle = BorderStyle.None;
this.Pic_photo.Image =
Image.FromFile(OpenFileDialog1.FileName);
this.Pic_photo.Left = (this.Panel_photo.Width -
this.Pic_photo.Width) / 2;
this.Pic_photo.Top = (this.Panel_photo.Height -
this.Pic_photo.Height) / 2;
this.editphoto_photo.Text = vfilename;
this.Plbtn.Enabled = true;
}
}
private void Xbtn_Click(object sender, EventArgs
e)
{
if ((Mbaddflag == true) || (Mbeditflag == true))
{
//remove/delete photo and clear the file photo
name corresponding
sub_removephoto();
}
}
// remove/delete photo and clear the file photo
name corresponding
private void sub_removephoto()
{
System.Windows.Forms.DialogResult response;
string msg_inf;
msg_inf = "are you sure want to remove the photo
of - " + this.editfirst_name.Text + " " +
this.editname.Text;
response = MessageBox.Show(msg_inf, "BookNC.MainForm.Title",
MessageBoxButtons.YesNo,
MessageBoxIcon.Information);
//Gets the result of the MessageBox display.
if (response == DialogResult.Yes)
{
//clear photo ...
Panel_photo.BorderStyle =
BorderStyle.FixedSingle;
Pic_photo.Image.Dispose();
Pic_photo.Image = null; //nothing;
editphoto_photo.Text = "";
Plbtn.Enabled = false;
return;
}
if (response == DialogResult.No)
{
return;
}
}
//BookForm Activated event ...
*****************************
//BookForm Activated event (responses from
Book_search form)
private void BookForm_Deactivate(object sender,
EventArgs e)
{
switch (BookNC.Book_search.BookSearch_cl.findedit_Flag)
{
case "ok":
switch (BookF_cl.booknote_type)
{
case "find":
sub_findok();
break;
case "edit":
Sub_modifyok();
break;
}
break;
case "cancel":
Searchedit_cancel();
break;
}
}
private void Searchedit_cancel()
{
Mbeditflag = false;
Book_DSet1_PositionChanged();
}
//BookForm modify/edit event ...
*****************************
private void Sub_modify()
{
Book_search fBook_search = new Book_search();
BookF_cl.booknote_type = "edit";
Mbeditflag = true;
sub_Searchedit();
fBook_search.Show();
}
private void sub_Searchedit()
{
NavigationFP(false);
NavigationNL(false);
Enabled_AMS(false);
Enabled_CFP(false);
this.Sbtn.Enabled = false;
this.Cbtn.Enabled = false;
}
private void Sub_modifyok()
{
this.BindingContext[Book_DSet1, "book"].Position
= BookNC.Book_search.BookSearch_cl.book_recno;
this.Book_DSet1_PositionChanged();
this.cmbname.Text = this.editname.Text;
this.cmbfirst_name.Text =
this.editfirst_name.Text;
this.cmbfather_name.Text =
this.editfather_name.Text;
//this.DateTime_birth.Text = this.editbirth.Text;
this.cmbsex.Text = this.editsex.Text;
this.cmbcivil_status.Text =
this.editcivil_status.Text;
this.cmbcountry.Text = this.editcountry.Text;
this.cmbcity.Text = this.editcity.Text;
}
private void Searchedit_cancel1()
{
Mbeditflag = false;
Book_DSet1_PositionChanged();
}
//BookForm update/save event ...
*****************************
private void sub_Update()
{
System.Windows.Forms.DialogResult response;
//convert, comboboxes to textboxes
this.editname.Text = this.cmbname.Text;
this.editfirst_name.Text =
this.cmbfirst_name.Text;
this.editfather_name.Text =
this.cmbfather_name.Text;
// this.editbirth.Text =
this.DateTime_birth.Text;
this.editbirth.Text =
System.Convert.ToString(this.DateTime_birth.Value.Date);
this.editsex.Text = this.cmbsex.Text;
this.editcivil_status.Text =
this.cmbcivil_status.Text;
this.editcountry.Text = this.cmbcountry.Text;
this.editcity.Text = this.cmbcity.Text;
this.editoriginalfirst_name.Text =
this.cmbfirst_name.Text;
this.editbirth_d.Text =
System.Convert.ToString(this.DateTime_birth.Value.Day);
this.editbirth_m.Text =
System.Convert.ToString(this.DateTime_birth.Value.Month);
this.editbirth_y.Text =
System.Convert.ToString(this.DateTime_birth.Value.Year);
if (Mbeditflag || Mbaddflag)
{
if ((this.editname.Text == "") || (this.editfirst_name.Text
== "") || (this.editfather_name.Text == ""))
{
response = MessageBox.Show("save operation
aborted - name box, first name box or father
name box empty(ies) ...",
BookNC.MainForm.MainForm_cl.Title,
MessageBoxButtons.YesNo,
MessageBoxIcon.Information);
if (response == DialogResult.Yes)
return;
if (response == DialogResult.No)
Sub_Cancel();
}
else
{
sub_updateok(this.editname.Text.Trim(),
this.editfirst_name.Text.Trim(),
this.editfather_name.Text.Trim());
try
{
// Attempt to update the datasource.
this.UpdateDataSet();
}
catch (System.Exception eUpdate)
{
// Display error message
System.Windows.Forms.MessageBox.Show(eUpdate.Message);
}
Mbeditflag = false;
Mbaddflag = false;
this.Book_DSet1_PositionChanged();
}
}
}
//add data to comboboxes
private void sub_updateok(string v_name, string
v_first, string v_father)
{
int v_ord;
vselect1 = new
System.Data.OleDb.OleDbCommand("SELECT bookid,
name, first_name, originalfirst_name,
father_name FROM book WHERE ((name = '" + v_name
+ "') And (originalfirst_name = '" + v_first +
"') And (father_name = '" + v_father + "'))
ORDER BY bookid");
vda1 = new
System.Data.OleDb.OleDbDataAdapter(vselect1);
vdset1 = new System.Data.DataSet();
vselect1.Connection = DbConnection1;
vdset1.EnforceConstraints = false;
try
{
DbConnection1.Open();
vda1.Fill(vdset1, "book");
}
catch (System.Exception fillException)
{
System.Windows.Forms.MessageBox.Show(fillException.Message);
}
vdset1.EnforceConstraints = true;
DbConnection1.Close();
if (vdset1.Tables["book"].Rows.Count > 0)
{
v_ord = (vdset1.Tables["book"].Rows.Count - 1);
this.editfirst_name.Text =
this.editoriginalfirst_name.Text.Trim() +
System.Convert.ToString(v_ord).Trim();
}
}
public void UpdateDataSet()
{
// Create a new dataset to hold the changes that
have been made to the main dataset.
BookNC.Book_DSet objDataSetChanges = new
BookNC.Book_DSet();
// Stop any current edits.
this.BindingContext[Book_DSet1, "book"].EndCurrentEdit();
// Get the changes that have been made to the
main dataset.
objDataSetChanges = ((BookNC.Book_DSet)(Book_DSet1.GetChanges()));
// Check to see if any changes have been made.
if ((objDataSetChanges != null))
{
try
{
// There are changes that need to be made, so
attempt to update the datasource by
// calling the update method and passing the
dataset and any parameters.
this.UpdateDataSource(objDataSetChanges);
Book_DSet1.Merge(objDataSetChanges);
Book_DSet1.AcceptChanges();
}
catch (System.Exception eUpdate)
{
// Add your error handling code here.
throw eUpdate;
}
// Add your code to check the returned dataset
for any errors that may have been
// pushed into the row object's error.
}
}
public void UpdateDataSource(BookNC.Book_DSet
ChangedRows)
{
try
{
// The data source only needs to be updated if
there are changes pending.
if ((ChangedRows != null))
{
// Open the connection.
DbConnection1.Open();
// Attempt to update the data source.
DbDdapter1.Update(ChangedRows);
}
}
catch (System.Exception updateException)
{
// Add your error handling code here.
throw updateException;
}
finally
{
// Close the connection whether or not the
exception was thrown.
DbConnection1.Close();
}
}
//BookForm Cancel event ...
*****************************
private void Sub_Cancel()
{
Mbeditflag = false;
Mbaddflag = false;
this.Book_DSet1.RejectChanges();
this.BindingContext[Book_DSet1, "book"].CancelCurrentEdit();
this.Book_DSet1_PositionChanged();
}
//BookForm find/search event ...
*****************************
private void sub_find()
{
Book_search fBook_search = new Book_search();
BookF_cl.booknote_type = "find";
sub_Searchedit();
fBook_search.Show();
}
private void sub_findok()
{
this.BindingContext[Book_DSet1, "book"].Position
= BookNC.Book_search.BookSearch_cl.book_recno;
this.Book_DSet1_PositionChanged();
}
private void sub_print()
{
}
}
} |
|
| | | |
|
| |
|
|
9- |
Book_search.cs,
3th
Form of BookNC
project/Application |
|
9.1 |
View
Designer |
|
 |
|
|
9.2 |
View
Codes |
|
|
 |
the
Code of Book_search
Form | |
the Code of Book_search.cs
Form of
BookNC Database Application
developed with
Microsoft Visual
Studio Community 2019, C# - Face
Game |
|
|
|
using System;
using
System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace BookNC
{
public partial class
Book_search : Form
{
//variable
//connection
System.Data.OleDb.OleDbConnection
DbConnection1 = new
System.Data.OleDb.OleDbConnection();
//Select command
System.Data.OleDb.OleDbCommand
vselect;
//Dataadapter
System.Data.OleDb.OleDbDataAdapter
vda;
System.Data.DataSet vdset;
string vitem_grid;
bool searchflg;
bool s_flag;
// public variables
public class BookSearch_cl
{
public static int book_recno;
public static string
findedit_Flag;
}
public Book_search()
{
InitializeComponent();
}
private void
Book_search_Load(object
sender, EventArgs e)
{
int vleft;
int vtop;
BookForm FBookForm = new
BookForm();
this.DbConnection1.ConnectionString
=
@"Provider=""Microsoft.Jet.OLEDB.4.0"";Data
Source=""C:\Users\chk\source\repos\BookNC\data\Book_VC19.mdb"";Persist
Security Info=False;User ID=Admin;Mode=Share
Deny None;Jet OLEDB:Engine
Type=5;Jet OLEDB:Database
Locking Mode=1;Jet
OLEDB:Global Partial Bulk
Ops=2;Jet OLEDB:Global Bulk
Transactions=1;Jet
OLEDB:Create System Database=False;Jet
OLEDB:Encrypt Database=False;Jet
OLEDB:Don't Copy Locale on
Compact=False;Jet
OLEDB:Compact Without Replica
Repair=False;Jet OLEDB:SFP=False";
// Move
vleft =
BookNC.BookForm.BookF_cl.booknote_left
+
BookNC.BookForm.BookF_cl.booknote_width
- this.Width;
vtop =
BookNC.BookForm.BookF_cl.booknote_top;
this.Location = new
System.Drawing.Point(vleft,
vtop);
//resize
this.Btnsearch.Left =
(this.Panel113.Width -
this.Btnsearch.Width) / 2;
this.Btnok.Top =
(this.Panel114.Height -
this.Btnok.Height) / 2;
this.Btncancel.Top =
this.Btnok.Top;
this.Pic_line011.Top =
this.Btnok.Top + ((this.Btnok.Height
- (this.Pic_line011.Height *
3)) / 4);
this.Pic_line012.Top =
this.Pic_line011.Top +
this.Pic_line011.Height + ((this.Btnok.Height
- (this.Pic_line011.Height *
3)) / 4);
this.Pic_line013.Top =
this.Pic_line012.Top +
this.Pic_line012.Height + ((this.Btnok.Height
- (this.Pic_line011.Height *
3)) / 4);
this.Pic_line011.Left = (this.Btnok.Left
- this.Pic_line011.Width) /
2;
this.Pic_line012.Left =
this.Pic_line011.Left;
this.Pic_line013.Left =
this.Pic_line011.Left;
s_flag = false;
searchflg = false;
sub_clearall();
switch (BookNC.BookForm.BookF_cl.booknote_type)
{
case "find":
this.Text = "search, book
note ...";
break;
case "edit":
this.Text = "edit, book note
...";
break;
}
this.Chk_allbook.Checked =
true;
sub_load("name");
sub_load("first");
sub_load("father");
sub_load("city");
sub_search("", "", "", "",
"", "");
}
//add data to comboboxes
private void sub_load(string
v_field)
{
int i;
switch (v_field)
{
case "name":
vselect = new
System.Data.OleDb.OleDbCommand("SELECT
DISTINCT Trim(name) AS vname
FROM book WHERE (Trim(name)
<> '') ORDER BY Trim(name)");
break;
case "first":
vselect = new
System.Data.OleDb.OleDbCommand("SELECT
DISTINCT Trim(first_name) AS
vfirst FROM book WHERE (Trim(first_name)
<>'')ORDER BY Trim(first_name)");
break;
case "father":
vselect = new
System.Data.OleDb.OleDbCommand("SELECT
DISTINCT Trim(father_name) AS
vfather FROM book WHERE (Trim(father_name)
<>'')ORDER BY
Trim(father_name)");
break;
case "city":
vselect = new
System.Data.OleDb.OleDbCommand("SELECT
DISTINCT Trim(city) AS vcity
FROM book WHERE (Trim(city)<>'')ORDER
BY Trim(city)");
break;
}
vda = new
System.Data.OleDb.OleDbDataAdapter(vselect);
vdset = new
System.Data.DataSet();
vselect.Connection =
DbConnection1;
vdset.EnforceConstraints =
false;
try
{
DbConnection1.Open();
vda.Fill(vdset, "book");
}
catch (System.Exception
fillException)
{
System.Windows.Forms.MessageBox.Show(fillException.Message);
}
vdset.EnforceConstraints =
true;
DbConnection1.Close();
if (vdset.Tables["book"].Rows.Count
> 0)
{
for (i = 0; i <= (vdset.Tables["book"].Rows.Count
- 1); i++)
{
switch (v_field)
{
case "name":
this.Cmbname.Items.Add(vdset.Tables["book"].Rows[i]["vname"].ToString().Trim());
break;
case "first":
this.Cmbfirst.Items.Add(vdset.Tables["book"].Rows[i]["vfirst"].ToString().Trim());
break;
case "father":
this.Cmbfather.Items.Add(vdset.Tables["book"].Rows[i]["vfather"].ToString().Trim());
break;
case "city":
this.Cmbcity.Items.Add(vdset.Tables["book"].Rows[i]["vcity"].ToString().Trim());
break;
}
}
}
}
private void
Cmbname_SelectedIndexChanged(object
sender, EventArgs e)
{
if (s_flag == true)
sub_check();
}
private void sub_check()
{
if (this.Chk_allbook.Checked
== true)
this.Chk_allbook.Checked =
false;
if (this.Btnsearch.Enabled ==
false)
this.Btnsearch.Enabled =
true;
}
private void
Cmbfirst_SelectedIndexChanged(object
sender, EventArgs e)
{
if (s_flag == true)
sub_check();
}
private void
Cmbfather_SelectedIndexChanged(object
sender, EventArgs e)
{
if (s_flag == true)
sub_check();
}
private void
Cmbcountry_SelectedIndexChanged(object
sender, EventArgs e)
{
if (s_flag == true)
sub_check();
}
private void
Cmbcity_SelectedIndexChanged(object
sender, EventArgs e)
{
if (s_flag == true)
sub_check();
}
private void
Txtphone_KeyPress(object
sender,
System.Windows.Forms.KeyPressEventArgs
e)
{
if (s_flag == true)
sub_check();
}
private void
Chk_condition_CheckedChanged(object
sender, EventArgs e)
{
if (this.Chk_condition.Checked
== true)
this.lcondition.Text =
"condition - Or";
if (this.Chk_condition.Checked
== false)
this.lcondition.Text =
"condition - And";
}
private void
Chk_allbook_CheckedChanged(object
sender, EventArgs e)
{
if ((s_flag == true) && (this.Chk_allbook.Checked
== true))
{
if (this.Btnsearch.Enabled ==
false)
this.Btnsearch.Enabled =
true;
}
}
private void
Btnclear_Click(object sender,
EventArgs e)
{
sub_clearall();
}
private void sub_clearall()
{
this.Cmbname.SelectedIndex =
-1;
this.Cmbfirst.SelectedIndex =
-1;
this.Cmbfather.SelectedIndex
= -1;
this.Cmbcountry.SelectedIndex
= -1;
this.Cmbcity.SelectedIndex =
-1;
this.Txtphone.Text = "";
if (this.Btnsearch.Enabled ==
true)
this.Btnsearch.Enabled =
false;
}
private void
Btnsearch_Click(object
sender, EventArgs e)
{
searchflg = true;
switch (this.Chk_allbook.Checked)
{
case true:
sub_search("", "", "", "",
"", "");
break;
case false:
sub_search(this.Cmbname.Text.Trim(),
this.Cmbfirst.Text.Trim(),
this.Cmbfather.Text.Trim(),
this.Cmbcountry.Text.Trim(),
this.Cmbcity.Text.Trim(),
this.Txtphone.Text.Trim());
break;
}
}
private void
sub_search(string v_name,
string v_firstname, string
v_fathername, string
v_country, string v_city,
string v_phone)
{
int vfound;
switch (this.Chk_allbook.Checked)
{
case true:
vselect = new
System.Data.OleDb.OleDbCommand("SELECT
bookid,alternativePhone,
city, country, father_name,
fax, first_name, homephone,
mobilephone, name, sex,
workphone FROM book WHERE
(name <> '') ORDER BY name,
first_name, father_name");
break;
case false:
vselect = new
System.Data.OleDb.OleDbCommand("SELECT
bookid,alternativePhone,
city, country, father_name,
fax, first_name, homephone,
mobilephone, name, sex,
workphone FROM book WHERE
((name <> '') And (Trim(name)
= '" + v_name + "') Or (Trim(first_name)
= '" + v_firstname + "') Or (Trim(father_name)
= '" + v_fathername + "') Or
(Trim(country) = '" +
v_country + "') Or (Trim(city)
= '" + v_city + "') Or ((Trim(homephone)
= '" + v_phone + "') Or (Trim(workphone)
= '" + v_phone + "') Or (Trim(mobilephone)
= '" + v_phone + "') Or (Trim(alternativePhone)
= '" + v_phone + "') Or (Trim(fax)
= '" + v_phone + "'))) ORDER
BY name, first_name,
father_name");
break;
}
vda = new
System.Data.OleDb.OleDbDataAdapter(vselect);
vdset = new
System.Data.DataSet();
vselect.Connection =
DbConnection1;
vdset.EnforceConstraints =
false;
try
{
DbConnection1.Open();
vda.Fill(vdset, "book");
}
catch (System.Exception
fillException)
{
System.Windows.Forms.MessageBox.Show(fillException.Message);
}
vdset.EnforceConstraints =
true;
DbConnection1.Close();
vfound =
vdset.Tables["book"].Rows.Count;
this.DataGrid1.DataSource =
vdset;
this.DataGrid1.DataMember =
"book";
if (searchflg == true)
{
this.Btnsearch.Enabled =
true;
this.Btnclear_Click(Btnclear,
null);
searchflg = false;
}
switch (this.Chk_allbook.Checked)
{
case true:
this.lbfound.Text =
vfound.ToString() + " -
item(s) found, selected: all
book(s)";
break;
case false:
this.lbfound.Text =
vfound.ToString() + " -
item(s) found";
break;
}
s_flag = true;
this.lbfound.Focus();
}
private void sub_select()
{
int vvrec;
vselect = new
System.Data.OleDb.OleDbCommand("SELECT
bookid, country, father_name,
first_name, name, sex FROM
book WHERE (name <> '') ORDER
BY bookid");
vda = new
System.Data.OleDb.OleDbDataAdapter(vselect);
vdset = new
System.Data.DataSet();
vselect.Connection =
DbConnection1;
vdset.EnforceConstraints =
false;
try
{
DbConnection1.Open();
vda.Fill(vdset, "book");
}
catch (System.Exception
fillException)
{
System.Windows.Forms.MessageBox.Show(fillException.Message);
}
vdset.EnforceConstraints =
true;
DbConnection1.Close();
if (vdset.Tables["book"].Rows.Count
> 0)
{
for (vvrec = 0; vvrec <= (vdset.Tables["book"].Rows.Count
- 1); vvrec++)
{
if (vdset.Tables["book"].Rows[vvrec]["bookid"].ToString().Trim()
== vitem_grid.Trim())
{
BookSearch_cl.book_recno =
vvrec;
}
}
}
}
private void
DataGrid1_Click(object
sender, EventArgs e)
{
vitem_grid =
this.DataGrid1[this.DataGrid1.CurrentRowIndex,
0].ToString();
this.Btnok.Enabled = true;
}
private void
DataGrid1_MouseUp(object
sender,
System.Windows.Forms.MouseEventArgs
e)
{
vitem_grid =
this.DataGrid1[this.DataGrid1.CurrentRowIndex,
0].ToString();
this.Btnok.Enabled = true;
}
private void
Btnok_Click(object sender,
EventArgs e)
{
sub_select();
BookSearch_cl.findedit_Flag =
"ok";
switch (BookNC.BookForm.BookF_cl.booknote_type)
{
case "find":
this.Close();
BookNC.BookForm.ActiveForm.Refresh();
BookNC.BookForm.ActiveForm.Activate();
//fbooknote.sub_findok();
break;
case "edit":
this.Close();
BookNC.BookForm.ActiveForm.Refresh();
BookNC.BookForm.ActiveForm.Activate();
//fbooknote.sub_modifyok();
break;
}
}
private void
Btncancel_Click(object
sender, EventArgs e)
{
BookSearch_cl.findedit_Flag =
"cancel";
this.Close();
BookNC.BookForm.ActiveForm.Refresh();
BookNC.BookForm.ActiveForm.Activate();
}
}
} |
|
| | | |
|
| |
|
|
10- |
Intro.cs,
4th
Form of BookNC
project/Application |
|
10.1 |
View
Designer |
|
 |
|
|
10.2 |
View
Codes |
|
|
 |
the
Code of Intro
Form | |
the Code of Intro.cs
Form of
BookNC Database Application
developed with
Microsoft Visual
Studio Community 2019, C# - Face
Game |
|
|
|
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Windows.Forms;
namespace
BookNC
{
public
partial
class
Intro
: Form
{
public
Intro()
{
InitializeComponent();
}
private
void
Dbutton1_Click(object
sender, EventArgs e)
{
this.Close();
}
private
void
PictureBoxI_Click(object
sender, EventArgs e)
{
this.Close();
}
}
}
|
|
| | | |
|
| |
|
|
11- |
AboutB.cs,
5th
Form of BookNC
project/Application |
|
11.1 |
View
Designer |
|
 |
|
|
11.2 |
View
Codes |
|
|
 |
the
Code of AboutB
Form | |
the Code of AboutB.cs
Form of
BookNC Database Application
developed with
Microsoft Visual
Studio Community 2019, C# - Face
Game |
|
|
|
using
System;
using
System.Collections.Generic;
using
System.ComponentModel;
using
System.Data;
using
System.Drawing;
using
System.Linq;
using
System.Text;
using
System.Threading.Tasks;
using
System.Windows.Forms;
namespace
BookNC
{
public
partial
class
AboutB :
Form
{
// int IcoNmbr;
int
VFHeight;
public
AboutB()
{
InitializeComponent();
}
private
void
AboutB_Load(object
sender, EventArgs e)
{
this.Btndetail.Text
=
"Hide";
VFHeight =
this.Height;
this.TextBox1.Text
= System.Environment.MachineName.ToString();
this.TextBox2.Text
= System.Environment.UserName.ToString();
this.TextBox3.Text
= System.Environment.OSVersion.ToString();
this.TextBox4.Text
= System.Environment.Version.ToString();
this.TextBox5.Text
= System.Environment.SystemDirectory.ToString();
this.picico.Select();
// this.picico.Image = this.picicoOrg0.Image;
// IcoNmbr = 1;
}
private
void
Btndetail_Click(object
sender, EventArgs e)
{
if (this.Btndetail.Text
==
"Detail")
{
this.Height
= VFHeight;
this.Btndetail.Text
=
"Hide";
}
else
if (this.Btndetail.Text
==
"Hide")
{
this.Height
=
this.BtnDone.Top
+ (this.BtnDone.Height
* 3);
this.Btndetail.Text
=
"Detail";
}
}
private
void
BtnDone_Click(object
sender, EventArgs e)
{
this.Close();
}
//---------------------
// private void Timer1_Tick(object sender,
EventArgs e)
// {
// if (IcoNmbr == 0)
// {
// this.picico.Image = this.picicoOrg0.Image;
// IcoNmbr = 1;
// }
// else
// {
// this.picico.Image = this.picicoOrg1.Image;
// IcoNmbr = 0;
// }
// }
}
}
|
|
| | | |
|
| |
|
|
|
|
|
|
|
| | | | | | |