The Visual C# 2010 Form - book_note.cs, Text Codes
 
 
 

       
      Return



  The Form -  book_note.cs ...

 
 

 The codes  corresponding ...
   
 
 
 
using System;

using System.Collections.Generic;

using System.ComponentModel;

using System.Data;

using System.Data.OleDb;

using System.Drawing;

using System.Linq;

using System.Text;

using System.Windows.Forms;

namespace work_VCnet10

{

public partial class book_note : Form

{

// public variables

public class book_note_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 book_note()

{

InitializeComponent();

 

 

}

 

//list of operations available: navigation, add/new, modify, update, cancel, find/search, print, close

private void book_note_Load(object sender, EventArgs e)

{

this.DbConnection1.ConnectionString = @"Provider=""Microsoft.Jet.OLEDB.4.0"";Data Source=""C:\work_VCnet10\work_VCnet10\data\work_VCnet.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;

book_note_cl.booknote_width = this.Width;

book_note_cl.booknote_left = this.Left;

book_note_cl.booknote_top= this.Top;

//Initialized DataAdapter, dataAdaper and Command

sub_data_dapterCmd();

 

 

//load book table, book_dset1 dataset

LoadDataSet();

book_note_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";

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.

work_VCnet10.book_dset objDataSetTemp;

objDataSetTemp = new work_VCnet10.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(work_VCnet10.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 book_note_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 note ...";

response = MessageBox.Show(msg_inf, work_VCnet10.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();

}

}

private void ToolBar1_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

switch(this.ToolBar1.Buttons.IndexOf(e.Button))

{

//first

case 0:

this.NavFirst();

break;

//preview

case 1:

this.NavPrev();

break;

}

}

private void ToolBar2_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

switch(this.ToolBar2.Buttons.IndexOf(e.Button))

{

//next

case 0:

this.NavNext();

break;

//last

case 1:

this.NavLast();

break;

}

}

private void ToolBar3_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

switch(this.ToolBar3.Buttons.IndexOf(e.Button))

{

//add

case 0:

this.sub_add();

break;

}

}

private void ToolBar4_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

switch(this.ToolBar4.Buttons.IndexOf(e.Button))

{

//modify

case 0:

this.sub_modify();

break;

//save

}

}

private void ToolBar5_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

switch(this.ToolBar5.Buttons.IndexOf(e.Button))

{

//save

case 0:

this.sub_Update();

break;

}

}

private void ToolBar6_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

switch(this.ToolBar6.Buttons.IndexOf(e.Button))

{

//cancel

case 0:

this.sub_Cancel();

break;

}

}

private void ToolBar7_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

switch(this.ToolBar7.Buttons.IndexOf(e.Button))

{

//search

case 0:

this.sub_find();

break;

}

}

private void ToolBar8_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

switch(this.ToolBar8.Buttons.IndexOf(e.Button))

{

//print

case 0:

this.sub_print();

break;

}

}

private void ToolBar9_ButtonClick(object sender, System.Windows.Forms.ToolBarButtonClickEventArgs e)

{

switch(this.ToolBar9.Buttons.IndexOf(e.Button))

{

//close form

case 0:

if ((mbaddflag == true) || (mbeditflag == true))

{

this.close_response();

}

else

{

this.Close();

}

break;

}

}

//navigation operation ... *****************************

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.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.ToolBaradd.Enabled == false)

Enabled_AMS(true);

if (this.ToolBarsearch.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.ToolBarsave.Enabled == false)

// this.ToolBarsave.Enabled = true;

//if (this.ToolBarcancel.Enabled == false)

// this.ToolBarcancel.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.ToolBarfirst.Enabled = bval;

this.ToolBarpreview.Enabled = bval;

}

private void NavigationNL( bool bval)

{

this.ToolBarnext.Enabled = bval;

this.ToolBarlast.Enabled = bval;

}

private void Enabled_AMS( bool bval)

{

this.ToolBaradd.Enabled = bval;

this.ToolBarmodify.Enabled = bval;

this.ToolBarsave.Enabled = !bval;

this.ToolBarcancel.Enabled = !bval;

this.lblNavLocation.Enabled = bval;

}

