/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "TimesheetWaiting"; tableMapping.ColumnMappings.Add("TimesheetID", "TimesheetID"); tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID"); tableMapping.ColumnMappings.Add("FullName", "FullName"); tableMapping.ColumnMappings.Add("PayPeriodID", "PayPeriodID"); tableMapping.ColumnMappings.Add("StartDate", "StartDate"); tableMapping.ColumnMappings.Add("EndDate", "EndDate"); tableMapping.ColumnMappings.Add("ProjectTime", "ProjectTime"); tableMapping.ColumnMappings.Add("Selected", "Selected"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
private void InitAdapter() { this.m_adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Animals"; tableMapping.ColumnMappings.Add("AnimalID", "AnimalID"); tableMapping.ColumnMappings.Add("AnimalName", "AnimalName"); this.m_adapter.TableMappings.Add(tableMapping); this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this.m_adapter.DeleteCommand.Connection = this.Connection; this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Animals] WHERE (([AnimalID] = @Original_AnimalID) AND ([Animal" + "Name] = @Original_AnimalName))"; this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AnimalID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AnimalID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AnimalName", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AnimalName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this.m_adapter.InsertCommand.Connection = this.Connection; this.m_adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Animals] ([AnimalID], [AnimalName]) VALUES (@AnimalID, @Animal" + "Name);\r\nSELECT AnimalID, AnimalName FROM Animals WHERE (AnimalID = @AnimalID)"; this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AnimalID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AnimalID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AnimalName", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AnimalName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this.m_adapter.UpdateCommand.Connection = this.Connection; this.m_adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Animals] SET [AnimalID] = @AnimalID, [AnimalName] = @AnimalName WHE" + "RE (([AnimalID] = @Original_AnimalID) AND ([AnimalName] = @Original_AnimalName))" + ";\r\nSELECT AnimalID, AnimalName FROM Animals WHERE (AnimalID = @AnimalID)"; this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AnimalID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AnimalID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@AnimalName", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AnimalName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AnimalID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "AnimalID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_AnimalName", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "AnimalName", System.Data.DataRowVersion.Original, false, null, "", "", "")); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Explanations"; tableMapping.ColumnMappings.Add("testId", "testId"); tableMapping.ColumnMappings.Add("setId", "setId"); tableMapping.ColumnMappings.Add("questionId", "questionId"); tableMapping.ColumnMappings.Add("answerId", "answerId"); tableMapping.ColumnMappings.Add("explanation", "explanation"); tableMapping.ColumnMappings.Add("answer", "answer"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM explanations\r\nWHERE (id = @id)"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id", System.Data.SqlDbType.BigInt, 8, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO explanations\r\n (questionId, explanation)\r\nVAL" + "UES (@questionId,@explanation)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@questionId", System.Data.SqlDbType.Int, 4, System.Data.ParameterDirection.Input, 0, 0, "questionId", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@explanation", System.Data.SqlDbType.VarChar, 2147483647, System.Data.ParameterDirection.Input, 0, 0, "explanation", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE explanations\r\nSET explanation = @explanation\r\nWHERE " + " (id = @id)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@explanation", System.Data.SqlDbType.VarChar, 2147483647, System.Data.ParameterDirection.Input, 0, 0, "explanation", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id", System.Data.SqlDbType.BigInt, 8, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Original, false, null, "", "", "")); }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "RaLiningPlan"; tableMapping.ColumnMappings.Add("WorkID", "WorkID"); tableMapping.ColumnMappings.Add("AssetID", "AssetID"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("SectionID", "SectionID"); tableMapping.ColumnMappings.Add("Street", "Street"); tableMapping.ColumnMappings.Add("SubArea", "SubArea"); tableMapping.ColumnMappings.Add("USMH", "USMH"); tableMapping.ColumnMappings.Add("DSMH", "DSMH"); tableMapping.ColumnMappings.Add("Date_", "Date_"); tableMapping.ColumnMappings.Add("Flusher", "Flusher"); tableMapping.ColumnMappings.Add("FlusherMN", "FlusherMN"); tableMapping.ColumnMappings.Add("Video", "Video"); tableMapping.ColumnMappings.Add("VideoMN", "VideoMN"); tableMapping.ColumnMappings.Add("Selected", "Selected"); tableMapping.ColumnMappings.Add("USMHDescription", "USMHDescription"); tableMapping.ColumnMappings.Add("DSMHDescription", "DSMHDescription"); tableMapping.ColumnMappings.Add("FlowOrderID", "FlowOrderID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "tb_gasto"; tableMapping.ColumnMappings.Add("id_gasto", "id_gasto"); tableMapping.ColumnMappings.Add("id_personal", "id_personal"); tableMapping.ColumnMappings.Add("id_caja", "id_caja"); tableMapping.ColumnMappings.Add("monto", "monto"); tableMapping.ColumnMappings.Add("concepto", "concepto"); tableMapping.ColumnMappings.Add("observacion", "observacion"); this._adapter.TableMappings.Add(tableMapping); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tb_gasto] ([id_gasto], [id_personal], [id_caja], [monto], [con" + "cepto], [observacion]) VALUES (@id_gasto, @id_personal, @id_caja, @monto, @conce" + "pto, @observacion)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id_gasto", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id_gasto", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id_personal", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id_personal", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id_caja", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id_caja", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@monto", System.Data.SqlDbType.Decimal, 0, System.Data.ParameterDirection.Input, 18, 2, "monto", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@concepto", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "concepto", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@observacion", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "observacion", System.Data.DataRowVersion.Current, false, null, "", "", "")); }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "JlsNavigator"; tableMapping.ColumnMappings.Add("WorkID", "WorkID"); tableMapping.ColumnMappings.Add("AssetID", "AssetID"); tableMapping.ColumnMappings.Add("SectionID", "SectionID"); tableMapping.ColumnMappings.Add("SubArea", "SubArea"); tableMapping.ColumnMappings.Add("Street", "Street"); tableMapping.ColumnMappings.Add("USMH", "USMH"); tableMapping.ColumnMappings.Add("DSMH", "DSMH"); tableMapping.ColumnMappings.Add("USMHID", "USMHID"); tableMapping.ColumnMappings.Add("DSMHID", "DSMHID"); tableMapping.ColumnMappings.Add("Selected", "Selected"); tableMapping.ColumnMappings.Add("FlowOrderID", "FlowOrderID"); tableMapping.ColumnMappings.Add("OriginalSectionID", "OriginalSectionID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "tb_Clientes"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("nome", "nome"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[tb_Clientes] WHERE (([id] = @Original_id) AND ((@IsNull_nome =" + " 1 AND [nome] IS NULL) OR ([nome] = @Original_nome)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; 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, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_nome", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "nome", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_nome", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "nome", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[tb_Clientes] ([nome]) VALUES (@nome);\r\nSELECT id, nome FROM tb" + "_Clientes WHERE (id = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@nome", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "nome", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[tb_Clientes] SET [nome] = @nome WHERE (([id] = @Original_id) AND ((" + "@IsNull_nome = 1 AND [nome] IS NULL) OR ([nome] = @Original_nome)));\r\nSELECT id," + " nome FROM tb_Clientes WHERE (id = @id)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@nome", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "nome", System.Data.DataRowVersion.Current, false, null, "", "", "")); 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_nome", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "nome", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_nome", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "nome", System.Data.DataRowVersion.Original, false, null, "", "", "")); 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, "", "", "")); }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "CompanyLevelsAddNew"; tableMapping.ColumnMappings.Add("CompanyLevelID", "CompanyLevelID"); tableMapping.ColumnMappings.Add("NewCompanyLevelID", "NewCompanyLevelID"); tableMapping.ColumnMappings.Add("Name", "Name"); tableMapping.ColumnMappings.Add("ParentID", "ParentID"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("InDatabase", "InDatabase"); tableMapping.ColumnMappings.Add("UnitsUnitOfMeasurement", "UnitsUnitOfMeasurement"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "DetailedWorkOnHandReport"; tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); tableMapping.ColumnMappings.Add("ProjectName", "ProjectName"); tableMapping.ColumnMappings.Add("GeneralBondingSupplied", "GeneralBondingSupplied"); tableMapping.ColumnMappings.Add("BillMoney", "BillMoney"); tableMapping.ColumnMappings.Add("BillPrice", "BillPrice"); tableMapping.ColumnMappings.Add("EndDate", "EndDate"); tableMapping.ColumnMappings.Add("ExtrasToDate", "ExtrasToDate"); tableMapping.ColumnMappings.Add("CostsIncurred", "CostsIncurred"); tableMapping.ColumnMappings.Add("OriginalProfitEstimated", "OriginalProfitEstimated"); tableMapping.ColumnMappings.Add("TotalAmountIncludingExtras", "TotalAmountIncludingExtras"); tableMapping.ColumnMappings.Add("InvoicedToDate", "InvoicedToDate"); tableMapping.ColumnMappings.Add("ClientName", "ClientName"); tableMapping.ColumnMappings.Add("ClientProjectNumber", "ClientProjectNumber"); tableMapping.ColumnMappings.Add("BondNumber", "BondNumber"); tableMapping.ColumnMappings.Add("LeftToInvoice", "LeftToInvoice"); tableMapping.ColumnMappings.Add("PercentageCompleted", "PercentageCompleted"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "CombinedRevenueInformation"; tableMapping.ColumnMappings.Add("CostingSheetID", "CostingSheetID"); tableMapping.ColumnMappings.Add("RefIDRevenue", "RefIDRevenue"); tableMapping.ColumnMappings.Add("Revenue", "Revenue"); tableMapping.ColumnMappings.Add("Comment", "Comment"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("StartDate", "StartDate"); tableMapping.ColumnMappings.Add("EndDate", "EndDate"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("InDatabase", "InDatabase"); tableMapping.ColumnMappings.Add("FromDatabase", "FromDatabase"); tableMapping.ColumnMappings.Add("ClientID", "ClientID"); tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "OutstandingSalesIssues"; tableMapping.ColumnMappings.Add("AssetID", "AssetID"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); tableMapping.ColumnMappings.Add("SectionID", "SectionID"); tableMapping.ColumnMappings.Add("COMPANIES_ID", "COMPANIES_ID"); tableMapping.ColumnMappings.Add("Street", "Street"); tableMapping.ColumnMappings.Add("USMH", "USMH"); tableMapping.ColumnMappings.Add("DSMH", "DSMH"); tableMapping.ColumnMappings.Add("Comments", "Comments"); tableMapping.ColumnMappings.Add("NAME", "NAME"); tableMapping.ColumnMappings.Add("USMHDescription", "USMHDescription"); tableMapping.ColumnMappings.Add("DSMHDescription", "DSMHDescription"); tableMapping.ColumnMappings.Add("ProjectName", "ProjectName"); tableMapping.ColumnMappings.Add("FlowOrderID", "FlowOrderID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "JlAddLateralsTemp"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("AssetID", "AssetID"); tableMapping.ColumnMappings.Add("SectionWorkID", "SectionWorkID"); tableMapping.ColumnMappings.Add("SectionAssetID", "SectionAssetID"); tableMapping.ColumnMappings.Add("SectionID", "SectionID"); tableMapping.ColumnMappings.Add("LateralID", "LateralID"); tableMapping.ColumnMappings.Add("Address", "Address"); tableMapping.ColumnMappings.Add("DistanceFromUSMH", "DistanceFromUSMH"); tableMapping.ColumnMappings.Add("DistanceFromDSMH", "DistanceFromDSMH"); tableMapping.ColumnMappings.Add("State", "State"); tableMapping.ColumnMappings.Add("InProject", "InProject"); tableMapping.ColumnMappings.Add("InProjectDatabase", "InProjectDatabase"); tableMapping.ColumnMappings.Add("InDatabase", "InDatabase"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "MaterialsByProcessReport"; tableMapping.ColumnMappings.Add("MaterialID", "MaterialID"); tableMapping.ColumnMappings.Add("Description", "Description"); tableMapping.ColumnMappings.Add("Size", "Size"); tableMapping.ColumnMappings.Add("Length", "Length"); tableMapping.ColumnMappings.Add("Thickness", "Thickness"); tableMapping.ColumnMappings.Add("Type", "Type"); tableMapping.ColumnMappings.Add("State", "State"); tableMapping.ColumnMappings.Add("Notes", "Notes"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "QuestionTypes"; tableMapping.ColumnMappings.Add("Id", "Id"); tableMapping.ColumnMappings.Add("Name", "Name"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[QuestionTypes] WHERE (([Id] = @Original_Id) AND ([Name] = @Ori" + "ginal_Name))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; 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, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[QuestionTypes] ([Name]) VALUES (@Name);\r\nSELECT Id, Name FROM " + "QuestionTypes WHERE (Id = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[QuestionTypes] SET [Name] = @Name WHERE (([Id] = @Original_Id) AND " + "([Name] = @Original_Name));\r\nSELECT Id, Name FROM QuestionTypes WHERE (Id = @Id)" + ""; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", "")); 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", "")); 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, "", "", "")); }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "BasicInformation"; tableMapping.ColumnMappings.Add("SupportTicketID", "SupportTicketID"); tableMapping.ColumnMappings.Add("CategoryID", "CategoryID"); tableMapping.ColumnMappings.Add("Subject", "Subject"); tableMapping.ColumnMappings.Add("Comment", "Comment"); tableMapping.ColumnMappings.Add("DueDate", "DueDate"); tableMapping.ColumnMappings.Add("UnitId", "UnitId"); tableMapping.ColumnMappings.Add("TeamMemberID", "TeamMemberID"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("State", "State"); tableMapping.ColumnMappings.Add("CreatedByID", "CreatedByID"); tableMapping.ColumnMappings.Add("Type_", "Type_"); tableMapping.ColumnMappings.Add("CategoryName", "CategoryName"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "WorkAhead"; tableMapping.ColumnMappings.Add("COMPANIES_ID", "COMPANIES_ID"); tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); tableMapping.ColumnMappings.Add("Size_", "Size_"); tableMapping.ColumnMappings.Add("SumScaled", "SumScaled"); tableMapping.ColumnMappings.Add("TotalAhead", "TotalAhead"); tableMapping.ColumnMappings.Add("NAME", "NAME"); tableMapping.ColumnMappings.Add("Nro", "Nro"); tableMapping.ColumnMappings.Add("SumConfirmed", "SumConfirmed"); tableMapping.ColumnMappings.Add("TotalAhead2", "TotalAhead2"); tableMapping.ColumnMappings.Add("ProjectName", "ProjectName"); tableMapping.ColumnMappings.Add("MapLength", "AASS.MapLength"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "DailyProductionReport"; tableMapping.ColumnMappings.Add("AssetID", "AssetID"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); tableMapping.ColumnMappings.Add("ClientID", "ClientID"); tableMapping.ColumnMappings.Add("Name", "Name"); tableMapping.ColumnMappings.Add("COMPANIES_ID", "COMPANIES_ID"); tableMapping.ColumnMappings.Add("SectionID", "SectionID"); tableMapping.ColumnMappings.Add("ProjectName", "ProjectName"); tableMapping.ColumnMappings.Add("FlowOrderID", "FlowOrderID"); tableMapping.ColumnMappings.Add("CountryName", "CountryName"); tableMapping.ColumnMappings.Add("TotalFtInstalled", "TotalFtInstalled"); tableMapping.ColumnMappings.Add("TotalLinersInstalled", "TotalLinersInstalled"); tableMapping.ColumnMappings.Add("TotalLinersBuildNotInstalled", "TotalLinersBuildNotInstalled"); tableMapping.ColumnMappings.Add("Length", "Length"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "bNgayCong"; tableMapping.ColumnMappings.Add("MaNgayCong", "MaNgayCong"); tableMapping.ColumnMappings.Add("SoNgay", "SoNgay"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[bNgayCong] WHERE (([MaNgayCong] = @Original_MaNgayCong) AND ((" + "@IsNull_SoNgay = 1 AND [SoNgay] IS NULL) OR ([SoNgay] = @Original_SoNgay)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaNgayCong", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaNgayCong", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SoNgay", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SoNgay", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SoNgay", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SoNgay", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[bNgayCong] ([MaNgayCong], [SoNgay]) VALUES (@MaNgayCong, @SoNg" + "ay);\r\nSELECT MaNgayCong, SoNgay FROM bNgayCong WHERE (MaNgayCong = @MaNgayCong)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaNgayCong", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaNgayCong", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SoNgay", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SoNgay", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[bNgayCong] SET [MaNgayCong] = @MaNgayCong, [SoNgay] = @SoNgay WHERE (([MaNgayCong] = @Original_MaNgayCong) AND ((@IsNull_SoNgay = 1 AND [SoNgay] IS NULL) OR ([SoNgay] = @Original_SoNgay))); SELECT MaNgayCong, SoNgay FROM bNgayCong WHERE (MaNgayCong = @MaNgayCong)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaNgayCong", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaNgayCong", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SoNgay", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SoNgay", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaNgayCong", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaNgayCong", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SoNgay", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SoNgay", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SoNgay", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SoNgay", System.Data.DataRowVersion.Original, false, null, "", "", "")); }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "WincapBulkUpload"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("State", "State"); tableMapping.ColumnMappings.Add("Direction", "Direction"); tableMapping.ColumnMappings.Add("Distance", "Distance"); tableMapping.ColumnMappings.Add("VideoDistance", "VideoDistance"); tableMapping.ColumnMappings.Add("ClockPosition", "ClockPosition"); tableMapping.ColumnMappings.Add("DistanceToCentre", "DistanceToCentre"); tableMapping.ColumnMappings.Add("ReverseSetup", "ReverseSetup"); tableMapping.ColumnMappings.Add("DistanceFromUSMH", "DistanceFromUSMH"); tableMapping.ColumnMappings.Add("DistanceFromDSMH", "DistanceFromDSMH"); tableMapping.ColumnMappings.Add("Comments", "Comments"); tableMapping.ColumnMappings.Add("SectionID", "SectionID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "LFS_WORK_FULLLENGTHLINING_WETOUT_CATALYSTS"; tableMapping.ColumnMappings.Add("WorkID", "WorkID"); tableMapping.ColumnMappings.Add("RefID", "RefID"); tableMapping.ColumnMappings.Add("CatalystID", "CatalystID"); tableMapping.ColumnMappings.Add("PercentageByWeight", "PercentageByWeight"); tableMapping.ColumnMappings.Add("LbsForMixQuantity", "LbsForMixQuantity"); tableMapping.ColumnMappings.Add("LbsForDrum", "LbsForDrum"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("Name", "Name"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "CusSelect"; tableMapping.ColumnMappings.Add("HotelID", "HotelID"); tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("BookingDate", "BookingDate"); tableMapping.ColumnMappings.Add("MealType", "MealType"); tableMapping.ColumnMappings.Add("RoomType", "RoomType"); tableMapping.ColumnMappings.Add("GuiType", "GuiType"); tableMapping.ColumnMappings.Add("VehType", "VehType"); tableMapping.ColumnMappings.Add("Place", "Place"); this._adapter.TableMappings.Add(tableMapping); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[CusSelect] ([HotelID], [ID], [BookingDate], [MealType], [RoomT" + "ype], [GuiType], [VehType], [Place]) VALUES (@HotelID, @ID, @BookingDate, @MealT" + "ype, @RoomType, @GuiType, @VehType, @Place)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@HotelID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "HotelID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@ID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "ID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@BookingDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "BookingDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MealType", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MealType", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RoomType", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "RoomType", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@GuiType", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "GuiType", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@VehType", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "VehType", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Place", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Place", System.Data.DataRowVersion.Current, false, null, "", "", "")); }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "ToDoListToDoAssignedToMe"; tableMapping.ColumnMappings.Add("ToDoID", "ToDoID"); tableMapping.ColumnMappings.Add("RefID", "RefID"); tableMapping.ColumnMappings.Add("Subject", "Subject"); tableMapping.ColumnMappings.Add("CreationDate", "CreationDate"); tableMapping.ColumnMappings.Add("CreatedByID", "CreatedByID"); tableMapping.ColumnMappings.Add("State", "State"); tableMapping.ColumnMappings.Add("DueDate", "DueDate"); tableMapping.ColumnMappings.Add("UnitID", "UnitID"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("CreatedByFullName", "CreatedByFullName"); tableMapping.ColumnMappings.Add("UnitDescription", "UnitDescription"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.DataSetTable = "OriginalLabourHour"; tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID"); tableMapping.ColumnMappings.Add("EmployeeName", "EmployeeName"); tableMapping.ColumnMappings.Add("Date_", "Date_"); tableMapping.ColumnMappings.Add("ProjectTime", "ProjectTime"); tableMapping.ColumnMappings.Add("WorkingDetails", "WorkingDetails"); tableMapping.ColumnMappings.Add("MealsCountry", "MealsCountry"); tableMapping.ColumnMappings.Add("MealsAllowance", "MealsAllowance"); tableMapping.ColumnMappings.Add("Work_", "Work_"); tableMapping.ColumnMappings.Add("Function_", "Function_"); tableMapping.ColumnMappings.Add("JobClassType", "JobClassType"); tableMapping.ColumnMappings.Add("StartTime", "StartTime"); tableMapping.ColumnMappings.Add("EndTime", "EndTime"); tableMapping.ColumnMappings.Add("ProjectTimeID", "ProjectTimeID"); tableMapping.ColumnMappings.Add("Category", "Category"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "InsuranceCompaniesCosts"; tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); tableMapping.ColumnMappings.Add("RefID", "RefID"); tableMapping.ColumnMappings.Add("InsuranceCompanyID", "InsuranceCompanyID"); tableMapping.ColumnMappings.Add("Date", "Date"); tableMapping.ColumnMappings.Add("InsuranceCompany", "InsuranceCompany"); tableMapping.ColumnMappings.Add("Client", "Client"); tableMapping.ColumnMappings.Add("Project", "Project"); tableMapping.ColumnMappings.Add("RateCad", "RateCad"); tableMapping.ColumnMappings.Add("RateUsd", "RateUsd"); tableMapping.ColumnMappings.Add("Comment", "Comment"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("Selected", "Selected"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "VacationDetails"; tableMapping.ColumnMappings.Add("RequestID", "RequestID"); tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID"); tableMapping.ColumnMappings.Add("StartDate", "StartDate"); tableMapping.ColumnMappings.Add("EndDate", "EndDate"); tableMapping.ColumnMappings.Add("State", "State"); tableMapping.ColumnMappings.Add("TotalDays", "TotalDays"); tableMapping.ColumnMappings.Add("TotalPaidVacationDays", "TotalPaidVacationDays"); tableMapping.ColumnMappings.Add("TotalNoPaidVacationDays", "TotalNoPaidVacationDays"); tableMapping.ColumnMappings.Add("Details", "Details"); tableMapping.ColumnMappings.Add("Comments", "Comments"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "UnitsChecklistRulesTemp"; tableMapping.ColumnMappings.Add("RuleID", "RuleID"); tableMapping.ColumnMappings.Add("Count", "Count"); tableMapping.ColumnMappings.Add("Name", "Name"); tableMapping.ColumnMappings.Add("Frequency", "Frequency"); tableMapping.ColumnMappings.Add("LastService", "LastService"); tableMapping.ColumnMappings.Add("NextDue", "NextDue"); tableMapping.ColumnMappings.Add("Done", "Done"); tableMapping.ColumnMappings.Add("State", "State"); tableMapping.ColumnMappings.Add("Selected", "Selected"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "SalesOverviewReport"; tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); tableMapping.ColumnMappings.Add("CountryID", "CountryID"); tableMapping.ColumnMappings.Add("ProjectNumber", "ProjectNumber"); tableMapping.ColumnMappings.Add("Name", "Name"); tableMapping.ColumnMappings.Add("ClientID", "ClientID"); tableMapping.ColumnMappings.Add("ClientName", "ClientName"); tableMapping.ColumnMappings.Add("ProposalDate", "ProposalDate"); tableMapping.ColumnMappings.Add("StartDate", "StartDate"); tableMapping.ColumnMappings.Add("EndDate", "EndDate"); tableMapping.ColumnMappings.Add("ProjectState", "ProjectState"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "M2_LATERAL"; tableMapping.ColumnMappings.Add("WorkID", "WorkID"); tableMapping.ColumnMappings.Add("Lateral", "Lateral"); tableMapping.ColumnMappings.Add("VideoDistance", "SectionID"); tableMapping.ColumnMappings.Add("ClockPosition", "ClockPosition"); tableMapping.ColumnMappings.Add("State", "State"); tableMapping.ColumnMappings.Add("DistanceToCentre", "DistanceToCentre"); tableMapping.ColumnMappings.Add("Size_", "Size_"); tableMapping.ColumnMappings.Add("TimeOpened", "TimeOpened"); tableMapping.ColumnMappings.Add("Type", "Type"); tableMapping.ColumnMappings.Add("ReverseSetup", "ReverseSetup"); tableMapping.ColumnMappings.Add("Reinstate", "Reinstate"); tableMapping.ColumnMappings.Add("Comments", "Comments"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "ChecklistRulesAddNew"; tableMapping.ColumnMappings.Add("RuleID", "RuleID"); tableMapping.ColumnMappings.Add("Name", "Name"); tableMapping.ColumnMappings.Add("Description", "Description"); tableMapping.ColumnMappings.Add("MTO", "MTO"); tableMapping.ColumnMappings.Add("Frequency", "Frequency"); tableMapping.ColumnMappings.Add("Alarm", "Alarm"); tableMapping.ColumnMappings.Add("AlarmDays", "AlarmDays"); tableMapping.ColumnMappings.Add("ServiceRequest", "ServiceRequest"); tableMapping.ColumnMappings.Add("ServiceRequestDays", "ServiceRequestDays"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.DataSetTable = "OriginalSubcontractor"; tableMapping.ColumnMappings.Add("SubcontractorID", "SubcontractorID"); tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); tableMapping.ColumnMappings.Add("Date_", "Date_"); tableMapping.ColumnMappings.Add("Quantity", "Quantity"); tableMapping.ColumnMappings.Add("RateCad", "RateCad"); tableMapping.ColumnMappings.Add("TotalCad", "TotalCad"); tableMapping.ColumnMappings.Add("RateUsd", "RateUsd"); tableMapping.ColumnMappings.Add("TotalUsd", "TotalUsd"); tableMapping.ColumnMappings.Add("Comment", "Comment"); tableMapping.ColumnMappings.Add("Subcontractor", "Subcontractor"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "LFS_PROJECT_TIME"; tableMapping.ColumnMappings.Add("ProjectTimeID", "ProjectTimeID"); tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID"); tableMapping.ColumnMappings.Add("CompaniesID", "CompaniesID"); tableMapping.ColumnMappings.Add("ProjectID", "ProjectID"); tableMapping.ColumnMappings.Add("Date_", "Date_"); tableMapping.ColumnMappings.Add("ProjectTime", "ProjectTime"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("ClientName", "ClientName"); tableMapping.ColumnMappings.Add("ProjectNumber", "ProjectNumber"); tableMapping.ColumnMappings.Add("ProjectName", "ProjectName"); tableMapping.ColumnMappings.Add("StartTime", "StartTime"); tableMapping.ColumnMappings.Add("EndTime", "EndTime"); tableMapping.ColumnMappings.Add("Selected", "Selected"); tableMapping.ColumnMappings.Add("State", "State"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "LFS_WORK_FULLLENGTHLINING_INVERSION_FIEL_CURE_RECORD"; tableMapping.ColumnMappings.Add("WorkID", "WorkID"); tableMapping.ColumnMappings.Add("RefID", "RefID"); tableMapping.ColumnMappings.Add("ReadingTime", "ReadingTime"); tableMapping.ColumnMappings.Add("HeadFt", "HeadFt"); tableMapping.ColumnMappings.Add("BoilerInF", "BoilerInF"); tableMapping.ColumnMappings.Add("BoilerOutF", "BoilerOutF"); tableMapping.ColumnMappings.Add("PumpFlow", "PumpFlow"); tableMapping.ColumnMappings.Add("PumpPsi", "PumpPsi"); tableMapping.ColumnMappings.Add("MH1Top", "MH1Top"); tableMapping.ColumnMappings.Add("MH1Bot", "MH1Bot"); tableMapping.ColumnMappings.Add("MH2Top", "MH2Top"); tableMapping.ColumnMappings.Add("MH2Bot", "MH2Bot"); tableMapping.ColumnMappings.Add("MH3Top", "MH3Top"); tableMapping.ColumnMappings.Add("MH3Bot", "MH3Bot"); tableMapping.ColumnMappings.Add("MH4Top", "MH4Top"); tableMapping.ColumnMappings.Add("MH4Bot", "MH4Bot"); tableMapping.ColumnMappings.Add("Comments", "Comments"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "PrintEmployeeHoursForRestartWeek"; tableMapping.ColumnMappings.Add("EmployeeID", "EmployeeID"); tableMapping.ColumnMappings.Add("NameEmployee", "NameEmployee"); tableMapping.ColumnMappings.Add("NameCountry", "NameCountry"); tableMapping.ColumnMappings.Add("Date_", "Date_"); tableMapping.ColumnMappings.Add("StartTime", "StartTime"); tableMapping.ColumnMappings.Add("EndTime", "EndTime"); tableMapping.ColumnMappings.Add("Offset", "Offset"); tableMapping.ColumnMappings.Add("ProjectTime", "ProjectTime"); tableMapping.ColumnMappings.Add("Location", "Location"); tableMapping.ColumnMappings.Add("MAUS", "MAUS"); tableMapping.ColumnMappings.Add("MACA", "MACA"); tableMapping.ColumnMappings.Add("WorkingDetails", "WorkingDetails"); tableMapping.ColumnMappings.Add("ProjectTimeState", "ProjectTimeState"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "LateralLocationSheetLateralDetails"; tableMapping.ColumnMappings.Add("AssetID", "AssetID"); tableMapping.ColumnMappings.Add("Address", "Address"); tableMapping.ColumnMappings.Add("LateralID", "LateralID"); tableMapping.ColumnMappings.Add("ConnectionType", "ConnectionType"); tableMapping.ColumnMappings.Add("VideoDistance", "VideoDistance"); tableMapping.ColumnMappings.Add("VideoDistanceDouble", "VideoDistanceDouble"); tableMapping.ColumnMappings.Add("ClockPosition", "ClockPosition"); tableMapping.ColumnMappings.Add("ReverseSetup", "ReverseSetup"); tableMapping.ColumnMappings.Add("ReverseSetupDouble", "ReverseSetupDouble"); tableMapping.ColumnMappings.Add("State", "State"); tableMapping.ColumnMappings.Add("LineLateral", "LineLateral"); tableMapping.ColumnMappings.Add("LinerInstalled", "LinerInstalled"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "ExpiredServiceRequests"; tableMapping.ColumnMappings.Add("ServiceID", "ServiceID"); tableMapping.ColumnMappings.Add("ServiceNumber", "ServiceNumber"); tableMapping.ColumnMappings.Add("UnitCode", "UnitCode"); tableMapping.ColumnMappings.Add("MTO", "MTO"); tableMapping.ColumnMappings.Add("ServiceDescription", "ServiceDescription"); tableMapping.ColumnMappings.Add("UnitDescription", "UnitDescription"); tableMapping.ColumnMappings.Add("RuleName", "RuleName"); tableMapping.ColumnMappings.Add("RuleDescription", "RuleDescription"); tableMapping.ColumnMappings.Add("AssignDateTime", "AssignDateTime"); tableMapping.ColumnMappings.Add("AssignDeadlineDate", "AssignDeadlineDate"); tableMapping.ColumnMappings.Add("AssignedTeamMember", "AssignedTeamMember"); tableMapping.ColumnMappings.Add("AssignThirdPartyVendor", "AssignThirdPartyVendor"); tableMapping.ColumnMappings.Add("CompleteWorkDateTime", "CompleteWorkDateTime"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter (empty) /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "UnitsAddNew"; tableMapping.ColumnMappings.Add("UnitID", "UnitID"); tableMapping.ColumnMappings.Add("Type", "Type"); tableMapping.ColumnMappings.Add("Code", "Code"); tableMapping.ColumnMappings.Add("Description", "Description"); tableMapping.ColumnMappings.Add("VIN", "VIN"); tableMapping.ColumnMappings.Add("Manufacturer", "Manufacturer"); tableMapping.ColumnMappings.Add("Model", "Model"); tableMapping.ColumnMappings.Add("Year_", "Year_"); tableMapping.ColumnMappings.Add("IsTowable", "IsTowable"); tableMapping.ColumnMappings.Add("LicenseCountry", "LicenseCountry"); tableMapping.ColumnMappings.Add("LicenseState", "LicenseState"); tableMapping.ColumnMappings.Add("LicensePlateNumber", "LicensePlateNumber"); tableMapping.ColumnMappings.Add("ApportionedTagNumber", "ApportionedTagNumber"); tableMapping.ColumnMappings.Add("CompanyLevelID", "CompanyLevelID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
/// <summary> /// InitAdapter /// </summary> protected override void InitAdapter() { #region Adapter initialization this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "JunctionLiner2Comment"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("RefID", "RefID"); tableMapping.ColumnMappings.Add("COMPANY_ID", "COMPANY_ID"); tableMapping.ColumnMappings.Add("CommentID", "CommentID"); tableMapping.ColumnMappings.Add("DateTime_", "DateTime_"); tableMapping.ColumnMappings.Add("LoginID", "LoginID"); tableMapping.ColumnMappings.Add("Comment", "Comment"); tableMapping.ColumnMappings.Add("Deleted", "Deleted"); this._adapter.TableMappings.Add(tableMapping); this._adapter.SelectCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.SelectCommand.Connection = DB.Connection; this._adapter.SelectCommand.CommandText = ""; this._adapter.SelectCommand.CommandType = CommandType.Text; #endregion }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Role"; tableMapping.ColumnMappings.Add("ID", "ID"); tableMapping.ColumnMappings.Add("RoleDescription", "RoleDescription"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Role] WHERE (([ID] = @Original_ID) AND ([RoleDescription] = @O" + "riginal_RoleDescription))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; 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, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RoleDescription", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "RoleDescription", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Role] ([RoleDescription]) VALUES (@RoleDescription);\r\nSELECT I" + "D, RoleDescription FROM Role WHERE (ID = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RoleDescription", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "RoleDescription", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[Role] SET [RoleDescription] = @RoleDescription WHERE (([ID] = @Orig" + "inal_ID) AND ([RoleDescription] = @Original_RoleDescription));\r\nSELECT ID, RoleD" + "escription FROM Role WHERE (ID = @ID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@RoleDescription", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "RoleDescription", System.Data.DataRowVersion.Current, false, null, "", "", "")); 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_RoleDescription", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "RoleDescription", System.Data.DataRowVersion.Original, false, null, "", "", "")); 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, "", "", "")); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "KHACHHANG"; tableMapping.ColumnMappings.Add("TEL", "TEL"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[KHACHHANG] WHERE (([TEL] = @Original_TEL))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TEL", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TEL", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[KHACHHANG] ([TEL]) VALUES (@TEL);\r\nSELECT TEL FROM KHACHHANG W" + "HERE (TEL = @TEL)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TEL", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TEL", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[KHACHHANG] SET [TEL] = @TEL WHERE (([TEL] = @Original_TEL));\r\nSELEC" + "T TEL FROM KHACHHANG WHERE (TEL = @TEL)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TEL", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TEL", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TEL", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TEL", System.Data.DataRowVersion.Original, false, null, "", "", "")); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Warehouses"; tableMapping.ColumnMappings.Add("WName", "WName"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "ONLclimbers"; tableMapping.ColumnMappings.Add("iid", "iid"); tableMapping.ColumnMappings.Add("photo", "photo"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "isp_sqlsecure_getguestenabledservers"; tableMapping.ColumnMappings.Add("connectionname", "connectionname"); tableMapping.ColumnMappings.Add("databasename", "databasename"); tableMapping.ColumnMappings.Add("owner", "owner"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.OleDb.OleDbDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "student"; tableMapping.ColumnMappings.Add("Rollno", "Rollno"); tableMapping.ColumnMappings.Add("name", "name"); tableMapping.ColumnMappings.Add("fname", "fname"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.OleDb.OleDbDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "absentdata"; tableMapping.ColumnMappings.Add("studentid", "studentid"); tableMapping.ColumnMappings.Add("stu_name", "stu_name"); tableMapping.ColumnMappings.Add("stu_fname", "stu_fname"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "pdf_download"; tableMapping.ColumnMappings.Add("idx", "idx"); tableMapping.ColumnMappings.Add("name", "name"); tableMapping.ColumnMappings.Add("descr", "descr"); tableMapping.ColumnMappings.Add("filename", "filename"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "acl_function"; tableMapping.ColumnMappings.Add("idx", "idx"); tableMapping.ColumnMappings.Add("name", "name"); tableMapping.ColumnMappings.Add("descr", "descr"); tableMapping.ColumnMappings.Add("deleted", "deleted"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "base_user_info"; tableMapping.ColumnMappings.Add("idx", "idx"); tableMapping.ColumnMappings.Add("guididx", "guididx"); tableMapping.ColumnMappings.Add("login", "login"); tableMapping.ColumnMappings.Add("first_name", "first_name"); tableMapping.ColumnMappings.Add("last_name", "last_name"); tableMapping.ColumnMappings.Add("email", "email"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Goods"; tableMapping.ColumnMappings.Add("GID", "GID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Goods] WHERE (([GID] = @Original_GID))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_GID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "GID", System.Data.DataRowVersion.Original, false, null, "", "", "")); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "binded_tests"; tableMapping.ColumnMappings.Add("idx", "idx"); tableMapping.ColumnMappings.Add("name", "name"); tableMapping.ColumnMappings.Add("chidx", "chidx"); tableMapping.ColumnMappings.Add("ch_name", "ch_name"); tableMapping.ColumnMappings.Add("type", "type"); tableMapping.ColumnMappings.Add("descr", "descr"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Store"; tableMapping.ColumnMappings.Add("SGID", "SGID"); tableMapping.ColumnMappings.Add("SWID", "SWID"); tableMapping.ColumnMappings.Add("STopLine", "STopLine"); tableMapping.ColumnMappings.Add("SbaseLine", "SbaseLine"); tableMapping.ColumnMappings.Add("SQuantity", "SQuantity"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Store] WHERE (([SGID] = @Original_SGID) AND ([SWID] = @Origina" + "l_SWID) AND ([STopLine] = @Original_STopLine) AND ([SbaseLine] = @Original_Sbase" + "Line) AND ([SQuantity] = @Original_SQuantity))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SGID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SGID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SWID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SWID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_STopLine", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "STopLine", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SbaseLine", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "SbaseLine", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SQuantity", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "SQuantity", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Store] ([SGID], [SWID], [STopLine], [SbaseLine], [SQuantity]) " + "VALUES (@SGID, @SWID, @STopLine, @SbaseLine, @SQuantity);\r\nSELECT SGID, SWID, ST" + "opLine, SbaseLine, SQuantity FROM Store WHERE (SGID = @SGID) AND (SWID = @SWID)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SGID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SGID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SWID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SWID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@STopLine", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "STopLine", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SbaseLine", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "SbaseLine", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SQuantity", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "SQuantity", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Store] SET [SGID] = @SGID, [SWID] = @SWID, [STopLine] = @STopLine, [SbaseLine] = @SbaseLine, [SQuantity] = @SQuantity WHERE (([SGID] = @Original_SGID) AND ([SWID] = @Original_SWID) AND ([STopLine] = @Original_STopLine) AND ([SbaseLine] = @Original_SbaseLine) AND ([SQuantity] = @Original_SQuantity)); SELECT SGID, SWID, STopLine, SbaseLine, SQuantity FROM Store WHERE (SGID = @SGID) AND (SWID = @SWID)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SGID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SGID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SWID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SWID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@STopLine", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "STopLine", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SbaseLine", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "SbaseLine", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SQuantity", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "SQuantity", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SGID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SGID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SWID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SWID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_STopLine", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "STopLine", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SbaseLine", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "SbaseLine", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SQuantity", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "SQuantity", System.Data.DataRowVersion.Original, false, null, "", "", "")); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Discovery_OptrakRegion"; tableMapping.ColumnMappings.Add("Id", "Id"); tableMapping.ColumnMappings.Add("Description", "Description"); tableMapping.ColumnMappings.Add("Code", "Code"); tableMapping.ColumnMappings.Add("UpdatedDate", "UpdatedDate"); tableMapping.ColumnMappings.Add("UpdatedBy", "UpdatedBy"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Discovery_OptrakRegion] WHERE (([Id] = @Original_Id) AND ([Descripti" + "on] = @Original_Description) AND ([Code] = @Original_Code) AND ([UpdatedDate] = " + "@Original_UpdatedDate) AND ([UpdatedBy] = @Original_UpdatedBy))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; 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, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Code", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Code", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UpdatedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UpdatedBy", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Discovery_OptrakRegion] ([Description], [Code], [UpdatedDate], [Upda" + "tedBy]) VALUES (@Description, @Code, @UpdatedDate, @UpdatedBy);\r\nSELECT Id, Desc" + "ription, Code, UpdatedDate, UpdatedBy FROM Discovery_OptrakRegion WHERE (Id = SCOPE_ID" + "ENTITY())"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Code", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Code", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UpdatedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UpdatedBy", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Discovery_OptrakRegion] SET [Description] = @Description, [Code] = @Code, [UpdatedDate] = @UpdatedDate, [UpdatedBy] = @UpdatedBy WHERE (([Id] = @Original_Id) AND ([Description] = @Original_Description) AND ([Code] = @Original_Code) AND ([UpdatedDate] = @Original_UpdatedDate) AND ([UpdatedBy] = @Original_UpdatedBy)); SELECT Id, Description, Code, UpdatedDate, UpdatedBy FROM Discovery_OptrakRegion WHERE (Id = @Id)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Code", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Code", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UpdatedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@UpdatedBy", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", System.Data.DataRowVersion.Current, false, null, "", "", "")); 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, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Description", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Description", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Code", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Code", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UpdatedDate", System.Data.SqlDbType.DateTime, 0, System.Data.ParameterDirection.Input, 0, 0, "UpdatedDate", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_UpdatedBy", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "UpdatedBy", System.Data.DataRowVersion.Original, false, null, "", "", "")); 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, "", "", "")); }
private void InitAdapter() { this.m_adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Inventory"; tableMapping.ColumnMappings.Add("CarID", "CarID"); tableMapping.ColumnMappings.Add("Make", "Make"); tableMapping.ColumnMappings.Add("Color", "Color"); tableMapping.ColumnMappings.Add("PetName", "PetName"); this.m_adapter.TableMappings.Add(tableMapping); this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this.m_adapter.DeleteCommand.Connection = this.Connection; this.m_adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Inventory] WHERE (([CarID] = @Original_CarID) AND ((@IsNull_Make = 1 AND [Make] IS NULL) OR ([Make] = @Original_Make)) AND ((@IsNull_Color = 1 AND [Color] IS NULL) OR ([Color] = @Original_Color)) AND ((@IsNull_PetName = 1 AND [PetName] IS NULL) OR ([PetName] = @Original_PetName)))"; this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CarID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CarID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Make", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Make", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Make", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "Make", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Color", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Color", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PetName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PetName", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PetName", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "PetName", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this.m_adapter.InsertCommand.Connection = this.Connection; this.m_adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Inventory] ([CarID], [Make], [Color], [PetName]) VALUES (@CarI" + "D, @Make, @Color, @PetName);\r\nSELECT CarID, Make, Color, PetName FROM Inventory " + "WHERE (CarID = @CarID)"; this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CarID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CarID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Make", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "Make", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Color", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PetName", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "PetName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this.m_adapter.UpdateCommand.Connection = this.Connection; this.m_adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Inventory] SET [CarID] = @CarID, [Make] = @Make, [Color] = @Color, [PetName] = @PetName WHERE (([CarID] = @Original_CarID) AND ((@IsNull_Make = 1 AND [Make] IS NULL) OR ([Make] = @Original_Make)) AND ((@IsNull_Color = 1 AND [Color] IS NULL) OR ([Color] = @Original_Color)) AND ((@IsNull_PetName = 1 AND [PetName] IS NULL) OR ([PetName] = @Original_PetName))); SELECT CarID, Make, Color, PetName FROM Inventory WHERE (CarID = @CarID)"; this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@CarID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CarID", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Make", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "Make", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Color", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@PetName", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "PetName", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_CarID", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "CarID", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Make", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Make", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Make", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "Make", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Color", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Color", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "Color", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_PetName", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "PetName", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_PetName", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "PetName", System.Data.DataRowVersion.Original, false, null, "", "", "")); }
private void InitAdapter() { this._adapter = new System.Data.OleDb.OleDbDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Drzava"; tableMapping.ColumnMappings.Add("OznDrzave", "OznDrzave"); tableMapping.ColumnMappings.Add("NazDrzave", "NazDrzave"); tableMapping.ColumnMappings.Add("ISO3Drzave", "ISO3Drzave"); tableMapping.ColumnMappings.Add("SifDrzave", "SifDrzave"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.OleDb.OleDbCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM `Drzava` WHERE ((`OznDrzave` = ?) AND ((? = 1 AND `NazDrzave` IS NULL" + ") OR (`NazDrzave` = ?)) AND ((? = 1 AND `ISO3Drzave` IS NULL) OR (`ISO3Drzave` =" + " ?)) AND ((? = 1 AND `SifDrzave` IS NULL) OR (`SifDrzave` = ?)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OznDrzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "OznDrzave", System.Data.DataRowVersion.Original, false, null)); this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_NazDrzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazDrzave", System.Data.DataRowVersion.Original, true, null)); this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_NazDrzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazDrzave", System.Data.DataRowVersion.Original, false, null)); this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_ISO3Drzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "ISO3Drzave", System.Data.DataRowVersion.Original, true, null)); this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ISO3Drzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "ISO3Drzave", System.Data.DataRowVersion.Original, false, null)); this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_SifDrzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SifDrzave", System.Data.DataRowVersion.Original, true, null)); this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_SifDrzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SifDrzave", System.Data.DataRowVersion.Original, false, null)); this._adapter.InsertCommand = new System.Data.OleDb.OleDbCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO `Drzava` (`OznDrzave`, `NazDrzave`, `ISO3Drzave`, `SifDrzave`) VALUES" + " (?, ?, ?, ?)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("OznDrzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "OznDrzave", System.Data.DataRowVersion.Current, false, null)); this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("NazDrzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazDrzave", System.Data.DataRowVersion.Current, false, null)); this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("ISO3Drzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "ISO3Drzave", System.Data.DataRowVersion.Current, false, null)); this._adapter.InsertCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("SifDrzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SifDrzave", System.Data.DataRowVersion.Current, false, null)); this._adapter.UpdateCommand = new System.Data.OleDb.OleDbCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE `Drzava` SET `OznDrzave` = ?, `NazDrzave` = ?, `ISO3Drzave` = ?, `SifDrzave` = ? WHERE ((`OznDrzave` = ?) AND ((? = 1 AND `NazDrzave` IS NULL) OR (`NazDrzave` = ?)) AND ((? = 1 AND `ISO3Drzave` IS NULL) OR (`ISO3Drzave` = ?)) AND ((? = 1 AND `SifDrzave` IS NULL) OR (`SifDrzave` = ?)))"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("OznDrzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "OznDrzave", System.Data.DataRowVersion.Current, false, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("NazDrzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazDrzave", System.Data.DataRowVersion.Current, false, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("ISO3Drzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "ISO3Drzave", System.Data.DataRowVersion.Current, false, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("SifDrzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SifDrzave", System.Data.DataRowVersion.Current, false, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_OznDrzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "OznDrzave", System.Data.DataRowVersion.Original, false, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_NazDrzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazDrzave", System.Data.DataRowVersion.Original, true, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_NazDrzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "NazDrzave", System.Data.DataRowVersion.Original, false, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_ISO3Drzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "ISO3Drzave", System.Data.DataRowVersion.Original, true, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ISO3Drzave", System.Data.OleDb.OleDbType.VarWChar, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "ISO3Drzave", System.Data.DataRowVersion.Original, false, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("IsNull_SifDrzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SifDrzave", System.Data.DataRowVersion.Original, true, null)); this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_SifDrzave", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SifDrzave", System.Data.DataRowVersion.Original, false, null)); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "shop_item_group"; tableMapping.ColumnMappings.Add("idx", "idx"); tableMapping.ColumnMappings.Add("name", "name"); this._adapter.TableMappings.Add(tableMapping); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[shop_item_group] ([name]) VALUES (@name);\r\nSELECT idx, name FR" + "OM shop_item_group WHERE (idx = SCOPE_IDENTITY())"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "name", System.Data.DataRowVersion.Current, false, null, "", "", "")); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Counters"; tableMapping.ColumnMappings.Add("id", "id"); tableMapping.ColumnMappings.Add("value", "value"); this._adapter.TableMappings.Add(tableMapping); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Counters] ([id], [value]) VALUES (@id, @value)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@id", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "id", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@value", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "value", System.Data.DataRowVersion.Current, false, null, "", "", "")); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "bKhauTru"; tableMapping.ColumnMappings.Add("MaKhauTru", "MaKhauTru"); tableMapping.ColumnMappings.Add("TenKhauTru", "TenKhauTru"); tableMapping.ColumnMappings.Add("SoTien", "SoTien"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[bKhauTru] WHERE (([MaKhauTru] = @Original_MaKhauTru) AND ((@Is" + "Null_TenKhauTru = 1 AND [TenKhauTru] IS NULL) OR ([TenKhauTru] = @Original_TenKh" + "auTru)) AND ((@IsNull_SoTien = 1 AND [SoTien] IS NULL) OR ([SoTien] = @Original_" + "SoTien)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaKhauTru", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaKhauTru", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TenKhauTru", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TenKhauTru", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TenKhauTru", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TenKhauTru", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SoTien", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SoTien", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SoTien", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "SoTien", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[bKhauTru] ([MaKhauTru], [TenKhauTru], [SoTien]) VALUES (@MaKha" + "uTru, @TenKhauTru, @SoTien);\r\nSELECT MaKhauTru, TenKhauTru, SoTien FROM bKhauTru" + " WHERE (MaKhauTru = @MaKhauTru)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaKhauTru", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaKhauTru", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TenKhauTru", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TenKhauTru", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SoTien", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "SoTien", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[bKhauTru] SET [MaKhauTru] = @MaKhauTru, [TenKhauTru] = @TenKhauTru, [SoTien] = @SoTien WHERE (([MaKhauTru] = @Original_MaKhauTru) AND ((@IsNull_TenKhauTru = 1 AND [TenKhauTru] IS NULL) OR ([TenKhauTru] = @Original_TenKhauTru)) AND ((@IsNull_SoTien = 1 AND [SoTien] IS NULL) OR ([SoTien] = @Original_SoTien))); SELECT MaKhauTru, TenKhauTru, SoTien FROM bKhauTru WHERE (MaKhauTru = @MaKhauTru)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@MaKhauTru", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaKhauTru", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TenKhauTru", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TenKhauTru", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@SoTien", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "SoTien", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_MaKhauTru", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "MaKhauTru", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_TenKhauTru", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "TenKhauTru", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TenKhauTru", System.Data.SqlDbType.NVarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TenKhauTru", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_SoTien", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "SoTien", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_SoTien", System.Data.SqlDbType.Char, 0, System.Data.ParameterDirection.Input, 0, 0, "SoTien", System.Data.DataRowVersion.Original, false, null, "", "", "")); }
private void InitAdapter() { this.m_adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "BankAccounts"; tableMapping.ColumnMappings.Add("Number", "Number"); tableMapping.ColumnMappings.Add("Balance", "Balance"); tableMapping.ColumnMappings.Add("Name", "Name"); this.m_adapter.TableMappings.Add(tableMapping); this.m_adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this.m_adapter.DeleteCommand.Connection = this.Connection; this.m_adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[BankAccounts] WHERE (([Number] = @Original_Number) AND ((@IsNu" + "ll_Balance = 1 AND [Balance] IS NULL) OR ([Balance] = @Original_Balance)) AND ((" + "@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name)))"; this.m_adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this.m_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, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Balance", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Balance", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Balance", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Balance", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Name", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this.m_adapter.InsertCommand.Connection = this.Connection; this.m_adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[BankAccounts] ([Number], [Balance], [Name]) VALUES (@Number, @" + "Balance, @Name);\r\nSELECT Number, Balance, Name FROM BankAccounts WHERE (Number =" + " @Number)"; this.m_adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this.m_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, "", "", "")); this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Balance", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Balance", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this.m_adapter.UpdateCommand.Connection = this.Connection; this.m_adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[BankAccounts] SET [Number] = @Number, [Balance] = @Balance, [Name] = @Name WHERE (([Number] = @Original_Number) AND ((@IsNull_Balance = 1 AND [Balance] IS NULL) OR ([Balance] = @Original_Balance)) AND ((@IsNull_Name = 1 AND [Name] IS NULL) OR ([Name] = @Original_Name))); SELECT Number, Balance, Name FROM BankAccounts WHERE (Number = @Number)"; this.m_adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this.m_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, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Balance", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Balance", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Current, false, null, "", "", "")); this.m_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, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Balance", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Balance", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Balance", System.Data.SqlDbType.Money, 0, System.Data.ParameterDirection.Input, 0, 0, "Balance", System.Data.DataRowVersion.Original, false, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_Name", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, true, null, "", "", "")); this.m_adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_Name", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "Name", System.Data.DataRowVersion.Original, false, null, "", "", "")); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "vSSR"; tableMapping.ColumnMappings.Add("NMComplex", "NMComplex"); tableMapping.ColumnMappings.Add("NMChapter", "NMChapter"); tableMapping.ColumnMappings.Add("idOSR", "idOSR"); tableMapping.ColumnMappings.Add("OrderNom", "OrderNom"); tableMapping.ColumnMappings.Add("OSR", "OSR"); tableMapping.ColumnMappings.Add("NMOSR", "NMOSR"); tableMapping.ColumnMappings.Add("Str", "Str"); tableMapping.ColumnMappings.Add("Mont", "Mont"); tableMapping.ColumnMappings.Add("Obor", "Obor"); tableMapping.ColumnMappings.Add("Proch", "Proch"); tableMapping.ColumnMappings.Add("SumSt", "SumSt"); this._adapter.TableMappings.Add(tableMapping); }
private void InitAdapter() { this._adapter = new System.Data.OleDb.OleDbDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "Products"; tableMapping.ColumnMappings.Add("ID", "ID"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.OleDb.OleDbCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM `Products` WHERE ((`ProductID` = ?))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, false, null)); this._adapter.UpdateCommand = new System.Data.OleDb.OleDbCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = "UPDATE `Products` WHERE ((`ProductID` = ?))"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.OleDb.OleDbParameter("Original_ID", System.Data.OleDb.OleDbType.Integer, 0, System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "ID", System.Data.DataRowVersion.Original, false, null)); }
private void InitAdapter() { this._adapter = new System.Data.SqlClient.SqlDataAdapter(); System.Data.Common.DataTableMapping tableMapping = new System.Data.Common.DataTableMapping(); tableMapping.SourceTable = "Table"; tableMapping.DataSetTable = "KHACHHANG"; tableMapping.ColumnMappings.Add("TEL", "TEL"); tableMapping.ColumnMappings.Add("HOTEN", "HOTEN"); tableMapping.ColumnMappings.Add("DIACHI", "DIACHI"); this._adapter.TableMappings.Add(tableMapping); this._adapter.DeleteCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.DeleteCommand.Connection = this.Connection; this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[KHACHHANG] WHERE (([TEL] = @Original_TEL) AND ((@IsNull_HOTEN " + "= 1 AND [HOTEN] IS NULL) OR ([HOTEN] = @Original_HOTEN)) AND ((@IsNull_DIACHI = " + "1 AND [DIACHI] IS NULL) OR ([DIACHI] = @Original_DIACHI)))"; this._adapter.DeleteCommand.CommandType = System.Data.CommandType.Text; this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TEL", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TEL", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_HOTEN", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "HOTEN", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_HOTEN", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "HOTEN", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_DIACHI", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DIACHI", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.DeleteCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DIACHI", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "DIACHI", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.InsertCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.InsertCommand.Connection = this.Connection; this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[KHACHHANG] ([TEL], [HOTEN], [DIACHI]) VALUES (@TEL, @HOTEN, @D" + "IACHI);\r\nSELECT TEL, HOTEN, DIACHI FROM KHACHHANG WHERE (TEL = @TEL)"; this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text; this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TEL", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TEL", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@HOTEN", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "HOTEN", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DIACHI", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "DIACHI", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand = new System.Data.SqlClient.SqlCommand(); this._adapter.UpdateCommand.Connection = this.Connection; this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[KHACHHANG] SET [TEL] = @TEL, [HOTEN] = @HOTEN, [DIACHI] = @DIACHI WHERE (([TEL] = @Original_TEL) AND ((@IsNull_HOTEN = 1 AND [HOTEN] IS NULL) OR ([HOTEN] = @Original_HOTEN)) AND ((@IsNull_DIACHI = 1 AND [DIACHI] IS NULL) OR ([DIACHI] = @Original_DIACHI))); SELECT TEL, HOTEN, DIACHI FROM KHACHHANG WHERE (TEL = @TEL)"; this._adapter.UpdateCommand.CommandType = System.Data.CommandType.Text; this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@TEL", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TEL", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@HOTEN", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "HOTEN", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@DIACHI", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "DIACHI", System.Data.DataRowVersion.Current, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_TEL", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "TEL", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_HOTEN", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "HOTEN", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_HOTEN", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "HOTEN", System.Data.DataRowVersion.Original, false, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@IsNull_DIACHI", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "DIACHI", System.Data.DataRowVersion.Original, true, null, "", "", "")); this._adapter.UpdateCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@Original_DIACHI", System.Data.SqlDbType.VarChar, 0, System.Data.ParameterDirection.Input, 0, 0, "DIACHI", System.Data.DataRowVersion.Original, false, null, "", "", "")); }