[System.Diagnostics.DebuggerNonUserCodeAttribute()]
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 = "links";
tableMapping.ColumnMappings.Add("link_from", "link_from");
tableMapping.ColumnMappings.Add("link_to", "link_to");
tableMapping.ColumnMappings.Add("link_weight", "link_weight");
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].[links] ([link_from], [link_to], [link_weight]) VALUES (@link_f" +
"rom, @link_to, @link_weight)";
this._adapter.InsertCommand.CommandType = System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@link_from", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "link_from", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@link_to", System.Data.SqlDbType.Int, 0, System.Data.ParameterDirection.Input, 0, 0, "link_to", System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new System.Data.SqlClient.SqlParameter("@link_weight", System.Data.SqlDbType.Float, 0, System.Data.ParameterDirection.Input, 0, 0, "link_weight", System.Data.DataRowVersion.Current, false, null, "", "", ""));
}
private void InitConnection() {
this._connection = new System.Data.SqlClient.SqlConnection();
this._connection.ConnectionString = global::app.Properties.Settings.Default.adbConnectionString;
private void InitCommandCollection() {
this._commandCollection = new System.Data.SqlClient.SqlCommand[1];
this._commandCollection[0] = new System.Data.SqlClient.SqlCommand();
this._commandCollection[0].Connection = this.Connection;
this._commandCollection[0].CommandText = "SELECT link_from, link_to, link_weight FROM dbo.links";
this._commandCollection[0].CommandType = System.Data.CommandType.Text;
[System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Fill, true)]
public virtual int Fill(adbDataSet.linksDataTable dataTable) {
this.Adapter.SelectCommand = this.CommandCollection[0];
if ((this.ClearBeforeFill == true)) {
dataTable.Clear();
int returnValue = this.Adapter.Fill(dataTable);
return returnValue;
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Select, true)]
public virtual adbDataSet.linksDataTable GetData() {
adbDataSet.linksDataTable dataTable = new adbDataSet.linksDataTable();
this.Adapter.Fill(dataTable);
return dataTable;
public virtual int Update(adbDataSet.linksDataTable dataTable) {
return this.Adapter.Update(dataTable);
public virtual int Update(adbDataSet dataSet) {
return this.Adapter.Update(dataSet, "links");
public virtual int Update(System.Data.DataRow dataRow) {
return this.Adapter.Update(new System.Data.DataRow[] {
dataRow});
public virtual int Update(System.Data.DataRow[] dataRows) {
return this.Adapter.Update(dataRows);
[System.ComponentModel.DataObjectMethodAttribute(System.ComponentModel.DataObjectMethodType.Insert, true)]
public virtual int Insert(int link_from, int link_to, System.Nullable<double> link_weight) {
this.Adapter.InsertCommand.Parameters[0].Value = ((int)(link_from));
this.Adapter.InsertCommand.Parameters[1].Value = ((int)(link_to));
if ((link_weight.HasValue == true)) {
this.Adapter.InsertCommand.Parameters[2].Value = ((double)(link_weight.Value));
else {
this.Adapter.InsertCommand.Parameters[2].Value = System.DBNull.Value;
System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
if (((this.Adapter.InsertCommand.Connection.State & System.Data.ConnectionState.Open)
!= System.Data.ConnectionState.Open)) {
this.Adapter.InsertCommand.Connection.Open();
try {
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
finally {
if ((previousConnectionState == System.Data.ConnectionState.Closed)) {
this.Adapter.InsertCommand.Connection.Close();
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "2.0.0.0")]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.ComponentModel.ToolboxItem(true)]
[System.ComponentModel.DataObjectAttribute(true)]
[System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
", Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
public partial class text_identitiesTableAdapter : System.ComponentModel.Component {
private System.Data.SqlClient.SqlDataAdapter _adapter;
private System.Data.SqlClient.SqlConnection _connection;
private System.Data.SqlClient.SqlCommand[] _commandCollection;
private bool _clearBeforeFill;
public text_identitiesTableAdapter() {
this.ClearBeforeFill = true;
private System.Data.SqlClient.SqlDataAdapter Adapter {
get {
if ((this._adapter == null)) {
this.InitAdapter();
return this._adapter;
internal System.Data.SqlClient.SqlConnection Connection {
if ((this._connection == null)) {
this.InitConnection();
return this._connection;
set {
this._connection = value;
if ((this.Adapter.InsertCommand != null)) {
this.Adapter.InsertCommand.Connection = value;
if ((this.Adapter.DeleteCommand != null)) {
this.Adapter.DeleteCommand.Connection = value;
if ((this.Adapter.UpdateCommand != null)) {
this.Adapter.UpdateCommand.Connection = value;
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
if ((this.CommandCollection[i] != null)) {
((System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
protected System.Data.SqlClient.SqlCommand[] CommandCollection {
if ((this._commandCollection == null)) {
this.InitCommandCollection();
return this._commandCollection;
Ñòðàíèöû: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42