private void Enabled_CFP(bool bval)

{

//this.ToolBarcancel.Enabled = bval;

this.ToolBarsearch.Enabled = bval;

this.ToolBarprint.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.Btnphoto_del.Enabled = false;

this.Btnphoto_new.Enabled = false;

if (mbeditflag == true)

{

this.Btnphoto_del.Enabled = true;

this.Btnphoto_new.Enabled = true;

}

}

else

{

//goto PP2;

this.Pic_photo.Image = null; //nothing();

this.Panel_photo.BorderStyle = BorderStyle.FixedSingle;

if (mbeditflag == true)

{

this.Btnphoto_new.Enabled = true;

}

else

{

this.Btnphoto_new.Enabled = false;

}

this.Btnphoto_del.Enabled = false;

return;

}

}

else

{

//PP2:

this.Pic_photo.Image = null; //nothing();

this.Panel_photo.BorderStyle = BorderStyle.FixedSingle;

if (mbeditflag == true)

{

this.Btnphoto_new.Enabled = true;

}

else

{

this.Btnphoto_new.Enabled = false;

}

this.Btnphoto_del.Enabled = false;

return;

}

}

}

private void NavPrev()

{

this.BindingContext[book_dset1,"book"].Position = (this.BindingContext[book_dset1,"book"].Position - 1);

this.book_dset1_PositionChanged();

}

private void NavNext()

{

this.BindingContext[book_dset1,"book"].Position = (this.BindingContext[book_dset1,"book"].Position + 1);

this.book_dset1_PositionChanged();

}

private void NavLast()

{

this.BindingContext[book_dset1,"book"].Position = (this.book_dset1.Tables["book"].Rows.Count - 1);

this.book_dset1_PositionChanged();

}

//book_note 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.Btnphoto_del.Enabled = false;

this.Btnphoto_new.Enabled = true;

this.book_dset1_PositionChanged();

}

//show photo, add or remove/delete photo '''''''''''''''''''''

private void Btnphoto_new_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 note, 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.Btnphoto_del.Enabled = true;

}

}

private void Btnphoto_del_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, work_VCnet10.mainform.mainform_cl.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 = "";

Btnphoto_del.Enabled = false;

return;

}

if (response == DialogResult.No)

{

return;

}

}

//book_note Activated event ... *****************************

//book_note Activated event (responses from book_search form)

private void book_note_Activated(object sender, EventArgs e)

{

switch(work_VCnet10.book_search.book_search_cl.findedit_Flag)

{

case "ok":

switch(book_note_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();

}

//book_note modify/edit event ... *****************************

private void sub_modify()

{

book_search fbook_search = new book_search();

book_note_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.ToolBarsave.Enabled = false;

this.ToolBarcancel.Enabled = false;

}

private void sub_modifyok()

{

this.BindingContext[book_dset1,"book"].Position = work_VCnet10.book_search.book_search_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();

}

//book_note 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.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) ...", work_VCnet10.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.

work_VCnet10.book_dset objDataSetChanges = new work_VCnet10.book_dset();

// Stop any current edits.

this.BindingContext[book_dset1,"book"].EndCurrentEdit();

// Get the changes that have been made to the main dataset.

objDataSetChanges = ((work_VCnet10.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(work_VCnet10.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();

}

}

//book_note Cancel event ... *****************************

private void sub_Cancel()

{

mbeditflag = false;

mbaddflag = false;

this.book_dset1.RejectChanges();

this.BindingContext[book_dset1,"book"].CancelCurrentEdit();

this.book_dset1_PositionChanged();

}

//book_note find/search event ... *****************************

private void sub_find()

{

book_search fbook_search = new book_search();

book_note_cl.booknote_type = "find";

sub_Searchedit();

fbook_search.Show();

}

private void sub_findok()

{

this.BindingContext[book_dset1,"book"].Position = work_VCnet10.book_search.book_search_cl.book_recno;

this.book_dset1_PositionChanged();

}

private void sub_print()

{

}

}

}

 
   
  
 



 

      Return