BookStoreDataSet.Designer.cs
上传用户:xyl529207
上传日期:2022-08-03
资源大小:935k
文件大小:277k
源码类别:

行业应用

开发平台:

SQL

  1.         
  2.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  3.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  4.         public virtual int Update(System.Data.DataRow dataRow) {
  5.             return this.Adapter.Update(new System.Data.DataRow[] {
  6.                         dataRow});
  7.         }
  8.         
  9.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  10.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  11.         public virtual int Update(System.Data.DataRow[] dataRows) {
  12.             return this.Adapter.Update(dataRows);
  13.         }
  14.         
  15.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  16.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  17.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
  18.         public virtual int Delete(int Original_ID, string Original_ISBN, string Original_Name, string Original_Author, string Original_Press, System.Nullable<System.DateTime> Original_PublishDate, decimal Original_Price, System.Nullable<short> Original_Pages, string Original_Barcode, System.Nullable<bool> Original_CD, int Original_Storage) {
  19.             this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  20.             if ((Original_ISBN == null)) {
  21.                 throw new System.ArgumentNullException("Original_ISBN");
  22.             }
  23.             else {
  24.                 this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_ISBN));
  25.             }
  26.             if ((Original_Name == null)) {
  27.                 throw new System.ArgumentNullException("Original_Name");
  28.             }
  29.             else {
  30.                 this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Name));
  31.             }
  32.             if ((Original_Author == null)) {
  33.                 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
  34.                 this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
  35.             }
  36.             else {
  37.                 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
  38.                 this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Author));
  39.             }
  40.             if ((Original_Press == null)) {
  41.                 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
  42.                 this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
  43.             }
  44.             else {
  45.                 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
  46.                 this.Adapter.DeleteCommand.Parameters[6].Value = ((string)(Original_Press));
  47.             }
  48.             if ((Original_PublishDate.HasValue == true)) {
  49.                 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
  50.                 this.Adapter.DeleteCommand.Parameters[8].Value = ((System.DateTime)(Original_PublishDate.Value));
  51.             }
  52.             else {
  53.                 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
  54.                 this.Adapter.DeleteCommand.Parameters[8].Value = System.DBNull.Value;
  55.             }
  56.             this.Adapter.DeleteCommand.Parameters[9].Value = ((decimal)(Original_Price));
  57.             if ((Original_Pages.HasValue == true)) {
  58.                 this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(0));
  59.                 this.Adapter.DeleteCommand.Parameters[11].Value = ((short)(Original_Pages.Value));
  60.             }
  61.             else {
  62.                 this.Adapter.DeleteCommand.Parameters[10].Value = ((object)(1));
  63.                 this.Adapter.DeleteCommand.Parameters[11].Value = System.DBNull.Value;
  64.             }
  65.             if ((Original_Barcode == null)) {
  66.                 throw new System.ArgumentNullException("Original_Barcode");
  67.             }
  68.             else {
  69.                 this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Barcode));
  70.             }
  71.             if ((Original_CD.HasValue == true)) {
  72.                 this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0));
  73.                 this.Adapter.DeleteCommand.Parameters[14].Value = ((bool)(Original_CD.Value));
  74.             }
  75.             else {
  76.                 this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1));
  77.                 this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value;
  78.             }
  79.             this.Adapter.DeleteCommand.Parameters[15].Value = ((int)(Original_Storage));
  80.             System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  81.             if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) 
  82.                         != System.Data.ConnectionState.Open)) {
  83.                 this.Adapter.DeleteCommand.Connection.Open();
  84.             }
  85.             try {
  86.                 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  87.                 return returnValue;
  88.             }
  89.             finally {
  90.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  91.                     this.Adapter.DeleteCommand.Connection.Close();
  92.                 }
  93.             }
  94.         }
  95.         
  96.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  97.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  98.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
  99.         public virtual int Insert(string ISBN, string Name, string Author, string Press, System.Nullable<System.DateTime> PublishDate, decimal Price, System.Nullable<short> Pages, string Barcode, System.Nullable<bool> CD, int Storage) {
  100.             if ((ISBN == null)) {
  101.                 throw new System.ArgumentNullException("ISBN");
  102.             }
  103.             else {
  104.                 this.Adapter.InsertCommand.Parameters[0].Value = ((string)(ISBN));
  105.             }
  106.             if ((Name == null)) {
  107.                 throw new System.ArgumentNullException("Name");
  108.             }
  109.             else {
  110.                 this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Name));
  111.             }
  112.             if ((Author == null)) {
  113.                 this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
  114.             }
  115.             else {
  116.                 this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Author));
  117.             }
  118.             if ((Press == null)) {
  119.                 this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
  120.             }
  121.             else {
  122.                 this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Press));
  123.             }
  124.             if ((PublishDate.HasValue == true)) {
  125.                 this.Adapter.InsertCommand.Parameters[4].Value = ((System.DateTime)(PublishDate.Value));
  126.             }
  127.             else {
  128.                 this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
  129.             }
  130.             this.Adapter.InsertCommand.Parameters[5].Value = ((decimal)(Price));
  131.             if ((Pages.HasValue == true)) {
  132.                 this.Adapter.InsertCommand.Parameters[6].Value = ((short)(Pages.Value));
  133.             }
  134.             else {
  135.                 this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
  136.             }
  137.             if ((Barcode == null)) {
  138.                 throw new System.ArgumentNullException("Barcode");
  139.             }
  140.             else {
  141.                 this.Adapter.InsertCommand.Parameters[7].Value = ((string)(Barcode));
  142.             }
  143.             if ((CD.HasValue == true)) {
  144.                 this.Adapter.InsertCommand.Parameters[8].Value = ((bool)(CD.Value));
  145.             }
  146.             else {
  147.                 this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
  148.             }
  149.             this.Adapter.InsertCommand.Parameters[9].Value = ((int)(Storage));
  150.             System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  151.             if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) 
  152.                         != System.Data.ConnectionState.Open)) {
  153.                 this.Adapter.InsertCommand.Connection.Open();
  154.             }
  155.             try {
  156.                 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  157.                 return returnValue;
  158.             }
  159.             finally {
  160.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  161.                     this.Adapter.InsertCommand.Connection.Close();
  162.                 }
  163.             }
  164.         }
  165.         
  166.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  167.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  168.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
  169.         public virtual int Update(
  170.                     string ISBN, 
  171.                     string Name, 
  172.                     string Author, 
  173.                     string Press, 
  174.                     System.Nullable<System.DateTime> PublishDate, 
  175.                     decimal Price, 
  176.                     System.Nullable<short> Pages, 
  177.                     string Barcode, 
  178.                     System.Nullable<bool> CD, 
  179.                     int Storage, 
  180.                     int Original_ID, 
  181.                     string Original_ISBN, 
  182.                     string Original_Name, 
  183.                     string Original_Author, 
  184.                     string Original_Press, 
  185.                     System.Nullable<System.DateTime> Original_PublishDate, 
  186.                     decimal Original_Price, 
  187.                     System.Nullable<short> Original_Pages, 
  188.                     string Original_Barcode, 
  189.                     System.Nullable<bool> Original_CD, 
  190.                     int Original_Storage, 
  191.                     int ID) {
  192.             if ((ISBN == null)) {
  193.                 throw new System.ArgumentNullException("ISBN");
  194.             }
  195.             else {
  196.                 this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(ISBN));
  197.             }
  198.             if ((Name == null)) {
  199.                 throw new System.ArgumentNullException("Name");
  200.             }
  201.             else {
  202.                 this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Name));
  203.             }
  204.             if ((Author == null)) {
  205.                 this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
  206.             }
  207.             else {
  208.                 this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Author));
  209.             }
  210.             if ((Press == null)) {
  211.                 this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
  212.             }
  213.             else {
  214.                 this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Press));
  215.             }
  216.             if ((PublishDate.HasValue == true)) {
  217.                 this.Adapter.UpdateCommand.Parameters[4].Value = ((System.DateTime)(PublishDate.Value));
  218.             }
  219.             else {
  220.                 this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
  221.             }
  222.             this.Adapter.UpdateCommand.Parameters[5].Value = ((decimal)(Price));
  223.             if ((Pages.HasValue == true)) {
  224.                 this.Adapter.UpdateCommand.Parameters[6].Value = ((short)(Pages.Value));
  225.             }
  226.             else {
  227.                 this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
  228.             }
  229.             if ((Barcode == null)) {
  230.                 throw new System.ArgumentNullException("Barcode");
  231.             }
  232.             else {
  233.                 this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Barcode));
  234.             }
  235.             if ((CD.HasValue == true)) {
  236.                 this.Adapter.UpdateCommand.Parameters[8].Value = ((bool)(CD.Value));
  237.             }
  238.             else {
  239.                 this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
  240.             }
  241.             this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Storage));
  242.             this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_ID));
  243.             if ((Original_ISBN == null)) {
  244.                 throw new System.ArgumentNullException("Original_ISBN");
  245.             }
  246.             else {
  247.                 this.Adapter.UpdateCommand.Parameters[11].Value = ((string)(Original_ISBN));
  248.             }
  249.             if ((Original_Name == null)) {
  250.                 throw new System.ArgumentNullException("Original_Name");
  251.             }
  252.             else {
  253.                 this.Adapter.UpdateCommand.Parameters[12].Value = ((string)(Original_Name));
  254.             }
  255.             if ((Original_Author == null)) {
  256.                 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1));
  257.                 this.Adapter.UpdateCommand.Parameters[14].Value = System.DBNull.Value;
  258.             }
  259.             else {
  260.                 this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0));
  261.                 this.Adapter.UpdateCommand.Parameters[14].Value = ((string)(Original_Author));
  262.             }
  263.             if ((Original_Press == null)) {
  264.                 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1));
  265.                 this.Adapter.UpdateCommand.Parameters[16].Value = System.DBNull.Value;
  266.             }
  267.             else {
  268.                 this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0));
  269.                 this.Adapter.UpdateCommand.Parameters[16].Value = ((string)(Original_Press));
  270.             }
  271.             if ((Original_PublishDate.HasValue == true)) {
  272.                 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0));
  273.                 this.Adapter.UpdateCommand.Parameters[18].Value = ((System.DateTime)(Original_PublishDate.Value));
  274.             }
  275.             else {
  276.                 this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1));
  277.                 this.Adapter.UpdateCommand.Parameters[18].Value = System.DBNull.Value;
  278.             }
  279.             this.Adapter.UpdateCommand.Parameters[19].Value = ((decimal)(Original_Price));
  280.             if ((Original_Pages.HasValue == true)) {
  281.                 this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0));
  282.                 this.Adapter.UpdateCommand.Parameters[21].Value = ((short)(Original_Pages.Value));
  283.             }
  284.             else {
  285.                 this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1));
  286.                 this.Adapter.UpdateCommand.Parameters[21].Value = System.DBNull.Value;
  287.             }
  288.             if ((Original_Barcode == null)) {
  289.                 throw new System.ArgumentNullException("Original_Barcode");
  290.             }
  291.             else {
  292.                 this.Adapter.UpdateCommand.Parameters[22].Value = ((string)(Original_Barcode));
  293.             }
  294.             if ((Original_CD.HasValue == true)) {
  295.                 this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0));
  296.                 this.Adapter.UpdateCommand.Parameters[24].Value = ((bool)(Original_CD.Value));
  297.             }
  298.             else {
  299.                 this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1));
  300.                 this.Adapter.UpdateCommand.Parameters[24].Value = System.DBNull.Value;
  301.             }
  302.             this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Original_Storage));
  303.             this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(ID));
  304.             System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  305.             if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) 
  306.                         != System.Data.ConnectionState.Open)) {
  307.                 this.Adapter.UpdateCommand.Connection.Open();
  308.             }
  309.             try {
  310.                 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  311.                 return returnValue;
  312.             }
  313.             finally {
  314.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  315.                     this.Adapter.UpdateCommand.Connection.Close();
  316.                 }
  317.             }
  318.         }
  319.     }
  320.     
  321.     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
  322.     [System.ComponentModel.DesignerCategoryAttribute("code")]
  323.     [System.ComponentModel.ToolboxItem(true)]
  324.     [System.ComponentModel.DataObjectAttribute(true)]
  325.     [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  326.         ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  327.     [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  328.     public partial class CustomerTableAdapter : System.ComponentModel.Component {
  329.         
  330.         private System.Data.SqlClient.SqlDataAdapter _adapter;
  331.         
  332.         private System.Data.SqlClient.SqlConnection _connection;
  333.         
  334.         private System.Data.SqlClient.SqlCommand[] _commandCollection;
  335.         
  336.         private bool _clearBeforeFill;
  337.         
  338.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  339.         public CustomerTableAdapter() {
  340.             this.ClearBeforeFill = true;
  341.         }
  342.         
  343.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  344.         private System.Data.SqlClient.SqlDataAdapter Adapter {
  345.             get {
  346.                 if ((this._adapter == null)) {
  347.                     this.InitAdapter();
  348.                 }
  349.                 return this._adapter;
  350.             }
  351.         }
  352.         
  353.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  354.         internal System.Data.SqlClient.SqlConnection Connection {
  355.             get {
  356.                 if ((this._connection == null)) {
  357.                     this.InitConnection();
  358.                 }
  359.                 return this._connection;
  360.             }
  361.             set {
  362.                 this._connection = value;
  363.                 if ((this.Adapter.InsertCommand != null)) {
  364.                     this.Adapter.InsertCommand.Connection = value;
  365.                 }
  366.                 if ((this.Adapter.DeleteCommand != null)) {
  367.                     this.Adapter.DeleteCommand.Connection = value;
  368.                 }
  369.                 if ((this.Adapter.UpdateCommand != null)) {
  370.                     this.Adapter.UpdateCommand.Connection = value;
  371.                 }
  372.                 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  373.                     if ((this.CommandCollection[i] != null)) {
  374.                         ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  375.                     }
  376.                 }
  377.             }
  378.         }
  379.         
  380.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  381.         protected System.Data.SqlClient.SqlCommand[] CommandCollection {
  382.             get {
  383.                 if ((this._commandCollection == null)) {
  384.                     this.InitCommandCollection();
  385.                 }
  386.                 return this._commandCollection;
  387.             }
  388.         }
  389.         
  390.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  391.         public bool ClearBeforeFill {
  392.             get {
  393.                 return this._clearBeforeFill;
  394.             }
  395.             set {
  396.                 this._clearBeforeFill = value;
  397.             }
  398.         }
  399.         
  400.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  401.         private void InitAdapter() {
  402.             this._adapter = new System.Data.SqlClient.SqlDataAdapter();
  403.             System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
  404.             tableMapping.SourceTable = "Table";
  405.             tableMapping.DataSetTable = "Customer";
  406.             tableMapping.ColumnMappings.Add("ID", "ID");
  407.             tableMapping.ColumnMappings.Add("Name", "Name");
  408.             tableMapping.ColumnMappings.Add("Levels", "Levels");
  409.             tableMapping.ColumnMappings.Add("Gender", "Gender");
  410.             tableMapping.ColumnMappings.Add("Birthday", "Birthday");
  411.             tableMapping.ColumnMappings.Add("Degree", "Degree");
  412.             tableMapping.ColumnMappings.Add("Address", "Address");
  413.             tableMapping.ColumnMappings.Add("Telephone", "Telephone");
  414.             tableMapping.ColumnMappings.Add("Email", "Email");
  415.             tableMapping.ColumnMappings.Add("Score", "Score");
  416.             this._adapter.TableMappings.Add(tableMapping);
  417.             this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
  418.             this._adapter.DeleteCommand.Connection = this.Connection;
  419.             this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Customer] WHERE (([ID] = @Original_ID) AND ([Name] = @Original_Name) AND ([Levels] = @Original_Levels) AND ((@IsNull_Gender = 1 AND [Gender] IS NULL) OR ([Gender] = @Original_Gender)) AND ((@IsNull_Birthday = 1 AND [Birthday] IS NULL) OR ([Birthday] = @Original_Birthday)) AND ((@IsNull_Degree = 1 AND [Degree] IS NULL) OR ([Degree] = @Original_Degree)) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ((@IsNull_Telephone = 1 AND [Telephone] IS NULL) OR ([Telephone] = @Original_Telephone)) AND ((@IsNull_Email = 1 AND [Email] IS NULL) OR ([Email] = @Original_Email)) AND ((@IsNull_Score = 1 AND [Score] IS NULL) OR ([Score] = @Original_Score)))";
  420.             this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
  421.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  422.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  423.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Levels", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Levels", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  424.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Gender", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  425.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Gender", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  426.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Birthday", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Birthday", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  427.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Birthday", System.Data.SqlDbType.SmallDateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "Birthday", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  428.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Degree", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Degree", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  429.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Degree", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Degree", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  430.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Address", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  431.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  432.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Telephone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Telephone", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  433.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Telephone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Telephone", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  434.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Email", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Email", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  435.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Email", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Email", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  436.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Score", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Score", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  437.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Score", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Score", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  438.             this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
  439.             this._adapter.InsertCommand.Connection = this.Connection;
  440.             this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Customer] ([Name], [Levels], [Gender], [Birthday], [Degree], [Address], [Telephone], [Email], [Score]) VALUES (@Name, @Levels, @Gender, @Birthday, @Degree, @Address, @Telephone, @Email, @Score);
  441. SELECT ID, Name, Levels, Gender, Birthday, Degree, Address, Telephone, Email, Score FROM Customer WHERE (ID = SCOPE_IDENTITY())";
  442.             this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
  443.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  444.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Levels", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Levels", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  445.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Gender", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  446.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Birthday", System.Data.SqlDbType.SmallDateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "Birthday", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  447.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Degree", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Degree", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  448.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  449.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Telephone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Telephone", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  450.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Email", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Email", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  451.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Score", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Score", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  452.             this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
  453.             this._adapter.UpdateCommand.Connection = this.Connection;
  454.             this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Customer] SET [Name] = @Name, [Levels] = @Levels, [Gender] = @Gender, [Birthday] = @Birthday, [Degree] = @Degree, [Address] = @Address, [Telephone] = @Telephone, [Email] = @Email, [Score] = @Score WHERE (([ID] = @Original_ID) AND ([Name] = @Original_Name) AND ([Levels] = @Original_Levels) AND ((@IsNull_Gender = 1 AND [Gender] IS NULL) OR ([Gender] = @Original_Gender)) AND ((@IsNull_Birthday = 1 AND [Birthday] IS NULL) OR ([Birthday] = @Original_Birthday)) AND ((@IsNull_Degree = 1 AND [Degree] IS NULL) OR ([Degree] = @Original_Degree)) AND ((@IsNull_Address = 1 AND [Address] IS NULL) OR ([Address] = @Original_Address)) AND ((@IsNull_Telephone = 1 AND [Telephone] IS NULL) OR ([Telephone] = @Original_Telephone)) AND ((@IsNull_Email = 1 AND [Email] IS NULL) OR ([Email] = @Original_Email)) AND ((@IsNull_Score = 1 AND [Score] IS NULL) OR ([Score] = @Original_Score)));
  455. SELECT ID, Name, Levels, Gender, Birthday, Degree, Address, Telephone, Email, Score FROM Customer WHERE (ID = @ID)";
  456.             this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
  457.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  458.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Levels", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Levels", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  459.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Gender", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  460.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Birthday", System.Data.SqlDbType.SmallDateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "Birthday", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  461.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Degree", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Degree", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  462.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  463.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Telephone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Telephone", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  464.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Email", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Email", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  465.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Score", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Score", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  466.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  467.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  468.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Levels", System.Data.SqlDbType.SmallInt, 0, System.Data.ParameterDirection.Input, 0, 0, "Levels", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  469.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Gender", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  470.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Gender", System.Data.SqlDbType.Bit, 0, System.Data.ParameterDirection.Input, 0, 0, "Gender", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  471.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Birthday", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Birthday", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  472.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Birthday", System.Data.SqlDbType.SmallDateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "Birthday", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  473.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Degree", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Degree", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  474.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Degree", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Degree", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  475.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Address", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  476.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Address", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Address", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  477.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Telephone", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Telephone", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  478.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Telephone", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Telephone", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  479.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Email", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Email", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  480.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Email", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Email", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  481.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Score", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Score", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  482.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Score", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Score", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  483.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  484.         }
  485.         
  486.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  487.         private void InitConnection() {
  488.             this._connection = new System.Data.SqlClient.SqlConnection();
  489.             this._connection.ConnectionString = global::BookStoreMan.Properties.Settings.Default.BookStoreConnectionString;
  490.         }
  491.         
  492.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  493.         private void InitCommandCollection() {
  494.             this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
  495.             this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
  496.             this._commandCollection[0].Connection = this.Connection;
  497.             this._commandCollection[0].CommandText = "SELECT ID, Name, Levels, Gender, Birthday, Degree, Address, Telephone, Email, Sco" +
  498.                 "re FROM dbo.Customer";
  499.             this._commandCollection[0].CommandType = System.Data.CommandType.Text;
  500.         }
  501.         
  502.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  503.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  504.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
  505.         public virtual int Fill(BookStoreDataSet.CustomerDataTable dataTable) {
  506.             this.Adapter.SelectCommand = this.CommandCollection[0];
  507.             if ((this.ClearBeforeFill == true)) {
  508.                 dataTable.Clear();
  509.             }
  510.             int returnValue = this.Adapter.Fill(dataTable);
  511.             return returnValue;
  512.         }
  513.         
  514.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  515.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  516.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
  517.         public virtual BookStoreDataSet.CustomerDataTable GetData() {
  518.             this.Adapter.SelectCommand = this.CommandCollection[0];
  519.             BookStoreDataSet.CustomerDataTable dataTable = new BookStoreDataSet.CustomerDataTable();
  520.             this.Adapter.Fill(dataTable);
  521.             return dataTable;
  522.         }
  523.         
  524.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  525.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  526.         public virtual int Update(BookStoreDataSet.CustomerDataTable dataTable) {
  527.             return this.Adapter.Update(dataTable);
  528.         }
  529.         
  530.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  531.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  532.         public virtual int Update(BookStoreDataSet dataSet) {
  533.             return this.Adapter.Update(dataSet, "Customer");
  534.         }
  535.         
  536.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  537.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  538.         public virtual int Update(System.Data.DataRow dataRow) {
  539.             return this.Adapter.Update(new System.Data.DataRow[] {
  540.                         dataRow});
  541.         }
  542.         
  543.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  544.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  545.         public virtual int Update(System.Data.DataRow[] dataRows) {
  546.             return this.Adapter.Update(dataRows);
  547.         }
  548.         
  549.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  550.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  551.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
  552.         public virtual int Delete(int Original_ID, string Original_Name, short Original_Levels, System.Nullable<bool> Original_Gender, System.Nullable<System.DateTime> Original_Birthday, string Original_Degree, string Original_Address, string Original_Telephone, string Original_Email, System.Nullable<int> Original_Score) {
  553.             this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  554.             if ((Original_Name == null)) {
  555.                 throw new System.ArgumentNullException("Original_Name");
  556.             }
  557.             else {
  558.                 this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Name));
  559.             }
  560.             this.Adapter.DeleteCommand.Parameters[2].Value = ((short)(Original_Levels));
  561.             if ((Original_Gender.HasValue == true)) {
  562.                 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
  563.                 this.Adapter.DeleteCommand.Parameters[4].Value = ((bool)(Original_Gender.Value));
  564.             }
  565.             else {
  566.                 this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
  567.                 this.Adapter.DeleteCommand.Parameters[4].Value = System.DBNull.Value;
  568.             }
  569.             if ((Original_Birthday.HasValue == true)) {
  570.                 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
  571.                 this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_Birthday.Value));
  572.             }
  573.             else {
  574.                 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
  575.                 this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
  576.             }
  577.             if ((Original_Degree == null)) {
  578.                 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1));
  579.                 this.Adapter.DeleteCommand.Parameters[8].Value = System.DBNull.Value;
  580.             }
  581.             else {
  582.                 this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0));
  583.                 this.Adapter.DeleteCommand.Parameters[8].Value = ((string)(Original_Degree));
  584.             }
  585.             if ((Original_Address == null)) {
  586.                 this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1));
  587.                 this.Adapter.DeleteCommand.Parameters[10].Value = System.DBNull.Value;
  588.             }
  589.             else {
  590.                 this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0));
  591.                 this.Adapter.DeleteCommand.Parameters[10].Value = ((string)(Original_Address));
  592.             }
  593.             if ((Original_Telephone == null)) {
  594.                 this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1));
  595.                 this.Adapter.DeleteCommand.Parameters[12].Value = System.DBNull.Value;
  596.             }
  597.             else {
  598.                 this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0));
  599.                 this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_Telephone));
  600.             }
  601.             if ((Original_Email == null)) {
  602.                 this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1));
  603.                 this.Adapter.DeleteCommand.Parameters[14].Value = System.DBNull.Value;
  604.             }
  605.             else {
  606.                 this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0));
  607.                 this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_Email));
  608.             }
  609.             if ((Original_Score.HasValue == true)) {
  610.                 this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0));
  611.                 this.Adapter.DeleteCommand.Parameters[16].Value = ((int)(Original_Score.Value));
  612.             }
  613.             else {
  614.                 this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1));
  615.                 this.Adapter.DeleteCommand.Parameters[16].Value = System.DBNull.Value;
  616.             }
  617.             System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  618.             if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) 
  619.                         != System.Data.ConnectionState.Open)) {
  620.                 this.Adapter.DeleteCommand.Connection.Open();
  621.             }
  622.             try {
  623.                 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  624.                 return returnValue;
  625.             }
  626.             finally {
  627.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  628.                     this.Adapter.DeleteCommand.Connection.Close();
  629.                 }
  630.             }
  631.         }
  632.         
  633.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  634.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  635.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
  636.         public virtual int Insert(string Name, short Levels, System.Nullable<bool> Gender, System.Nullable<System.DateTime> Birthday, string Degree, string Address, string Telephone, string Email, System.Nullable<int> Score) {
  637.             if ((Name == null)) {
  638.                 throw new System.ArgumentNullException("Name");
  639.             }
  640.             else {
  641.                 this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
  642.             }
  643.             this.Adapter.InsertCommand.Parameters[1].Value = ((short)(Levels));
  644.             if ((Gender.HasValue == true)) {
  645.                 this.Adapter.InsertCommand.Parameters[2].Value = ((bool)(Gender.Value));
  646.             }
  647.             else {
  648.                 this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
  649.             }
  650.             if ((Birthday.HasValue == true)) {
  651.                 this.Adapter.InsertCommand.Parameters[3].Value = ((System.DateTime)(Birthday.Value));
  652.             }
  653.             else {
  654.                 this.Adapter.InsertCommand.Parameters[3].Value = System.DBNull.Value;
  655.             }
  656.             if ((Degree == null)) {
  657.                 this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
  658.             }
  659.             else {
  660.                 this.Adapter.InsertCommand.Parameters[4].Value = ((string)(Degree));
  661.             }
  662.             if ((Address == null)) {
  663.                 this.Adapter.InsertCommand.Parameters[5].Value = System.DBNull.Value;
  664.             }
  665.             else {
  666.                 this.Adapter.InsertCommand.Parameters[5].Value = ((string)(Address));
  667.             }
  668.             if ((Telephone == null)) {
  669.                 this.Adapter.InsertCommand.Parameters[6].Value = System.DBNull.Value;
  670.             }
  671.             else {
  672.                 this.Adapter.InsertCommand.Parameters[6].Value = ((string)(Telephone));
  673.             }
  674.             if ((Email == null)) {
  675.                 this.Adapter.InsertCommand.Parameters[7].Value = System.DBNull.Value;
  676.             }
  677.             else {
  678.                 this.Adapter.InsertCommand.Parameters[7].Value = ((string)(Email));
  679.             }
  680.             if ((Score.HasValue == true)) {
  681.                 this.Adapter.InsertCommand.Parameters[8].Value = ((int)(Score.Value));
  682.             }
  683.             else {
  684.                 this.Adapter.InsertCommand.Parameters[8].Value = System.DBNull.Value;
  685.             }
  686.             System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  687.             if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) 
  688.                         != System.Data.ConnectionState.Open)) {
  689.                 this.Adapter.InsertCommand.Connection.Open();
  690.             }
  691.             try {
  692.                 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  693.                 return returnValue;
  694.             }
  695.             finally {
  696.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  697.                     this.Adapter.InsertCommand.Connection.Close();
  698.                 }
  699.             }
  700.         }
  701.         
  702.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  703.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  704.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
  705.         public virtual int Update(
  706.                     string Name, 
  707.                     short Levels, 
  708.                     System.Nullable<bool> Gender, 
  709.                     System.Nullable<System.DateTime> Birthday, 
  710.                     string Degree, 
  711.                     string Address, 
  712.                     string Telephone, 
  713.                     string Email, 
  714.                     System.Nullable<int> Score, 
  715.                     int Original_ID, 
  716.                     string Original_Name, 
  717.                     short Original_Levels, 
  718.                     System.Nullable<bool> Original_Gender, 
  719.                     System.Nullable<System.DateTime> Original_Birthday, 
  720.                     string Original_Degree, 
  721.                     string Original_Address, 
  722.                     string Original_Telephone, 
  723.                     string Original_Email, 
  724.                     System.Nullable<int> Original_Score, 
  725.                     int ID) {
  726.             if ((Name == null)) {
  727.                 throw new System.ArgumentNullException("Name");
  728.             }
  729.             else {
  730.                 this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
  731.             }
  732.             this.Adapter.UpdateCommand.Parameters[1].Value = ((short)(Levels));
  733.             if ((Gender.HasValue == true)) {
  734.                 this.Adapter.UpdateCommand.Parameters[2].Value = ((bool)(Gender.Value));
  735.             }
  736.             else {
  737.                 this.Adapter.UpdateCommand.Parameters[2].Value = System.DBNull.Value;
  738.             }
  739.             if ((Birthday.HasValue == true)) {
  740.                 this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(Birthday.Value));
  741.             }
  742.             else {
  743.                 this.Adapter.UpdateCommand.Parameters[3].Value = System.DBNull.Value;
  744.             }
  745.             if ((Degree == null)) {
  746.                 this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
  747.             }
  748.             else {
  749.                 this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Degree));
  750.             }
  751.             if ((Address == null)) {
  752.                 this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
  753.             }
  754.             else {
  755.                 this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Address));
  756.             }
  757.             if ((Telephone == null)) {
  758.                 this.Adapter.UpdateCommand.Parameters[6].Value = System.DBNull.Value;
  759.             }
  760.             else {
  761.                 this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Telephone));
  762.             }
  763.             if ((Email == null)) {
  764.                 this.Adapter.UpdateCommand.Parameters[7].Value = System.DBNull.Value;
  765.             }
  766.             else {
  767.                 this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Email));
  768.             }
  769.             if ((Score.HasValue == true)) {
  770.                 this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Score.Value));
  771.             }
  772.             else {
  773.                 this.Adapter.UpdateCommand.Parameters[8].Value = System.DBNull.Value;
  774.             }
  775.             this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_ID));
  776.             if ((Original_Name == null)) {
  777.                 throw new System.ArgumentNullException("Original_Name");
  778.             }
  779.             else {
  780.                 this.Adapter.UpdateCommand.Parameters[10].Value = ((string)(Original_Name));
  781.             }
  782.             this.Adapter.UpdateCommand.Parameters[11].Value = ((short)(Original_Levels));
  783.             if ((Original_Gender.HasValue == true)) {
  784.                 this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0));
  785.                 this.Adapter.UpdateCommand.Parameters[13].Value = ((bool)(Original_Gender.Value));
  786.             }
  787.             else {
  788.                 this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1));
  789.                 this.Adapter.UpdateCommand.Parameters[13].Value = System.DBNull.Value;
  790.             }
  791.             if ((Original_Birthday.HasValue == true)) {
  792.                 this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0));
  793.                 this.Adapter.UpdateCommand.Parameters[15].Value = ((System.DateTime)(Original_Birthday.Value));
  794.             }
  795.             else {
  796.                 this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1));
  797.                 this.Adapter.UpdateCommand.Parameters[15].Value = System.DBNull.Value;
  798.             }
  799.             if ((Original_Degree == null)) {
  800.                 this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1));
  801.                 this.Adapter.UpdateCommand.Parameters[17].Value = System.DBNull.Value;
  802.             }
  803.             else {
  804.                 this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0));
  805.                 this.Adapter.UpdateCommand.Parameters[17].Value = ((string)(Original_Degree));
  806.             }
  807.             if ((Original_Address == null)) {
  808.                 this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1));
  809.                 this.Adapter.UpdateCommand.Parameters[19].Value = System.DBNull.Value;
  810.             }
  811.             else {
  812.                 this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0));
  813.                 this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_Address));
  814.             }
  815.             if ((Original_Telephone == null)) {
  816.                 this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1));
  817.                 this.Adapter.UpdateCommand.Parameters[21].Value = System.DBNull.Value;
  818.             }
  819.             else {
  820.                 this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0));
  821.                 this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_Telephone));
  822.             }
  823.             if ((Original_Email == null)) {
  824.                 this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1));
  825.                 this.Adapter.UpdateCommand.Parameters[23].Value = System.DBNull.Value;
  826.             }
  827.             else {
  828.                 this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0));
  829.                 this.Adapter.UpdateCommand.Parameters[23].Value = ((string)(Original_Email));
  830.             }
  831.             if ((Original_Score.HasValue == true)) {
  832.                 this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0));
  833.                 this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Original_Score.Value));
  834.             }
  835.             else {
  836.                 this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1));
  837.                 this.Adapter.UpdateCommand.Parameters[25].Value = System.DBNull.Value;
  838.             }
  839.             this.Adapter.UpdateCommand.Parameters[26].Value = ((int)(ID));
  840.             System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  841.             if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) 
  842.                         != System.Data.ConnectionState.Open)) {
  843.                 this.Adapter.UpdateCommand.Connection.Open();
  844.             }
  845.             try {
  846.                 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  847.                 return returnValue;
  848.             }
  849.             finally {
  850.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  851.                     this.Adapter.UpdateCommand.Connection.Close();
  852.                 }
  853.             }
  854.         }
  855.     }
  856.     
  857.     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
  858.     [System.ComponentModel.DesignerCategoryAttribute("code")]
  859.     [System.ComponentModel.ToolboxItem(true)]
  860.     [System.ComponentModel.DataObjectAttribute(true)]
  861.     [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  862.         ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  863.     [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  864.     public partial class SellTableAdapter : System.ComponentModel.Component {
  865.         
  866.         private System.Data.SqlClient.SqlDataAdapter _adapter;
  867.         
  868.         private System.Data.SqlClient.SqlConnection _connection;
  869.         
  870.         private System.Data.SqlClient.SqlCommand[] _commandCollection;
  871.         
  872.         private bool _clearBeforeFill;
  873.         
  874.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  875.         public SellTableAdapter() {
  876.             this.ClearBeforeFill = true;
  877.         }
  878.         
  879.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  880.         private System.Data.SqlClient.SqlDataAdapter Adapter {
  881.             get {
  882.                 if ((this._adapter == null)) {
  883.                     this.InitAdapter();
  884.                 }
  885.                 return this._adapter;
  886.             }
  887.         }
  888.         
  889.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  890.         internal System.Data.SqlClient.SqlConnection Connection {
  891.             get {
  892.                 if ((this._connection == null)) {
  893.                     this.InitConnection();
  894.                 }
  895.                 return this._connection;
  896.             }
  897.             set {
  898.                 this._connection = value;
  899.                 if ((this.Adapter.InsertCommand != null)) {
  900.                     this.Adapter.InsertCommand.Connection = value;
  901.                 }
  902.                 if ((this.Adapter.DeleteCommand != null)) {
  903.                     this.Adapter.DeleteCommand.Connection = value;
  904.                 }
  905.                 if ((this.Adapter.UpdateCommand != null)) {
  906.                     this.Adapter.UpdateCommand.Connection = value;
  907.                 }
  908.                 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  909.                     if ((this.CommandCollection[i] != null)) {
  910.                         ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  911.                     }
  912.                 }
  913.             }
  914.         }
  915.         
  916.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  917.         protected System.Data.SqlClient.SqlCommand[] CommandCollection {
  918.             get {
  919.                 if ((this._commandCollection == null)) {
  920.                     this.InitCommandCollection();
  921.                 }
  922.                 return this._commandCollection;
  923.             }
  924.         }
  925.         
  926.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  927.         public bool ClearBeforeFill {
  928.             get {
  929.                 return this._clearBeforeFill;
  930.             }
  931.             set {
  932.                 this._clearBeforeFill = value;
  933.             }
  934.         }
  935.         
  936.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  937.         private void InitAdapter() {
  938.             this._adapter = new System.Data.SqlClient.SqlDataAdapter();
  939.             System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
  940.             tableMapping.SourceTable = "Table";
  941.             tableMapping.DataSetTable = "Sell";
  942.             tableMapping.ColumnMappings.Add("ID", "ID");
  943.             tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
  944.             tableMapping.ColumnMappings.Add("Sum", "Sum");
  945.             tableMapping.ColumnMappings.Add("Time", "Time");
  946.             this._adapter.TableMappings.Add(tableMapping);
  947.             this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
  948.             this._adapter.DeleteCommand.Connection = this.Connection;
  949.             this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Sell] WHERE (([ID] = @Original_ID) AND ((@IsNull_CustomerID = " +
  950.                 "1 AND [CustomerID] IS NULL) OR ([CustomerID] = @Original_CustomerID)) AND ([Sum]" +
  951.                 " = @Original_Sum) AND ([Time] = @Original_Time))";
  952.             this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
  953.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  954.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  955.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  956.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Sum", System.Data.SqlDbType.SmallMoney, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  957.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Time", System.Data.SqlDbType.SmallDateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "Time", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  958.             this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
  959.             this._adapter.InsertCommand.Connection = this.Connection;
  960.             this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Sell] ([CustomerID], [Sum], [Time]) VALUES (@CustomerID, @Sum," +
  961.                 " @Time);rnSELECT ID, CustomerID, Sum, Time FROM Sell WHERE (ID = SCOPE_IDENTITY(" +
  962.                 "))";
  963.             this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
  964.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  965.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Sum", System.Data.SqlDbType.SmallMoney, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  966.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Time", System.Data.SqlDbType.SmallDateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "Time", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  967.             this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
  968.             this._adapter.UpdateCommand.Connection = this.Connection;
  969.             this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Sell] SET [CustomerID] = @CustomerID, [Sum] = @Sum, [Time] = @Time WHERE (([ID] = @Original_ID) AND ((@IsNull_CustomerID = 1 AND [CustomerID] IS NULL) OR ([CustomerID] = @Original_CustomerID)) AND ([Sum] = @Original_Sum) AND ([Time] = @Original_Time));
  970. SELECT ID, CustomerID, Sum, Time FROM Sell WHERE (ID = @ID)";
  971.             this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
  972.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  973.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Sum", System.Data.SqlDbType.SmallMoney, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  974.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Time", System.Data.SqlDbType.SmallDateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "Time", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  975.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  976.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  977.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CustomerID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CustomerID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  978.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Sum", System.Data.SqlDbType.SmallMoney, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  979.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Time", System.Data.SqlDbType.SmallDateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "Time", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  980.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  981.         }
  982.         
  983.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  984.         private void InitConnection() {
  985.             this._connection = new System.Data.SqlClient.SqlConnection();
  986.             this._connection.ConnectionString = global::BookStoreMan.Properties.Settings.Default.BookStoreConnectionString;
  987.         }
  988.         
  989.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  990.         private void InitCommandCollection() {
  991.             this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
  992.             this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
  993.             this._commandCollection[0].Connection = this.Connection;
  994.             this._commandCollection[0].CommandText = "SELECT ID, CustomerID, Sum, Time FROM dbo.Sell";
  995.             this._commandCollection[0].CommandType = System.Data.CommandType.Text;
  996.         }
  997.         
  998.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  999.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1000.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
  1001.         public virtual int Fill(BookStoreDataSet.SellDataTable dataTable) {
  1002.             this.Adapter.SelectCommand = this.CommandCollection[0];
  1003.             if ((this.ClearBeforeFill == true)) {
  1004.                 dataTable.Clear();
  1005.             }
  1006.             int returnValue = this.Adapter.Fill(dataTable);
  1007.             return returnValue;
  1008.         }
  1009.         
  1010.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1011.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1012.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
  1013.         public virtual BookStoreDataSet.SellDataTable GetData() {
  1014.             this.Adapter.SelectCommand = this.CommandCollection[0];
  1015.             BookStoreDataSet.SellDataTable dataTable = new BookStoreDataSet.SellDataTable();
  1016.             this.Adapter.Fill(dataTable);
  1017.             return dataTable;
  1018.         }
  1019.         
  1020.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1021.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1022.         public virtual int Update(BookStoreDataSet.SellDataTable dataTable) {
  1023.             return this.Adapter.Update(dataTable);
  1024.         }
  1025.         
  1026.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1027.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1028.         public virtual int Update(BookStoreDataSet dataSet) {
  1029.             return this.Adapter.Update(dataSet, "Sell");
  1030.         }
  1031.         
  1032.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1033.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1034.         public virtual int Update(System.Data.DataRow dataRow) {
  1035.             return this.Adapter.Update(new System.Data.DataRow[] {
  1036.                         dataRow});
  1037.         }
  1038.         
  1039.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1040.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1041.         public virtual int Update(System.Data.DataRow[] dataRows) {
  1042.             return this.Adapter.Update(dataRows);
  1043.         }
  1044.         
  1045.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1046.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1047.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
  1048.         public virtual int Delete(int Original_ID, System.Nullable<int> Original_CustomerID, decimal Original_Sum, System.DateTime Original_Time) {
  1049.             this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  1050.             if ((Original_CustomerID.HasValue == true)) {
  1051.                 this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
  1052.                 this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_CustomerID.Value));
  1053.             }
  1054.             else {
  1055.                 this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
  1056.                 this.Adapter.DeleteCommand.Parameters[2].Value = System.DBNull.Value;
  1057.             }
  1058.             this.Adapter.DeleteCommand.Parameters[3].Value = ((decimal)(Original_Sum));
  1059.             this.Adapter.DeleteCommand.Parameters[4].Value = ((System.DateTime)(Original_Time));
  1060.             System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  1061.             if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) 
  1062.                         != System.Data.ConnectionState.Open)) {
  1063.                 this.Adapter.DeleteCommand.Connection.Open();
  1064.             }
  1065.             try {
  1066.                 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  1067.                 return returnValue;
  1068.             }
  1069.             finally {
  1070.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  1071.                     this.Adapter.DeleteCommand.Connection.Close();
  1072.                 }
  1073.             }
  1074.         }
  1075.         
  1076.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1077.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1078.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
  1079.         public virtual int Insert(System.Nullable<int> CustomerID, decimal Sum, System.DateTime Time) {
  1080.             if ((CustomerID.HasValue == true)) {
  1081.                 this.Adapter.InsertCommand.Parameters[0].Value = ((int)(CustomerID.Value));
  1082.             }
  1083.             else {
  1084.                 this.Adapter.InsertCommand.Parameters[0].Value = System.DBNull.Value;
  1085.             }
  1086.             this.Adapter.InsertCommand.Parameters[1].Value = ((decimal)(Sum));
  1087.             this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(Time));
  1088.             System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  1089.             if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) 
  1090.                         != System.Data.ConnectionState.Open)) {
  1091.                 this.Adapter.InsertCommand.Connection.Open();
  1092.             }
  1093.             try {
  1094.                 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  1095.                 return returnValue;
  1096.             }
  1097.             finally {
  1098.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  1099.                     this.Adapter.InsertCommand.Connection.Close();
  1100.                 }
  1101.             }
  1102.         }
  1103.         
  1104.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1105.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1106.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
  1107.         public virtual int Update(System.Nullable<int> CustomerID, decimal Sum, System.DateTime Time, int Original_ID, System.Nullable<int> Original_CustomerID, decimal Original_Sum, System.DateTime Original_Time, int ID) {
  1108.             if ((CustomerID.HasValue == true)) {
  1109.                 this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(CustomerID.Value));
  1110.             }
  1111.             else {
  1112.                 this.Adapter.UpdateCommand.Parameters[0].Value = System.DBNull.Value;
  1113.             }
  1114.             this.Adapter.UpdateCommand.Parameters[1].Value = ((decimal)(Sum));
  1115.             this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(Time));
  1116.             this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_ID));
  1117.             if ((Original_CustomerID.HasValue == true)) {
  1118.                 this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0));
  1119.                 this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_CustomerID.Value));
  1120.             }
  1121.             else {
  1122.                 this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1));
  1123.                 this.Adapter.UpdateCommand.Parameters[5].Value = System.DBNull.Value;
  1124.             }
  1125.             this.Adapter.UpdateCommand.Parameters[6].Value = ((decimal)(Original_Sum));
  1126.             this.Adapter.UpdateCommand.Parameters[7].Value = ((System.DateTime)(Original_Time));
  1127.             this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(ID));
  1128.             System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  1129.             if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) 
  1130.                         != System.Data.ConnectionState.Open)) {
  1131.                 this.Adapter.UpdateCommand.Connection.Open();
  1132.             }
  1133.             try {
  1134.                 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  1135.                 return returnValue;
  1136.             }
  1137.             finally {
  1138.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  1139.                     this.Adapter.UpdateCommand.Connection.Close();
  1140.                 }
  1141.             }
  1142.         }
  1143.     }
  1144.     
  1145.     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
  1146.     [System.ComponentModel.DesignerCategoryAttribute("code")]
  1147.     [System.ComponentModel.ToolboxItem(true)]
  1148.     [System.ComponentModel.DataObjectAttribute(true)]
  1149.     [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  1150.         ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1151.     [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1152.     public partial class SellItemTableAdapter : System.ComponentModel.Component {
  1153.         
  1154.         private System.Data.SqlClient.SqlDataAdapter _adapter;
  1155.         
  1156.         private System.Data.SqlClient.SqlConnection _connection;
  1157.         
  1158.         private System.Data.SqlClient.SqlCommand[] _commandCollection;
  1159.         
  1160.         private bool _clearBeforeFill;
  1161.         
  1162.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1163.         public SellItemTableAdapter() {
  1164.             this.ClearBeforeFill = true;
  1165.         }
  1166.         
  1167.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1168.         private System.Data.SqlClient.SqlDataAdapter Adapter {
  1169.             get {
  1170.                 if ((this._adapter == null)) {
  1171.                     this.InitAdapter();
  1172.                 }
  1173.                 return this._adapter;
  1174.             }
  1175.         }
  1176.         
  1177.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1178.         internal System.Data.SqlClient.SqlConnection Connection {
  1179.             get {
  1180.                 if ((this._connection == null)) {
  1181.                     this.InitConnection();
  1182.                 }
  1183.                 return this._connection;
  1184.             }
  1185.             set {
  1186.                 this._connection = value;
  1187.                 if ((this.Adapter.InsertCommand != null)) {
  1188.                     this.Adapter.InsertCommand.Connection = value;
  1189.                 }
  1190.                 if ((this.Adapter.DeleteCommand != null)) {
  1191.                     this.Adapter.DeleteCommand.Connection = value;
  1192.                 }
  1193.                 if ((this.Adapter.UpdateCommand != null)) {
  1194.                     this.Adapter.UpdateCommand.Connection = value;
  1195.                 }
  1196.                 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1197.                     if ((this.CommandCollection[i] != null)) {
  1198.                         ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  1199.                     }
  1200.                 }
  1201.             }
  1202.         }
  1203.         
  1204.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1205.         protected System.Data.SqlClient.SqlCommand[] CommandCollection {
  1206.             get {
  1207.                 if ((this._commandCollection == null)) {
  1208.                     this.InitCommandCollection();
  1209.                 }
  1210.                 return this._commandCollection;
  1211.             }
  1212.         }
  1213.         
  1214.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1215.         public bool ClearBeforeFill {
  1216.             get {
  1217.                 return this._clearBeforeFill;
  1218.             }
  1219.             set {
  1220.                 this._clearBeforeFill = value;
  1221.             }
  1222.         }
  1223.         
  1224.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1225.         private void InitAdapter() {
  1226.             this._adapter = new System.Data.SqlClient.SqlDataAdapter();
  1227.             System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
  1228.             tableMapping.SourceTable = "Table";
  1229.             tableMapping.DataSetTable = "SellItem";
  1230.             tableMapping.ColumnMappings.Add("ID", "ID");
  1231.             tableMapping.ColumnMappings.Add("SellID", "SellID");
  1232.             tableMapping.ColumnMappings.Add("BookID", "BookID");
  1233.             tableMapping.ColumnMappings.Add("Number", "Number");
  1234.             tableMapping.ColumnMappings.Add("Discount", "Discount");
  1235.             tableMapping.ColumnMappings.Add("Sum", "Sum");
  1236.             this._adapter.TableMappings.Add(tableMapping);
  1237.             this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand();
  1238.             this._adapter.DeleteCommand.Connection = this.Connection;
  1239.             this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[SellItem] WHERE (([ID] = @Original_ID) AND ([SellID] = @Original_SellID) AND ([BookID] = @Original_BookID) AND ([Number] = @Original_Number) AND ([Discount] = @Original_Discount) AND ((@IsNull_Sum = 1 AND [Sum] IS NULL) OR ([Sum] = @Original_Sum)))";
  1240.             this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text;
  1241.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1242.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SellID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SellID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1243.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BookID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BookID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1244.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Number", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Number", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1245.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Discount", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "Discount", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1246.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Sum", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1247.             this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Sum", System.Data.SqlDbType.SmallMoney, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1248.             this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand();
  1249.             this._adapter.InsertCommand.Connection = this.Connection;
  1250.             this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[SellItem] ([SellID], [BookID], [Number], [Discount], [Sum]) VA" +
  1251.                 "LUES (@SellID, @BookID, @Number, @Discount, @Sum);rnSELECT ID, SellID, BookID, N" +
  1252.                 "umber, Discount, Sum FROM SellItem WHERE (ID = SCOPE_IDENTITY())";
  1253.             this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
  1254.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SellID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SellID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1255.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BookID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BookID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1256.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Number", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Number", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1257.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Discount", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "Discount", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1258.             this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Sum", System.Data.SqlDbType.SmallMoney, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1259.             this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand();
  1260.             this._adapter.UpdateCommand.Connection = this.Connection;
  1261.             this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[SellItem] SET [SellID] = @SellID, [BookID] = @BookID, [Number] = @Number, [Discount] = @Discount, [Sum] = @Sum WHERE (([ID] = @Original_ID) AND ([SellID] = @Original_SellID) AND ([BookID] = @Original_BookID) AND ([Number] = @Original_Number) AND ([Discount] = @Original_Discount) AND ((@IsNull_Sum = 1 AND [Sum] IS NULL) OR ([Sum] = @Original_Sum)));
  1262. SELECT ID, SellID, BookID, Number, Discount, Sum FROM SellItem WHERE (ID = @ID)";
  1263.             this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text;
  1264.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SellID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SellID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1265.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BookID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BookID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1266.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Number", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Number", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1267.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Discount", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "Discount", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1268.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Sum", System.Data.SqlDbType.SmallMoney, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1269.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_ID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1270.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SellID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SellID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1271.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_BookID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "BookID", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1272.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Number", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Number", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1273.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Discount", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "Discount", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1274.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Sum", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Original, true, null, "", "", ""));
  1275.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Sum", System.Data.SqlDbType.SmallMoney, 0, System.Data.ParameterDirection.Input, 0, 0, "Sum", System.Data.DataRowVersion.Original, false, null, "", "", ""));
  1276.             this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1277.         }
  1278.         
  1279.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1280.         private void InitConnection() {
  1281.             this._connection = new System.Data.SqlClient.SqlConnection();
  1282.             this._connection.ConnectionString = global::BookStoreMan.Properties.Settings.Default.BookStoreConnectionString;
  1283.         }
  1284.         
  1285.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1286.         private void InitCommandCollection() {
  1287.             this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
  1288.             this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
  1289.             this._commandCollection[0].Connection = this.Connection;
  1290.             this._commandCollection[0].CommandText = "SELECT ID, SellID, BookID, Number, Discount, Sum FROM dbo.SellItem";
  1291.             this._commandCollection[0].CommandType = System.Data.CommandType.Text;
  1292.         }
  1293.         
  1294.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1295.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1296.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
  1297.         public virtual int Fill(BookStoreDataSet.SellItemDataTable dataTable) {
  1298.             this.Adapter.SelectCommand = this.CommandCollection[0];
  1299.             if ((this.ClearBeforeFill == true)) {
  1300.                 dataTable.Clear();
  1301.             }
  1302.             int returnValue = this.Adapter.Fill(dataTable);
  1303.             return returnValue;
  1304.         }
  1305.         
  1306.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1307.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1308.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
  1309.         public virtual BookStoreDataSet.SellItemDataTable GetData() {
  1310.             this.Adapter.SelectCommand = this.CommandCollection[0];
  1311.             BookStoreDataSet.SellItemDataTable dataTable = new BookStoreDataSet.SellItemDataTable();
  1312.             this.Adapter.Fill(dataTable);
  1313.             return dataTable;
  1314.         }
  1315.         
  1316.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1317.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1318.         public virtual int Update(BookStoreDataSet.SellItemDataTable dataTable) {
  1319.             return this.Adapter.Update(dataTable);
  1320.         }
  1321.         
  1322.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1323.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1324.         public virtual int Update(BookStoreDataSet dataSet) {
  1325.             return this.Adapter.Update(dataSet, "SellItem");
  1326.         }
  1327.         
  1328.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1329.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1330.         public virtual int Update(System.Data.DataRow dataRow) {
  1331.             return this.Adapter.Update(new System.Data.DataRow[] {
  1332.                         dataRow});
  1333.         }
  1334.         
  1335.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1336.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1337.         public virtual int Update(System.Data.DataRow[] dataRows) {
  1338.             return this.Adapter.Update(dataRows);
  1339.         }
  1340.         
  1341.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1342.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1343.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Delete, true)]
  1344.         public virtual int Delete(int Original_ID, int Original_SellID, int Original_BookID, int Original_Number, double Original_Discount, System.Nullable<decimal> Original_Sum) {
  1345.             this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ID));
  1346.             this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_SellID));
  1347.             this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_BookID));
  1348.             this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_Number));
  1349.             this.Adapter.DeleteCommand.Parameters[4].Value = ((double)(Original_Discount));
  1350.             if ((Original_Sum.HasValue == true)) {
  1351.                 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0));
  1352.                 this.Adapter.DeleteCommand.Parameters[6].Value = ((decimal)(Original_Sum.Value));
  1353.             }
  1354.             else {
  1355.                 this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1));
  1356.                 this.Adapter.DeleteCommand.Parameters[6].Value = System.DBNull.Value;
  1357.             }
  1358.             System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
  1359.             if (((this.Adapter.DeleteCommand.Connection.State & System.Data.ConnectionState.Open) 
  1360.                         != System.Data.ConnectionState.Open)) {
  1361.                 this.Adapter.DeleteCommand.Connection.Open();
  1362.             }
  1363.             try {
  1364.                 int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
  1365.                 return returnValue;
  1366.             }
  1367.             finally {
  1368.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  1369.                     this.Adapter.DeleteCommand.Connection.Close();
  1370.                 }
  1371.             }
  1372.         }
  1373.         
  1374.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1375.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1376.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
  1377.         public virtual int Insert(int SellID, int BookID, int Number, double Discount, System.Nullable<decimal> Sum) {
  1378.             this.Adapter.InsertCommand.Parameters[0].Value = ((int)(SellID));
  1379.             this.Adapter.InsertCommand.Parameters[1].Value = ((int)(BookID));
  1380.             this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Number));
  1381.             this.Adapter.InsertCommand.Parameters[3].Value = ((double)(Discount));
  1382.             if ((Sum.HasValue == true)) {
  1383.                 this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(Sum.Value));
  1384.             }
  1385.             else {
  1386.                 this.Adapter.InsertCommand.Parameters[4].Value = System.DBNull.Value;
  1387.             }
  1388.             System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
  1389.             if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open) 
  1390.                         != System.Data.ConnectionState.Open)) {
  1391.                 this.Adapter.InsertCommand.Connection.Open();
  1392.             }
  1393.             try {
  1394.                 int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
  1395.                 return returnValue;
  1396.             }
  1397.             finally {
  1398.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  1399.                     this.Adapter.InsertCommand.Connection.Close();
  1400.                 }
  1401.             }
  1402.         }
  1403.         
  1404.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1405.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1406.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Update, true)]
  1407.         public virtual int Update(int SellID, int BookID, int Number, double Discount, System.Nullable<decimal> Sum, int Original_ID, int Original_SellID, int Original_BookID, int Original_Number, double Original_Discount, System.Nullable<decimal> Original_Sum, int ID) {
  1408.             this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(SellID));
  1409.             this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(BookID));
  1410.             this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Number));
  1411.             this.Adapter.UpdateCommand.Parameters[3].Value = ((double)(Discount));
  1412.             if ((Sum.HasValue == true)) {
  1413.                 this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(Sum.Value));
  1414.             }
  1415.             else {
  1416.                 this.Adapter.UpdateCommand.Parameters[4].Value = System.DBNull.Value;
  1417.             }
  1418.             this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_ID));
  1419.             this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_SellID));
  1420.             this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_BookID));
  1421.             this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_Number));
  1422.             this.Adapter.UpdateCommand.Parameters[9].Value = ((double)(Original_Discount));
  1423.             if ((Original_Sum.HasValue == true)) {
  1424.                 this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0));
  1425.                 this.Adapter.UpdateCommand.Parameters[11].Value = ((decimal)(Original_Sum.Value));
  1426.             }
  1427.             else {
  1428.                 this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1));
  1429.                 this.Adapter.UpdateCommand.Parameters[11].Value = System.DBNull.Value;
  1430.             }
  1431.             this.Adapter.UpdateCommand.Parameters[12].Value = ((int)(ID));
  1432.             System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
  1433.             if (((this.Adapter.UpdateCommand.Connection.State & System.Data.ConnectionState.Open) 
  1434.                         != System.Data.ConnectionState.Open)) {
  1435.                 this.Adapter.UpdateCommand.Connection.Open();
  1436.             }
  1437.             try {
  1438.                 int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
  1439.                 return returnValue;
  1440.             }
  1441.             finally {
  1442.                 if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
  1443.                     this.Adapter.UpdateCommand.Connection.Close();
  1444.                 }
  1445.             }
  1446.         }
  1447.     }
  1448.     
  1449.     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
  1450.     [System.ComponentModel.DesignerCategoryAttribute("code")]
  1451.     [System.ComponentModel.ToolboxItem(true)]
  1452.     [System.ComponentModel.DataObjectAttribute(true)]
  1453.     [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  1454.         ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1455.     [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1456.     public partial class V_BookSellTableAdapter : System.ComponentModel.Component {
  1457.         
  1458.         private System.Data.SqlClient.SqlDataAdapter _adapter;
  1459.         
  1460.         private System.Data.SqlClient.SqlConnection _connection;
  1461.         
  1462.         private System.Data.SqlClient.SqlCommand[] _commandCollection;
  1463.         
  1464.         private bool _clearBeforeFill;
  1465.         
  1466.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1467.         public V_BookSellTableAdapter() {
  1468.             this.ClearBeforeFill = true;
  1469.         }
  1470.         
  1471.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1472.         private System.Data.SqlClient.SqlDataAdapter Adapter {
  1473.             get {
  1474.                 if ((this._adapter == null)) {
  1475.                     this.InitAdapter();
  1476.                 }
  1477.                 return this._adapter;
  1478.             }
  1479.         }
  1480.         
  1481.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1482.         internal System.Data.SqlClient.SqlConnection Connection {
  1483.             get {
  1484.                 if ((this._connection == null)) {
  1485.                     this.InitConnection();
  1486.                 }
  1487.                 return this._connection;
  1488.             }
  1489.             set {
  1490.                 this._connection = value;
  1491.                 if ((this.Adapter.InsertCommand != null)) {
  1492.                     this.Adapter.InsertCommand.Connection = value;
  1493.                 }
  1494.                 if ((this.Adapter.DeleteCommand != null)) {
  1495.                     this.Adapter.DeleteCommand.Connection = value;
  1496.                 }
  1497.                 if ((this.Adapter.UpdateCommand != null)) {
  1498.                     this.Adapter.UpdateCommand.Connection = value;
  1499.                 }
  1500.                 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1501.                     if ((this.CommandCollection[i] != null)) {
  1502.                         ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  1503.                     }
  1504.                 }
  1505.             }
  1506.         }
  1507.         
  1508.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1509.         protected System.Data.SqlClient.SqlCommand[] CommandCollection {
  1510.             get {
  1511.                 if ((this._commandCollection == null)) {
  1512.                     this.InitCommandCollection();
  1513.                 }
  1514.                 return this._commandCollection;
  1515.             }
  1516.         }
  1517.         
  1518.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1519.         public bool ClearBeforeFill {
  1520.             get {
  1521.                 return this._clearBeforeFill;
  1522.             }
  1523.             set {
  1524.                 this._clearBeforeFill = value;
  1525.             }
  1526.         }
  1527.         
  1528.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1529.         private void InitAdapter() {
  1530.             this._adapter = new System.Data.SqlClient.SqlDataAdapter();
  1531.             System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
  1532.             tableMapping.SourceTable = "Table";
  1533.             tableMapping.DataSetTable = "V_BookSell";
  1534.             tableMapping.ColumnMappings.Add("ID", "ID");
  1535.             tableMapping.ColumnMappings.Add("CustomerID", "CustomerID");
  1536.             tableMapping.ColumnMappings.Add("Time", "Time");
  1537.             tableMapping.ColumnMappings.Add("ISBN", "ISBN");
  1538.             tableMapping.ColumnMappings.Add("Name", "Name");
  1539.             tableMapping.ColumnMappings.Add("Press", "Press");
  1540.             tableMapping.ColumnMappings.Add("Price", "Price");
  1541.             tableMapping.ColumnMappings.Add("Number", "Number");
  1542.             tableMapping.ColumnMappings.Add("Discount", "Discount");
  1543.             tableMapping.ColumnMappings.Add("Sum", "Sum");
  1544.             tableMapping.ColumnMappings.Add("SellID", "SellID");
  1545.             this._adapter.TableMappings.Add(tableMapping);
  1546.         }
  1547.         
  1548.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1549.         private void InitConnection() {
  1550.             this._connection = new System.Data.SqlClient.SqlConnection();
  1551.             this._connection.ConnectionString = global::BookStoreMan.Properties.Settings.Default.BookStoreConnectionString;
  1552.         }
  1553.         
  1554.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1555.         private void InitCommandCollection() {
  1556.             this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
  1557.             this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
  1558.             this._commandCollection[0].Connection = this.Connection;
  1559.             this._commandCollection[0].CommandText = "SELECT ID, SellID, CustomerID, Time, ISBN, Name, Press, Price, Number, Discount, " +
  1560.                 "Sum FROM dbo.V_BookSell";
  1561.             this._commandCollection[0].CommandType = System.Data.CommandType.Text;
  1562.         }
  1563.         
  1564.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1565.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1566.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
  1567.         public virtual int Fill(BookStoreDataSet.V_BookSellDataTable dataTable) {
  1568.             this.Adapter.SelectCommand = this.CommandCollection[0];
  1569.             if ((this.ClearBeforeFill == true)) {
  1570.                 dataTable.Clear();
  1571.             }
  1572.             int returnValue = this.Adapter.Fill(dataTable);
  1573.             return returnValue;
  1574.         }
  1575.         
  1576.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1577.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1578.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
  1579.         public virtual BookStoreDataSet.V_BookSellDataTable GetData() {
  1580.             this.Adapter.SelectCommand = this.CommandCollection[0];
  1581.             BookStoreDataSet.V_BookSellDataTable dataTable = new BookStoreDataSet.V_BookSellDataTable();
  1582.             this.Adapter.Fill(dataTable);
  1583.             return dataTable;
  1584.         }
  1585.     }
  1586.     
  1587.     [System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
  1588.     [System.ComponentModel.DesignerCategoryAttribute("code")]
  1589.     [System.ComponentModel.ToolboxItem(true)]
  1590.     [System.ComponentModel.DataObjectAttribute(true)]
  1591.     [System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
  1592.         ", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
  1593.     [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1594.     public partial class P_GetSellDetailTableAdapter : System.ComponentModel.Component {
  1595.         
  1596.         private System.Data.SqlClient.SqlDataAdapter _adapter;
  1597.         
  1598.         private System.Data.SqlClient.SqlConnection _connection;
  1599.         
  1600.         private System.Data.SqlClient.SqlCommand[] _commandCollection;
  1601.         
  1602.         private bool _clearBeforeFill;
  1603.         
  1604.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1605.         public P_GetSellDetailTableAdapter() {
  1606.             this.ClearBeforeFill = true;
  1607.         }
  1608.         
  1609.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1610.         private System.Data.SqlClient.SqlDataAdapter Adapter {
  1611.             get {
  1612.                 if ((this._adapter == null)) {
  1613.                     this.InitAdapter();
  1614.                 }
  1615.                 return this._adapter;
  1616.             }
  1617.         }
  1618.         
  1619.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1620.         internal System.Data.SqlClient.SqlConnection Connection {
  1621.             get {
  1622.                 if ((this._connection == null)) {
  1623.                     this.InitConnection();
  1624.                 }
  1625.                 return this._connection;
  1626.             }
  1627.             set {
  1628.                 this._connection = value;
  1629.                 if ((this.Adapter.InsertCommand != null)) {
  1630.                     this.Adapter.InsertCommand.Connection = value;
  1631.                 }
  1632.                 if ((this.Adapter.DeleteCommand != null)) {
  1633.                     this.Adapter.DeleteCommand.Connection = value;
  1634.                 }
  1635.                 if ((this.Adapter.UpdateCommand != null)) {
  1636.                     this.Adapter.UpdateCommand.Connection = value;
  1637.                 }
  1638.                 for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
  1639.                     if ((this.CommandCollection[i] != null)) {
  1640.                         ((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
  1641.                     }
  1642.                 }
  1643.             }
  1644.         }
  1645.         
  1646.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1647.         protected System.Data.SqlClient.SqlCommand[] CommandCollection {
  1648.             get {
  1649.                 if ((this._commandCollection == null)) {
  1650.                     this.InitCommandCollection();
  1651.                 }
  1652.                 return this._commandCollection;
  1653.             }
  1654.         }
  1655.         
  1656.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1657.         public bool ClearBeforeFill {
  1658.             get {
  1659.                 return this._clearBeforeFill;
  1660.             }
  1661.             set {
  1662.                 this._clearBeforeFill = value;
  1663.             }
  1664.         }
  1665.         
  1666.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1667.         private void InitAdapter() {
  1668.             this._adapter = new System.Data.SqlClient.SqlDataAdapter();
  1669.             System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping();
  1670.             tableMapping.SourceTable = "Table";
  1671.             tableMapping.DataSetTable = "P_GetSellDetail";
  1672.             tableMapping.ColumnMappings.Add("BookID", "BookID");
  1673.             tableMapping.ColumnMappings.Add("ISBN", "ISBN");
  1674.             tableMapping.ColumnMappings.Add("Name", "Name");
  1675.             tableMapping.ColumnMappings.Add("Price", "Price");
  1676.             tableMapping.ColumnMappings.Add("Number", "Number");
  1677.             tableMapping.ColumnMappings.Add("Discount", "Discount");
  1678.             tableMapping.ColumnMappings.Add("Sum", "Sum");
  1679.             this._adapter.TableMappings.Add(tableMapping);
  1680.         }
  1681.         
  1682.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1683.         private void InitConnection() {
  1684.             this._connection = new System.Data.SqlClient.SqlConnection();
  1685.             this._connection.ConnectionString = global::BookStoreMan.Properties.Settings.Default.BookStoreConnectionString;
  1686.         }
  1687.         
  1688.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1689.         private void InitCommandCollection() {
  1690.             this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
  1691.             this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
  1692.             this._commandCollection[0].Connection = this.Connection;
  1693.             this._commandCollection[0].CommandText = "dbo.P_GetSellDetail";
  1694.             this._commandCollection[0].CommandType = System.Data.CommandType.StoredProcedure;
  1695.             this._commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@RETURN_VALUE", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.ReturnValue, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1696.             this._commandCollection[0].Parameters.Add(new System.Data.SqlClient.SqlParameter("@SellID", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 10, 0, null, System.Data.DataRowVersion.Current, false, null, "", "", ""));
  1697.         }
  1698.         
  1699.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1700.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1701.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
  1702.         public virtual int Fill(BookStoreDataSet.P_GetSellDetailDataTable dataTable, System.Nullable<int> SellID) {
  1703.             this.Adapter.SelectCommand = this.CommandCollection[0];
  1704.             if ((SellID.HasValue == true)) {
  1705.                 this.Adapter.SelectCommand.Parameters[1].Value = ((int)(SellID.Value));
  1706.             }
  1707.             else {
  1708.                 this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
  1709.             }
  1710.             if ((this.ClearBeforeFill == true)) {
  1711.                 dataTable.Clear();
  1712.             }
  1713.             int returnValue = this.Adapter.Fill(dataTable);
  1714.             return returnValue;
  1715.         }
  1716.         
  1717.         [System.Diagnostics.DebuggerNonUserCodeAttribute()]
  1718.         [System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
  1719.         [System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
  1720.         public virtual BookStoreDataSet.P_GetSellDetailDataTable GetData(System.Nullable<int> SellID) {
  1721.             this.Adapter.SelectCommand = this.CommandCollection[0];
  1722.             if ((SellID.HasValue == true)) {
  1723.                 this.Adapter.SelectCommand.Parameters[1].Value = ((int)(SellID.Value));
  1724.             }
  1725.             else {
  1726.                 this.Adapter.SelectCommand.Parameters[1].Value = System.DBNull.Value;
  1727.             }
  1728.             BookStoreDataSet.P_GetSellDetailDataTable dataTable = new BookStoreDataSet.P_GetSellDetailDataTable();
  1729.             this.Adapter.Fill(dataTable);
  1730.             return dataTable;
  1731.         }
  1732.     }
  1733. }
  1734. #pragma warning restore 1591