You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
4942 lines
292 KiB
4942 lines
292 KiB
//------------------------------------------------------------------------------
|
|
// <auto-generated>
|
|
// 이 코드는 도구를 사용하여 생성되었습니다.
|
|
// 런타임 버전:4.0.30319.42000
|
|
//
|
|
// 파일 내용을 변경하면 잘못된 동작이 발생할 수 있으며, 코드를 다시 생성하면
|
|
// 이러한 변경 내용이 손실됩니다.
|
|
// </auto-generated>
|
|
//------------------------------------------------------------------------------
|
|
|
|
#pragma warning disable 1591
|
|
|
|
namespace TinyPosEntity {
|
|
|
|
|
|
/// <summary>
|
|
///Represents a strongly typed in-memory cache of data.
|
|
///</summary>
|
|
[global::System.Serializable()]
|
|
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
[global::System.ComponentModel.ToolboxItem(true)]
|
|
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
|
|
[global::System.Xml.Serialization.XmlRootAttribute("TestDatabaseDataSet")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
|
|
public partial class TestDatabaseDataSet : global::System.Data.DataSet {
|
|
|
|
private @__MigrationHistoryDataTable table__MigrationHistory;
|
|
|
|
private ProductsDataTable tableProducts;
|
|
|
|
private ProductTypesDataTable tableProductTypes;
|
|
|
|
private TransactionItemsDataTable tableTransactionItems;
|
|
|
|
private TransactionsDataTable tableTransactions;
|
|
|
|
private global::System.Data.DataRelation _relationFK_dbo_Products_dbo_ProductTypes_ProductType_ProductTypeId;
|
|
|
|
private global::System.Data.DataRelation _relationFK_dbo_TransactionItems_dbo_Products_Product_ProductId;
|
|
|
|
private global::System.Data.DataRelation _relationFK_dbo_TransactionItems_dbo_Transactions_Transaction_TransactionId;
|
|
|
|
private global::System.Data.SchemaSerializationMode _schemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TestDatabaseDataSet() {
|
|
this.BeginInit();
|
|
this.InitClass();
|
|
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
|
|
base.Tables.CollectionChanged += schemaChangedHandler;
|
|
base.Relations.CollectionChanged += schemaChangedHandler;
|
|
this.EndInit();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected TestDatabaseDataSet(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
|
|
base(info, context, false) {
|
|
if ((this.IsBinarySerialized(info, context) == true)) {
|
|
this.InitVars(false);
|
|
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler1 = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
|
|
this.Tables.CollectionChanged += schemaChangedHandler1;
|
|
this.Relations.CollectionChanged += schemaChangedHandler1;
|
|
return;
|
|
}
|
|
string strSchema = ((string)(info.GetValue("XmlSchema", typeof(string))));
|
|
if ((this.DetermineSchemaSerializationMode(info, context) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
|
|
global::System.Data.DataSet ds = new global::System.Data.DataSet();
|
|
ds.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
|
|
if ((ds.Tables["__MigrationHistory"] != null)) {
|
|
base.Tables.Add(new @__MigrationHistoryDataTable(ds.Tables["__MigrationHistory"]));
|
|
}
|
|
if ((ds.Tables["Products"] != null)) {
|
|
base.Tables.Add(new ProductsDataTable(ds.Tables["Products"]));
|
|
}
|
|
if ((ds.Tables["ProductTypes"] != null)) {
|
|
base.Tables.Add(new ProductTypesDataTable(ds.Tables["ProductTypes"]));
|
|
}
|
|
if ((ds.Tables["TransactionItems"] != null)) {
|
|
base.Tables.Add(new TransactionItemsDataTable(ds.Tables["TransactionItems"]));
|
|
}
|
|
if ((ds.Tables["Transactions"] != null)) {
|
|
base.Tables.Add(new TransactionsDataTable(ds.Tables["Transactions"]));
|
|
}
|
|
this.DataSetName = ds.DataSetName;
|
|
this.Prefix = ds.Prefix;
|
|
this.Namespace = ds.Namespace;
|
|
this.Locale = ds.Locale;
|
|
this.CaseSensitive = ds.CaseSensitive;
|
|
this.EnforceConstraints = ds.EnforceConstraints;
|
|
this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
|
|
this.InitVars();
|
|
}
|
|
else {
|
|
this.ReadXmlSchema(new global::System.Xml.XmlTextReader(new global::System.IO.StringReader(strSchema)));
|
|
}
|
|
this.GetSerializationData(info, context);
|
|
global::System.ComponentModel.CollectionChangeEventHandler schemaChangedHandler = new global::System.ComponentModel.CollectionChangeEventHandler(this.SchemaChanged);
|
|
base.Tables.CollectionChanged += schemaChangedHandler;
|
|
this.Relations.CollectionChanged += schemaChangedHandler;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
|
|
public @__MigrationHistoryDataTable @__MigrationHistory {
|
|
get {
|
|
return this.table__MigrationHistory;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
|
|
public ProductsDataTable Products {
|
|
get {
|
|
return this.tableProducts;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
|
|
public ProductTypesDataTable ProductTypes {
|
|
get {
|
|
return this.tableProductTypes;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
|
|
public TransactionItemsDataTable TransactionItems {
|
|
get {
|
|
return this.tableTransactionItems;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
[global::System.ComponentModel.DesignerSerializationVisibility(global::System.ComponentModel.DesignerSerializationVisibility.Content)]
|
|
public TransactionsDataTable Transactions {
|
|
get {
|
|
return this.tableTransactions;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.BrowsableAttribute(true)]
|
|
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Visible)]
|
|
public override global::System.Data.SchemaSerializationMode SchemaSerializationMode {
|
|
get {
|
|
return this._schemaSerializationMode;
|
|
}
|
|
set {
|
|
this._schemaSerializationMode = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
|
|
public new global::System.Data.DataTableCollection Tables {
|
|
get {
|
|
return base.Tables;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.DesignerSerializationVisibilityAttribute(global::System.ComponentModel.DesignerSerializationVisibility.Hidden)]
|
|
public new global::System.Data.DataRelationCollection Relations {
|
|
get {
|
|
return base.Relations;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void InitializeDerivedDataSet() {
|
|
this.BeginInit();
|
|
this.InitClass();
|
|
this.EndInit();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public override global::System.Data.DataSet Clone() {
|
|
TestDatabaseDataSet cln = ((TestDatabaseDataSet)(base.Clone()));
|
|
cln.InitVars();
|
|
cln.SchemaSerializationMode = this.SchemaSerializationMode;
|
|
return cln;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override bool ShouldSerializeTables() {
|
|
return false;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override bool ShouldSerializeRelations() {
|
|
return false;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void ReadXmlSerializable(global::System.Xml.XmlReader reader) {
|
|
if ((this.DetermineSchemaSerializationMode(reader) == global::System.Data.SchemaSerializationMode.IncludeSchema)) {
|
|
this.Reset();
|
|
global::System.Data.DataSet ds = new global::System.Data.DataSet();
|
|
ds.ReadXml(reader);
|
|
if ((ds.Tables["__MigrationHistory"] != null)) {
|
|
base.Tables.Add(new @__MigrationHistoryDataTable(ds.Tables["__MigrationHistory"]));
|
|
}
|
|
if ((ds.Tables["Products"] != null)) {
|
|
base.Tables.Add(new ProductsDataTable(ds.Tables["Products"]));
|
|
}
|
|
if ((ds.Tables["ProductTypes"] != null)) {
|
|
base.Tables.Add(new ProductTypesDataTable(ds.Tables["ProductTypes"]));
|
|
}
|
|
if ((ds.Tables["TransactionItems"] != null)) {
|
|
base.Tables.Add(new TransactionItemsDataTable(ds.Tables["TransactionItems"]));
|
|
}
|
|
if ((ds.Tables["Transactions"] != null)) {
|
|
base.Tables.Add(new TransactionsDataTable(ds.Tables["Transactions"]));
|
|
}
|
|
this.DataSetName = ds.DataSetName;
|
|
this.Prefix = ds.Prefix;
|
|
this.Namespace = ds.Namespace;
|
|
this.Locale = ds.Locale;
|
|
this.CaseSensitive = ds.CaseSensitive;
|
|
this.EnforceConstraints = ds.EnforceConstraints;
|
|
this.Merge(ds, false, global::System.Data.MissingSchemaAction.Add);
|
|
this.InitVars();
|
|
}
|
|
else {
|
|
this.ReadXml(reader);
|
|
this.InitVars();
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Xml.Schema.XmlSchema GetSchemaSerializable() {
|
|
global::System.IO.MemoryStream stream = new global::System.IO.MemoryStream();
|
|
this.WriteXmlSchema(new global::System.Xml.XmlTextWriter(stream, null));
|
|
stream.Position = 0;
|
|
return global::System.Xml.Schema.XmlSchema.Read(new global::System.Xml.XmlTextReader(stream), null);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal void InitVars() {
|
|
this.InitVars(true);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal void InitVars(bool initTable) {
|
|
this.table__MigrationHistory = ((@__MigrationHistoryDataTable)(base.Tables["__MigrationHistory"]));
|
|
if ((initTable == true)) {
|
|
if ((this.table__MigrationHistory != null)) {
|
|
this.table__MigrationHistory.InitVars();
|
|
}
|
|
}
|
|
this.tableProducts = ((ProductsDataTable)(base.Tables["Products"]));
|
|
if ((initTable == true)) {
|
|
if ((this.tableProducts != null)) {
|
|
this.tableProducts.InitVars();
|
|
}
|
|
}
|
|
this.tableProductTypes = ((ProductTypesDataTable)(base.Tables["ProductTypes"]));
|
|
if ((initTable == true)) {
|
|
if ((this.tableProductTypes != null)) {
|
|
this.tableProductTypes.InitVars();
|
|
}
|
|
}
|
|
this.tableTransactionItems = ((TransactionItemsDataTable)(base.Tables["TransactionItems"]));
|
|
if ((initTable == true)) {
|
|
if ((this.tableTransactionItems != null)) {
|
|
this.tableTransactionItems.InitVars();
|
|
}
|
|
}
|
|
this.tableTransactions = ((TransactionsDataTable)(base.Tables["Transactions"]));
|
|
if ((initTable == true)) {
|
|
if ((this.tableTransactions != null)) {
|
|
this.tableTransactions.InitVars();
|
|
}
|
|
}
|
|
this._relationFK_dbo_Products_dbo_ProductTypes_ProductType_ProductTypeId = this.Relations["FK_dbo.Products_dbo.ProductTypes_ProductType_ProductTypeId"];
|
|
this._relationFK_dbo_TransactionItems_dbo_Products_Product_ProductId = this.Relations["FK_dbo.TransactionItems_dbo.Products_Product_ProductId"];
|
|
this._relationFK_dbo_TransactionItems_dbo_Transactions_Transaction_TransactionId = this.Relations["FK_dbo.TransactionItems_dbo.Transactions_Transaction_TransactionId"];
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitClass() {
|
|
this.DataSetName = "TestDatabaseDataSet";
|
|
this.Prefix = "";
|
|
this.Namespace = "http://tempuri.org/TestDatabaseDataSet.xsd";
|
|
this.EnforceConstraints = true;
|
|
this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
|
|
this.table__MigrationHistory = new @__MigrationHistoryDataTable();
|
|
base.Tables.Add(this.table__MigrationHistory);
|
|
this.tableProducts = new ProductsDataTable();
|
|
base.Tables.Add(this.tableProducts);
|
|
this.tableProductTypes = new ProductTypesDataTable();
|
|
base.Tables.Add(this.tableProductTypes);
|
|
this.tableTransactionItems = new TransactionItemsDataTable();
|
|
base.Tables.Add(this.tableTransactionItems);
|
|
this.tableTransactions = new TransactionsDataTable();
|
|
base.Tables.Add(this.tableTransactions);
|
|
this._relationFK_dbo_Products_dbo_ProductTypes_ProductType_ProductTypeId = new global::System.Data.DataRelation("FK_dbo.Products_dbo.ProductTypes_ProductType_ProductTypeId", new global::System.Data.DataColumn[] {
|
|
this.tableProductTypes.ProductTypeIdColumn}, new global::System.Data.DataColumn[] {
|
|
this.tableProducts.ProductType_ProductTypeIdColumn}, false);
|
|
this.Relations.Add(this._relationFK_dbo_Products_dbo_ProductTypes_ProductType_ProductTypeId);
|
|
this._relationFK_dbo_TransactionItems_dbo_Products_Product_ProductId = new global::System.Data.DataRelation("FK_dbo.TransactionItems_dbo.Products_Product_ProductId", new global::System.Data.DataColumn[] {
|
|
this.tableProducts.ProductIdColumn}, new global::System.Data.DataColumn[] {
|
|
this.tableTransactionItems.Product_ProductIdColumn}, false);
|
|
this.Relations.Add(this._relationFK_dbo_TransactionItems_dbo_Products_Product_ProductId);
|
|
this._relationFK_dbo_TransactionItems_dbo_Transactions_Transaction_TransactionId = new global::System.Data.DataRelation("FK_dbo.TransactionItems_dbo.Transactions_Transaction_TransactionId", new global::System.Data.DataColumn[] {
|
|
this.tableTransactions.TransactionIdColumn}, new global::System.Data.DataColumn[] {
|
|
this.tableTransactionItems.Transaction_TransactionIdColumn}, false);
|
|
this.Relations.Add(this._relationFK_dbo_TransactionItems_dbo_Transactions_Transaction_TransactionId);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private bool ShouldSerialize__MigrationHistory() {
|
|
return false;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private bool ShouldSerializeProducts() {
|
|
return false;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private bool ShouldSerializeProductTypes() {
|
|
return false;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private bool ShouldSerializeTransactionItems() {
|
|
return false;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private bool ShouldSerializeTransactions() {
|
|
return false;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void SchemaChanged(object sender, global::System.ComponentModel.CollectionChangeEventArgs e) {
|
|
if ((e.Action == global::System.ComponentModel.CollectionChangeAction.Remove)) {
|
|
this.InitVars();
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedDataSetSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
|
|
TestDatabaseDataSet ds = new TestDatabaseDataSet();
|
|
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
|
|
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
|
|
global::System.Xml.Schema.XmlSchemaAny any = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any.Namespace = ds.Namespace;
|
|
sequence.Items.Add(any);
|
|
type.Particle = sequence;
|
|
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
|
|
if (xs.Contains(dsSchema.TargetNamespace)) {
|
|
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
|
|
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
|
|
try {
|
|
global::System.Xml.Schema.XmlSchema schema = null;
|
|
dsSchema.Write(s1);
|
|
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
|
|
schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
|
|
s2.SetLength(0);
|
|
schema.Write(s2);
|
|
if ((s1.Length == s2.Length)) {
|
|
s1.Position = 0;
|
|
s2.Position = 0;
|
|
for (; ((s1.Position != s1.Length)
|
|
&& (s1.ReadByte() == s2.ReadByte())); ) {
|
|
;
|
|
}
|
|
if ((s1.Position == s1.Length)) {
|
|
return type;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
finally {
|
|
if ((s1 != null)) {
|
|
s1.Close();
|
|
}
|
|
if ((s2 != null)) {
|
|
s2.Close();
|
|
}
|
|
}
|
|
}
|
|
xs.Add(dsSchema);
|
|
return type;
|
|
}
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public delegate void @__MigrationHistoryRowChangeEventHandler(object sender, @__MigrationHistoryRowChangeEvent e);
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public delegate void ProductsRowChangeEventHandler(object sender, ProductsRowChangeEvent e);
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public delegate void ProductTypesRowChangeEventHandler(object sender, ProductTypesRowChangeEvent e);
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public delegate void TransactionItemsRowChangeEventHandler(object sender, TransactionItemsRowChangeEvent e);
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public delegate void TransactionsRowChangeEventHandler(object sender, TransactionsRowChangeEvent e);
|
|
|
|
/// <summary>
|
|
///Represents the strongly named DataTable class.
|
|
///</summary>
|
|
[global::System.Serializable()]
|
|
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
|
|
public partial class @__MigrationHistoryDataTable : global::System.Data.TypedTableBase<@__MigrationHistoryRow> {
|
|
|
|
private global::System.Data.DataColumn columnMigrationId;
|
|
|
|
private global::System.Data.DataColumn columnContextKey;
|
|
|
|
private global::System.Data.DataColumn columnModel;
|
|
|
|
private global::System.Data.DataColumn columnProductVersion;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public @__MigrationHistoryDataTable() {
|
|
this.TableName = "__MigrationHistory";
|
|
this.BeginInit();
|
|
this.InitClass();
|
|
this.EndInit();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal @__MigrationHistoryDataTable(global::System.Data.DataTable table) {
|
|
this.TableName = table.TableName;
|
|
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
|
|
this.CaseSensitive = table.CaseSensitive;
|
|
}
|
|
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
|
|
this.Locale = table.Locale;
|
|
}
|
|
if ((table.Namespace != table.DataSet.Namespace)) {
|
|
this.Namespace = table.Namespace;
|
|
}
|
|
this.Prefix = table.Prefix;
|
|
this.MinimumCapacity = table.MinimumCapacity;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected @__MigrationHistoryDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
|
|
base(info, context) {
|
|
this.InitVars();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn MigrationIdColumn {
|
|
get {
|
|
return this.columnMigrationId;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn ContextKeyColumn {
|
|
get {
|
|
return this.columnContextKey;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn ModelColumn {
|
|
get {
|
|
return this.columnModel;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn ProductVersionColumn {
|
|
get {
|
|
return this.columnProductVersion;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
public int Count {
|
|
get {
|
|
return this.Rows.Count;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public @__MigrationHistoryRow this[int index] {
|
|
get {
|
|
return ((@__MigrationHistoryRow)(this.Rows[index]));
|
|
}
|
|
}
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event @__MigrationHistoryRowChangeEventHandler @__MigrationHistoryRowChanging;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event @__MigrationHistoryRowChangeEventHandler @__MigrationHistoryRowChanged;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event @__MigrationHistoryRowChangeEventHandler @__MigrationHistoryRowDeleting;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event @__MigrationHistoryRowChangeEventHandler @__MigrationHistoryRowDeleted;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void Add__MigrationHistoryRow(@__MigrationHistoryRow row) {
|
|
this.Rows.Add(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public @__MigrationHistoryRow Add__MigrationHistoryRow(string MigrationId, string ContextKey, byte[] Model, string ProductVersion) {
|
|
@__MigrationHistoryRow row__MigrationHistoryRow = ((@__MigrationHistoryRow)(this.NewRow()));
|
|
object[] columnValuesArray = new object[] {
|
|
MigrationId,
|
|
ContextKey,
|
|
Model,
|
|
ProductVersion};
|
|
row__MigrationHistoryRow.ItemArray = columnValuesArray;
|
|
this.Rows.Add(row__MigrationHistoryRow);
|
|
return row__MigrationHistoryRow;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public @__MigrationHistoryRow FindByMigrationIdContextKey(string MigrationId, string ContextKey) {
|
|
return ((@__MigrationHistoryRow)(this.Rows.Find(new object[] {
|
|
MigrationId,
|
|
ContextKey})));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public override global::System.Data.DataTable Clone() {
|
|
@__MigrationHistoryDataTable cln = ((@__MigrationHistoryDataTable)(base.Clone()));
|
|
cln.InitVars();
|
|
return cln;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataTable CreateInstance() {
|
|
return new @__MigrationHistoryDataTable();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal void InitVars() {
|
|
this.columnMigrationId = base.Columns["MigrationId"];
|
|
this.columnContextKey = base.Columns["ContextKey"];
|
|
this.columnModel = base.Columns["Model"];
|
|
this.columnProductVersion = base.Columns["ProductVersion"];
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitClass() {
|
|
this.columnMigrationId = new global::System.Data.DataColumn("MigrationId", typeof(string), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnMigrationId);
|
|
this.columnContextKey = new global::System.Data.DataColumn("ContextKey", typeof(string), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnContextKey);
|
|
this.columnModel = new global::System.Data.DataColumn("Model", typeof(byte[]), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnModel);
|
|
this.columnProductVersion = new global::System.Data.DataColumn("ProductVersion", typeof(string), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnProductVersion);
|
|
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
|
|
this.columnMigrationId,
|
|
this.columnContextKey}, true));
|
|
this.columnMigrationId.AllowDBNull = false;
|
|
this.columnMigrationId.MaxLength = 150;
|
|
this.columnContextKey.AllowDBNull = false;
|
|
this.columnContextKey.MaxLength = 300;
|
|
this.columnModel.AllowDBNull = false;
|
|
this.columnProductVersion.AllowDBNull = false;
|
|
this.columnProductVersion.MaxLength = 32;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public @__MigrationHistoryRow New__MigrationHistoryRow() {
|
|
return ((@__MigrationHistoryRow)(this.NewRow()));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
|
|
return new @__MigrationHistoryRow(builder);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Type GetRowType() {
|
|
return typeof(@__MigrationHistoryRow);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanged(e);
|
|
if ((this.@__MigrationHistoryRowChanged != null)) {
|
|
this.@__MigrationHistoryRowChanged(this, new @__MigrationHistoryRowChangeEvent(((@__MigrationHistoryRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanging(e);
|
|
if ((this.@__MigrationHistoryRowChanging != null)) {
|
|
this.@__MigrationHistoryRowChanging(this, new @__MigrationHistoryRowChangeEvent(((@__MigrationHistoryRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleted(e);
|
|
if ((this.@__MigrationHistoryRowDeleted != null)) {
|
|
this.@__MigrationHistoryRowDeleted(this, new @__MigrationHistoryRowChangeEvent(((@__MigrationHistoryRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleting(e);
|
|
if ((this.@__MigrationHistoryRowDeleting != null)) {
|
|
this.@__MigrationHistoryRowDeleting(this, new @__MigrationHistoryRowChangeEvent(((@__MigrationHistoryRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void Remove__MigrationHistoryRow(@__MigrationHistoryRow row) {
|
|
this.Rows.Remove(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
|
|
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
|
|
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
|
|
TestDatabaseDataSet ds = new TestDatabaseDataSet();
|
|
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
|
|
any1.MinOccurs = new decimal(0);
|
|
any1.MaxOccurs = decimal.MaxValue;
|
|
any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any1);
|
|
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
|
|
any2.MinOccurs = new decimal(1);
|
|
any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any2);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute1.Name = "namespace";
|
|
attribute1.FixedValue = ds.Namespace;
|
|
type.Attributes.Add(attribute1);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute2.Name = "tableTypeName";
|
|
attribute2.FixedValue = "__MigrationHistoryDataTable";
|
|
type.Attributes.Add(attribute2);
|
|
type.Particle = sequence;
|
|
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
|
|
if (xs.Contains(dsSchema.TargetNamespace)) {
|
|
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
|
|
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
|
|
try {
|
|
global::System.Xml.Schema.XmlSchema schema = null;
|
|
dsSchema.Write(s1);
|
|
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
|
|
schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
|
|
s2.SetLength(0);
|
|
schema.Write(s2);
|
|
if ((s1.Length == s2.Length)) {
|
|
s1.Position = 0;
|
|
s2.Position = 0;
|
|
for (; ((s1.Position != s1.Length)
|
|
&& (s1.ReadByte() == s2.ReadByte())); ) {
|
|
;
|
|
}
|
|
if ((s1.Position == s1.Length)) {
|
|
return type;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
finally {
|
|
if ((s1 != null)) {
|
|
s1.Close();
|
|
}
|
|
if ((s2 != null)) {
|
|
s2.Close();
|
|
}
|
|
}
|
|
}
|
|
xs.Add(dsSchema);
|
|
return type;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents the strongly named DataTable class.
|
|
///</summary>
|
|
[global::System.Serializable()]
|
|
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
|
|
public partial class ProductsDataTable : global::System.Data.TypedTableBase<ProductsRow> {
|
|
|
|
private global::System.Data.DataColumn columnProductId;
|
|
|
|
private global::System.Data.DataColumn columnName;
|
|
|
|
private global::System.Data.DataColumn columnPrice;
|
|
|
|
private global::System.Data.DataColumn columnBarcode;
|
|
|
|
private global::System.Data.DataColumn columnProductType_ProductTypeId;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsDataTable() {
|
|
this.TableName = "Products";
|
|
this.BeginInit();
|
|
this.InitClass();
|
|
this.EndInit();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal ProductsDataTable(global::System.Data.DataTable table) {
|
|
this.TableName = table.TableName;
|
|
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
|
|
this.CaseSensitive = table.CaseSensitive;
|
|
}
|
|
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
|
|
this.Locale = table.Locale;
|
|
}
|
|
if ((table.Namespace != table.DataSet.Namespace)) {
|
|
this.Namespace = table.Namespace;
|
|
}
|
|
this.Prefix = table.Prefix;
|
|
this.MinimumCapacity = table.MinimumCapacity;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected ProductsDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
|
|
base(info, context) {
|
|
this.InitVars();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn ProductIdColumn {
|
|
get {
|
|
return this.columnProductId;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn NameColumn {
|
|
get {
|
|
return this.columnName;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn PriceColumn {
|
|
get {
|
|
return this.columnPrice;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn BarcodeColumn {
|
|
get {
|
|
return this.columnBarcode;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn ProductType_ProductTypeIdColumn {
|
|
get {
|
|
return this.columnProductType_ProductTypeId;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
public int Count {
|
|
get {
|
|
return this.Rows.Count;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsRow this[int index] {
|
|
get {
|
|
return ((ProductsRow)(this.Rows[index]));
|
|
}
|
|
}
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event ProductsRowChangeEventHandler ProductsRowChanging;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event ProductsRowChangeEventHandler ProductsRowChanged;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event ProductsRowChangeEventHandler ProductsRowDeleting;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event ProductsRowChangeEventHandler ProductsRowDeleted;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void AddProductsRow(ProductsRow row) {
|
|
this.Rows.Add(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsRow AddProductsRow(string Name, int Price, string Barcode, ProductTypesRow _parentProductTypesRowByFK_dbo_Products_dbo_ProductTypes_ProductType_ProductTypeId) {
|
|
ProductsRow rowProductsRow = ((ProductsRow)(this.NewRow()));
|
|
object[] columnValuesArray = new object[] {
|
|
null,
|
|
Name,
|
|
Price,
|
|
Barcode,
|
|
null};
|
|
if ((_parentProductTypesRowByFK_dbo_Products_dbo_ProductTypes_ProductType_ProductTypeId != null)) {
|
|
columnValuesArray[4] = _parentProductTypesRowByFK_dbo_Products_dbo_ProductTypes_ProductType_ProductTypeId[0];
|
|
}
|
|
rowProductsRow.ItemArray = columnValuesArray;
|
|
this.Rows.Add(rowProductsRow);
|
|
return rowProductsRow;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsRow FindByProductId(int ProductId) {
|
|
return ((ProductsRow)(this.Rows.Find(new object[] {
|
|
ProductId})));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public override global::System.Data.DataTable Clone() {
|
|
ProductsDataTable cln = ((ProductsDataTable)(base.Clone()));
|
|
cln.InitVars();
|
|
return cln;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataTable CreateInstance() {
|
|
return new ProductsDataTable();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal void InitVars() {
|
|
this.columnProductId = base.Columns["ProductId"];
|
|
this.columnName = base.Columns["Name"];
|
|
this.columnPrice = base.Columns["Price"];
|
|
this.columnBarcode = base.Columns["Barcode"];
|
|
this.columnProductType_ProductTypeId = base.Columns["ProductType_ProductTypeId"];
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitClass() {
|
|
this.columnProductId = new global::System.Data.DataColumn("ProductId", typeof(int), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnProductId);
|
|
this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnName);
|
|
this.columnPrice = new global::System.Data.DataColumn("Price", typeof(int), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnPrice);
|
|
this.columnBarcode = new global::System.Data.DataColumn("Barcode", typeof(string), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnBarcode);
|
|
this.columnProductType_ProductTypeId = new global::System.Data.DataColumn("ProductType_ProductTypeId", typeof(int), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnProductType_ProductTypeId);
|
|
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
|
|
this.columnProductId}, true));
|
|
this.columnProductId.AutoIncrement = true;
|
|
this.columnProductId.AutoIncrementSeed = -1;
|
|
this.columnProductId.AutoIncrementStep = -1;
|
|
this.columnProductId.AllowDBNull = false;
|
|
this.columnProductId.ReadOnly = true;
|
|
this.columnProductId.Unique = true;
|
|
this.columnName.MaxLength = 2147483647;
|
|
this.columnPrice.AllowDBNull = false;
|
|
this.columnBarcode.MaxLength = 2147483647;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsRow NewProductsRow() {
|
|
return ((ProductsRow)(this.NewRow()));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
|
|
return new ProductsRow(builder);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Type GetRowType() {
|
|
return typeof(ProductsRow);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanged(e);
|
|
if ((this.ProductsRowChanged != null)) {
|
|
this.ProductsRowChanged(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanging(e);
|
|
if ((this.ProductsRowChanging != null)) {
|
|
this.ProductsRowChanging(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleted(e);
|
|
if ((this.ProductsRowDeleted != null)) {
|
|
this.ProductsRowDeleted(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleting(e);
|
|
if ((this.ProductsRowDeleting != null)) {
|
|
this.ProductsRowDeleting(this, new ProductsRowChangeEvent(((ProductsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void RemoveProductsRow(ProductsRow row) {
|
|
this.Rows.Remove(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
|
|
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
|
|
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
|
|
TestDatabaseDataSet ds = new TestDatabaseDataSet();
|
|
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
|
|
any1.MinOccurs = new decimal(0);
|
|
any1.MaxOccurs = decimal.MaxValue;
|
|
any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any1);
|
|
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
|
|
any2.MinOccurs = new decimal(1);
|
|
any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any2);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute1.Name = "namespace";
|
|
attribute1.FixedValue = ds.Namespace;
|
|
type.Attributes.Add(attribute1);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute2.Name = "tableTypeName";
|
|
attribute2.FixedValue = "ProductsDataTable";
|
|
type.Attributes.Add(attribute2);
|
|
type.Particle = sequence;
|
|
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
|
|
if (xs.Contains(dsSchema.TargetNamespace)) {
|
|
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
|
|
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
|
|
try {
|
|
global::System.Xml.Schema.XmlSchema schema = null;
|
|
dsSchema.Write(s1);
|
|
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
|
|
schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
|
|
s2.SetLength(0);
|
|
schema.Write(s2);
|
|
if ((s1.Length == s2.Length)) {
|
|
s1.Position = 0;
|
|
s2.Position = 0;
|
|
for (; ((s1.Position != s1.Length)
|
|
&& (s1.ReadByte() == s2.ReadByte())); ) {
|
|
;
|
|
}
|
|
if ((s1.Position == s1.Length)) {
|
|
return type;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
finally {
|
|
if ((s1 != null)) {
|
|
s1.Close();
|
|
}
|
|
if ((s2 != null)) {
|
|
s2.Close();
|
|
}
|
|
}
|
|
}
|
|
xs.Add(dsSchema);
|
|
return type;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents the strongly named DataTable class.
|
|
///</summary>
|
|
[global::System.Serializable()]
|
|
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
|
|
public partial class ProductTypesDataTable : global::System.Data.TypedTableBase<ProductTypesRow> {
|
|
|
|
private global::System.Data.DataColumn columnProductTypeId;
|
|
|
|
private global::System.Data.DataColumn columnName;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductTypesDataTable() {
|
|
this.TableName = "ProductTypes";
|
|
this.BeginInit();
|
|
this.InitClass();
|
|
this.EndInit();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal ProductTypesDataTable(global::System.Data.DataTable table) {
|
|
this.TableName = table.TableName;
|
|
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
|
|
this.CaseSensitive = table.CaseSensitive;
|
|
}
|
|
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
|
|
this.Locale = table.Locale;
|
|
}
|
|
if ((table.Namespace != table.DataSet.Namespace)) {
|
|
this.Namespace = table.Namespace;
|
|
}
|
|
this.Prefix = table.Prefix;
|
|
this.MinimumCapacity = table.MinimumCapacity;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected ProductTypesDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
|
|
base(info, context) {
|
|
this.InitVars();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn ProductTypeIdColumn {
|
|
get {
|
|
return this.columnProductTypeId;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn NameColumn {
|
|
get {
|
|
return this.columnName;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
public int Count {
|
|
get {
|
|
return this.Rows.Count;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductTypesRow this[int index] {
|
|
get {
|
|
return ((ProductTypesRow)(this.Rows[index]));
|
|
}
|
|
}
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event ProductTypesRowChangeEventHandler ProductTypesRowChanging;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event ProductTypesRowChangeEventHandler ProductTypesRowChanged;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event ProductTypesRowChangeEventHandler ProductTypesRowDeleting;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event ProductTypesRowChangeEventHandler ProductTypesRowDeleted;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void AddProductTypesRow(ProductTypesRow row) {
|
|
this.Rows.Add(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductTypesRow AddProductTypesRow(string Name) {
|
|
ProductTypesRow rowProductTypesRow = ((ProductTypesRow)(this.NewRow()));
|
|
object[] columnValuesArray = new object[] {
|
|
null,
|
|
Name};
|
|
rowProductTypesRow.ItemArray = columnValuesArray;
|
|
this.Rows.Add(rowProductTypesRow);
|
|
return rowProductTypesRow;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductTypesRow FindByProductTypeId(int ProductTypeId) {
|
|
return ((ProductTypesRow)(this.Rows.Find(new object[] {
|
|
ProductTypeId})));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public override global::System.Data.DataTable Clone() {
|
|
ProductTypesDataTable cln = ((ProductTypesDataTable)(base.Clone()));
|
|
cln.InitVars();
|
|
return cln;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataTable CreateInstance() {
|
|
return new ProductTypesDataTable();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal void InitVars() {
|
|
this.columnProductTypeId = base.Columns["ProductTypeId"];
|
|
this.columnName = base.Columns["Name"];
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitClass() {
|
|
this.columnProductTypeId = new global::System.Data.DataColumn("ProductTypeId", typeof(int), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnProductTypeId);
|
|
this.columnName = new global::System.Data.DataColumn("Name", typeof(string), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnName);
|
|
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
|
|
this.columnProductTypeId}, true));
|
|
this.columnProductTypeId.AutoIncrement = true;
|
|
this.columnProductTypeId.AutoIncrementSeed = -1;
|
|
this.columnProductTypeId.AutoIncrementStep = -1;
|
|
this.columnProductTypeId.AllowDBNull = false;
|
|
this.columnProductTypeId.ReadOnly = true;
|
|
this.columnProductTypeId.Unique = true;
|
|
this.columnName.MaxLength = 2147483647;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductTypesRow NewProductTypesRow() {
|
|
return ((ProductTypesRow)(this.NewRow()));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
|
|
return new ProductTypesRow(builder);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Type GetRowType() {
|
|
return typeof(ProductTypesRow);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanged(e);
|
|
if ((this.ProductTypesRowChanged != null)) {
|
|
this.ProductTypesRowChanged(this, new ProductTypesRowChangeEvent(((ProductTypesRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanging(e);
|
|
if ((this.ProductTypesRowChanging != null)) {
|
|
this.ProductTypesRowChanging(this, new ProductTypesRowChangeEvent(((ProductTypesRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleted(e);
|
|
if ((this.ProductTypesRowDeleted != null)) {
|
|
this.ProductTypesRowDeleted(this, new ProductTypesRowChangeEvent(((ProductTypesRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleting(e);
|
|
if ((this.ProductTypesRowDeleting != null)) {
|
|
this.ProductTypesRowDeleting(this, new ProductTypesRowChangeEvent(((ProductTypesRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void RemoveProductTypesRow(ProductTypesRow row) {
|
|
this.Rows.Remove(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
|
|
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
|
|
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
|
|
TestDatabaseDataSet ds = new TestDatabaseDataSet();
|
|
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
|
|
any1.MinOccurs = new decimal(0);
|
|
any1.MaxOccurs = decimal.MaxValue;
|
|
any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any1);
|
|
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
|
|
any2.MinOccurs = new decimal(1);
|
|
any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any2);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute1.Name = "namespace";
|
|
attribute1.FixedValue = ds.Namespace;
|
|
type.Attributes.Add(attribute1);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute2.Name = "tableTypeName";
|
|
attribute2.FixedValue = "ProductTypesDataTable";
|
|
type.Attributes.Add(attribute2);
|
|
type.Particle = sequence;
|
|
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
|
|
if (xs.Contains(dsSchema.TargetNamespace)) {
|
|
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
|
|
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
|
|
try {
|
|
global::System.Xml.Schema.XmlSchema schema = null;
|
|
dsSchema.Write(s1);
|
|
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
|
|
schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
|
|
s2.SetLength(0);
|
|
schema.Write(s2);
|
|
if ((s1.Length == s2.Length)) {
|
|
s1.Position = 0;
|
|
s2.Position = 0;
|
|
for (; ((s1.Position != s1.Length)
|
|
&& (s1.ReadByte() == s2.ReadByte())); ) {
|
|
;
|
|
}
|
|
if ((s1.Position == s1.Length)) {
|
|
return type;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
finally {
|
|
if ((s1 != null)) {
|
|
s1.Close();
|
|
}
|
|
if ((s2 != null)) {
|
|
s2.Close();
|
|
}
|
|
}
|
|
}
|
|
xs.Add(dsSchema);
|
|
return type;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents the strongly named DataTable class.
|
|
///</summary>
|
|
[global::System.Serializable()]
|
|
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
|
|
public partial class TransactionItemsDataTable : global::System.Data.TypedTableBase<TransactionItemsRow> {
|
|
|
|
private global::System.Data.DataColumn columnTransactionItemId;
|
|
|
|
private global::System.Data.DataColumn columnProduct_ProductId;
|
|
|
|
private global::System.Data.DataColumn columnTransaction_TransactionId;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsDataTable() {
|
|
this.TableName = "TransactionItems";
|
|
this.BeginInit();
|
|
this.InitClass();
|
|
this.EndInit();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal TransactionItemsDataTable(global::System.Data.DataTable table) {
|
|
this.TableName = table.TableName;
|
|
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
|
|
this.CaseSensitive = table.CaseSensitive;
|
|
}
|
|
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
|
|
this.Locale = table.Locale;
|
|
}
|
|
if ((table.Namespace != table.DataSet.Namespace)) {
|
|
this.Namespace = table.Namespace;
|
|
}
|
|
this.Prefix = table.Prefix;
|
|
this.MinimumCapacity = table.MinimumCapacity;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected TransactionItemsDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
|
|
base(info, context) {
|
|
this.InitVars();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn TransactionItemIdColumn {
|
|
get {
|
|
return this.columnTransactionItemId;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn Product_ProductIdColumn {
|
|
get {
|
|
return this.columnProduct_ProductId;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn Transaction_TransactionIdColumn {
|
|
get {
|
|
return this.columnTransaction_TransactionId;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
public int Count {
|
|
get {
|
|
return this.Rows.Count;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsRow this[int index] {
|
|
get {
|
|
return ((TransactionItemsRow)(this.Rows[index]));
|
|
}
|
|
}
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event TransactionItemsRowChangeEventHandler TransactionItemsRowChanging;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event TransactionItemsRowChangeEventHandler TransactionItemsRowChanged;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event TransactionItemsRowChangeEventHandler TransactionItemsRowDeleting;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event TransactionItemsRowChangeEventHandler TransactionItemsRowDeleted;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void AddTransactionItemsRow(TransactionItemsRow row) {
|
|
this.Rows.Add(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsRow AddTransactionItemsRow(string TransactionItemId, ProductsRow _parentProductsRowByFK_dbo_TransactionItems_dbo_Products_Product_ProductId, TransactionsRow _parentTransactionsRowByFK_dbo_TransactionItems_dbo_Transactions_Transaction_TransactionId) {
|
|
TransactionItemsRow rowTransactionItemsRow = ((TransactionItemsRow)(this.NewRow()));
|
|
object[] columnValuesArray = new object[] {
|
|
TransactionItemId,
|
|
null,
|
|
null};
|
|
if ((_parentProductsRowByFK_dbo_TransactionItems_dbo_Products_Product_ProductId != null)) {
|
|
columnValuesArray[1] = _parentProductsRowByFK_dbo_TransactionItems_dbo_Products_Product_ProductId[0];
|
|
}
|
|
if ((_parentTransactionsRowByFK_dbo_TransactionItems_dbo_Transactions_Transaction_TransactionId != null)) {
|
|
columnValuesArray[2] = _parentTransactionsRowByFK_dbo_TransactionItems_dbo_Transactions_Transaction_TransactionId[0];
|
|
}
|
|
rowTransactionItemsRow.ItemArray = columnValuesArray;
|
|
this.Rows.Add(rowTransactionItemsRow);
|
|
return rowTransactionItemsRow;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsRow FindByTransactionItemId(string TransactionItemId) {
|
|
return ((TransactionItemsRow)(this.Rows.Find(new object[] {
|
|
TransactionItemId})));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public override global::System.Data.DataTable Clone() {
|
|
TransactionItemsDataTable cln = ((TransactionItemsDataTable)(base.Clone()));
|
|
cln.InitVars();
|
|
return cln;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataTable CreateInstance() {
|
|
return new TransactionItemsDataTable();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal void InitVars() {
|
|
this.columnTransactionItemId = base.Columns["TransactionItemId"];
|
|
this.columnProduct_ProductId = base.Columns["Product_ProductId"];
|
|
this.columnTransaction_TransactionId = base.Columns["Transaction_TransactionId"];
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitClass() {
|
|
this.columnTransactionItemId = new global::System.Data.DataColumn("TransactionItemId", typeof(string), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnTransactionItemId);
|
|
this.columnProduct_ProductId = new global::System.Data.DataColumn("Product_ProductId", typeof(int), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnProduct_ProductId);
|
|
this.columnTransaction_TransactionId = new global::System.Data.DataColumn("Transaction_TransactionId", typeof(string), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnTransaction_TransactionId);
|
|
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
|
|
this.columnTransactionItemId}, true));
|
|
this.columnTransactionItemId.AllowDBNull = false;
|
|
this.columnTransactionItemId.Unique = true;
|
|
this.columnTransactionItemId.MaxLength = 128;
|
|
this.columnTransaction_TransactionId.MaxLength = 128;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsRow NewTransactionItemsRow() {
|
|
return ((TransactionItemsRow)(this.NewRow()));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
|
|
return new TransactionItemsRow(builder);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Type GetRowType() {
|
|
return typeof(TransactionItemsRow);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanged(e);
|
|
if ((this.TransactionItemsRowChanged != null)) {
|
|
this.TransactionItemsRowChanged(this, new TransactionItemsRowChangeEvent(((TransactionItemsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanging(e);
|
|
if ((this.TransactionItemsRowChanging != null)) {
|
|
this.TransactionItemsRowChanging(this, new TransactionItemsRowChangeEvent(((TransactionItemsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleted(e);
|
|
if ((this.TransactionItemsRowDeleted != null)) {
|
|
this.TransactionItemsRowDeleted(this, new TransactionItemsRowChangeEvent(((TransactionItemsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleting(e);
|
|
if ((this.TransactionItemsRowDeleting != null)) {
|
|
this.TransactionItemsRowDeleting(this, new TransactionItemsRowChangeEvent(((TransactionItemsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void RemoveTransactionItemsRow(TransactionItemsRow row) {
|
|
this.Rows.Remove(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
|
|
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
|
|
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
|
|
TestDatabaseDataSet ds = new TestDatabaseDataSet();
|
|
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
|
|
any1.MinOccurs = new decimal(0);
|
|
any1.MaxOccurs = decimal.MaxValue;
|
|
any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any1);
|
|
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
|
|
any2.MinOccurs = new decimal(1);
|
|
any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any2);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute1.Name = "namespace";
|
|
attribute1.FixedValue = ds.Namespace;
|
|
type.Attributes.Add(attribute1);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute2.Name = "tableTypeName";
|
|
attribute2.FixedValue = "TransactionItemsDataTable";
|
|
type.Attributes.Add(attribute2);
|
|
type.Particle = sequence;
|
|
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
|
|
if (xs.Contains(dsSchema.TargetNamespace)) {
|
|
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
|
|
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
|
|
try {
|
|
global::System.Xml.Schema.XmlSchema schema = null;
|
|
dsSchema.Write(s1);
|
|
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
|
|
schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
|
|
s2.SetLength(0);
|
|
schema.Write(s2);
|
|
if ((s1.Length == s2.Length)) {
|
|
s1.Position = 0;
|
|
s2.Position = 0;
|
|
for (; ((s1.Position != s1.Length)
|
|
&& (s1.ReadByte() == s2.ReadByte())); ) {
|
|
;
|
|
}
|
|
if ((s1.Position == s1.Length)) {
|
|
return type;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
finally {
|
|
if ((s1 != null)) {
|
|
s1.Close();
|
|
}
|
|
if ((s2 != null)) {
|
|
s2.Close();
|
|
}
|
|
}
|
|
}
|
|
xs.Add(dsSchema);
|
|
return type;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents the strongly named DataTable class.
|
|
///</summary>
|
|
[global::System.Serializable()]
|
|
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
|
|
public partial class TransactionsDataTable : global::System.Data.TypedTableBase<TransactionsRow> {
|
|
|
|
private global::System.Data.DataColumn columnTransactionId;
|
|
|
|
private global::System.Data.DataColumn columnTimestamp;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionsDataTable() {
|
|
this.TableName = "Transactions";
|
|
this.BeginInit();
|
|
this.InitClass();
|
|
this.EndInit();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal TransactionsDataTable(global::System.Data.DataTable table) {
|
|
this.TableName = table.TableName;
|
|
if ((table.CaseSensitive != table.DataSet.CaseSensitive)) {
|
|
this.CaseSensitive = table.CaseSensitive;
|
|
}
|
|
if ((table.Locale.ToString() != table.DataSet.Locale.ToString())) {
|
|
this.Locale = table.Locale;
|
|
}
|
|
if ((table.Namespace != table.DataSet.Namespace)) {
|
|
this.Namespace = table.Namespace;
|
|
}
|
|
this.Prefix = table.Prefix;
|
|
this.MinimumCapacity = table.MinimumCapacity;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected TransactionsDataTable(global::System.Runtime.Serialization.SerializationInfo info, global::System.Runtime.Serialization.StreamingContext context) :
|
|
base(info, context) {
|
|
this.InitVars();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn TransactionIdColumn {
|
|
get {
|
|
return this.columnTransactionId;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataColumn TimestampColumn {
|
|
get {
|
|
return this.columnTimestamp;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
public int Count {
|
|
get {
|
|
return this.Rows.Count;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionsRow this[int index] {
|
|
get {
|
|
return ((TransactionsRow)(this.Rows[index]));
|
|
}
|
|
}
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event TransactionsRowChangeEventHandler TransactionsRowChanging;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event TransactionsRowChangeEventHandler TransactionsRowChanged;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event TransactionsRowChangeEventHandler TransactionsRowDeleting;
|
|
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public event TransactionsRowChangeEventHandler TransactionsRowDeleted;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void AddTransactionsRow(TransactionsRow row) {
|
|
this.Rows.Add(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionsRow AddTransactionsRow(string TransactionId, System.DateTime Timestamp) {
|
|
TransactionsRow rowTransactionsRow = ((TransactionsRow)(this.NewRow()));
|
|
object[] columnValuesArray = new object[] {
|
|
TransactionId,
|
|
Timestamp};
|
|
rowTransactionsRow.ItemArray = columnValuesArray;
|
|
this.Rows.Add(rowTransactionsRow);
|
|
return rowTransactionsRow;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionsRow FindByTransactionId(string TransactionId) {
|
|
return ((TransactionsRow)(this.Rows.Find(new object[] {
|
|
TransactionId})));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public override global::System.Data.DataTable Clone() {
|
|
TransactionsDataTable cln = ((TransactionsDataTable)(base.Clone()));
|
|
cln.InitVars();
|
|
return cln;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataTable CreateInstance() {
|
|
return new TransactionsDataTable();
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal void InitVars() {
|
|
this.columnTransactionId = base.Columns["TransactionId"];
|
|
this.columnTimestamp = base.Columns["Timestamp"];
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitClass() {
|
|
this.columnTransactionId = new global::System.Data.DataColumn("TransactionId", typeof(string), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnTransactionId);
|
|
this.columnTimestamp = new global::System.Data.DataColumn("Timestamp", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element);
|
|
base.Columns.Add(this.columnTimestamp);
|
|
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
|
|
this.columnTransactionId}, true));
|
|
this.columnTransactionId.AllowDBNull = false;
|
|
this.columnTransactionId.Unique = true;
|
|
this.columnTransactionId.MaxLength = 128;
|
|
this.columnTimestamp.AllowDBNull = false;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionsRow NewTransactionsRow() {
|
|
return ((TransactionsRow)(this.NewRow()));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Data.DataRow NewRowFromBuilder(global::System.Data.DataRowBuilder builder) {
|
|
return new TransactionsRow(builder);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override global::System.Type GetRowType() {
|
|
return typeof(TransactionsRow);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanged(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanged(e);
|
|
if ((this.TransactionsRowChanged != null)) {
|
|
this.TransactionsRowChanged(this, new TransactionsRowChangeEvent(((TransactionsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowChanging(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowChanging(e);
|
|
if ((this.TransactionsRowChanging != null)) {
|
|
this.TransactionsRowChanging(this, new TransactionsRowChangeEvent(((TransactionsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleted(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleted(e);
|
|
if ((this.TransactionsRowDeleted != null)) {
|
|
this.TransactionsRowDeleted(this, new TransactionsRowChangeEvent(((TransactionsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected override void OnRowDeleting(global::System.Data.DataRowChangeEventArgs e) {
|
|
base.OnRowDeleting(e);
|
|
if ((this.TransactionsRowDeleting != null)) {
|
|
this.TransactionsRowDeleting(this, new TransactionsRowChangeEvent(((TransactionsRow)(e.Row)), e.Action));
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void RemoveTransactionsRow(TransactionsRow row) {
|
|
this.Rows.Remove(row);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public static global::System.Xml.Schema.XmlSchemaComplexType GetTypedTableSchema(global::System.Xml.Schema.XmlSchemaSet xs) {
|
|
global::System.Xml.Schema.XmlSchemaComplexType type = new global::System.Xml.Schema.XmlSchemaComplexType();
|
|
global::System.Xml.Schema.XmlSchemaSequence sequence = new global::System.Xml.Schema.XmlSchemaSequence();
|
|
TestDatabaseDataSet ds = new TestDatabaseDataSet();
|
|
global::System.Xml.Schema.XmlSchemaAny any1 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any1.Namespace = "http://www.w3.org/2001/XMLSchema";
|
|
any1.MinOccurs = new decimal(0);
|
|
any1.MaxOccurs = decimal.MaxValue;
|
|
any1.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any1);
|
|
global::System.Xml.Schema.XmlSchemaAny any2 = new global::System.Xml.Schema.XmlSchemaAny();
|
|
any2.Namespace = "urn:schemas-microsoft-com:xml-diffgram-v1";
|
|
any2.MinOccurs = new decimal(1);
|
|
any2.ProcessContents = global::System.Xml.Schema.XmlSchemaContentProcessing.Lax;
|
|
sequence.Items.Add(any2);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute1 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute1.Name = "namespace";
|
|
attribute1.FixedValue = ds.Namespace;
|
|
type.Attributes.Add(attribute1);
|
|
global::System.Xml.Schema.XmlSchemaAttribute attribute2 = new global::System.Xml.Schema.XmlSchemaAttribute();
|
|
attribute2.Name = "tableTypeName";
|
|
attribute2.FixedValue = "TransactionsDataTable";
|
|
type.Attributes.Add(attribute2);
|
|
type.Particle = sequence;
|
|
global::System.Xml.Schema.XmlSchema dsSchema = ds.GetSchemaSerializable();
|
|
if (xs.Contains(dsSchema.TargetNamespace)) {
|
|
global::System.IO.MemoryStream s1 = new global::System.IO.MemoryStream();
|
|
global::System.IO.MemoryStream s2 = new global::System.IO.MemoryStream();
|
|
try {
|
|
global::System.Xml.Schema.XmlSchema schema = null;
|
|
dsSchema.Write(s1);
|
|
for (global::System.Collections.IEnumerator schemas = xs.Schemas(dsSchema.TargetNamespace).GetEnumerator(); schemas.MoveNext(); ) {
|
|
schema = ((global::System.Xml.Schema.XmlSchema)(schemas.Current));
|
|
s2.SetLength(0);
|
|
schema.Write(s2);
|
|
if ((s1.Length == s2.Length)) {
|
|
s1.Position = 0;
|
|
s2.Position = 0;
|
|
for (; ((s1.Position != s1.Length)
|
|
&& (s1.ReadByte() == s2.ReadByte())); ) {
|
|
;
|
|
}
|
|
if ((s1.Position == s1.Length)) {
|
|
return type;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
finally {
|
|
if ((s1 != null)) {
|
|
s1.Close();
|
|
}
|
|
if ((s2 != null)) {
|
|
s2.Close();
|
|
}
|
|
}
|
|
}
|
|
xs.Add(dsSchema);
|
|
return type;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents strongly named DataRow class.
|
|
///</summary>
|
|
public partial class @__MigrationHistoryRow : global::System.Data.DataRow {
|
|
|
|
private @__MigrationHistoryDataTable table__MigrationHistory;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal @__MigrationHistoryRow(global::System.Data.DataRowBuilder rb) :
|
|
base(rb) {
|
|
this.table__MigrationHistory = ((@__MigrationHistoryDataTable)(this.Table));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public string MigrationId {
|
|
get {
|
|
return ((string)(this[this.table__MigrationHistory.MigrationIdColumn]));
|
|
}
|
|
set {
|
|
this[this.table__MigrationHistory.MigrationIdColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public string ContextKey {
|
|
get {
|
|
return ((string)(this[this.table__MigrationHistory.ContextKeyColumn]));
|
|
}
|
|
set {
|
|
this[this.table__MigrationHistory.ContextKeyColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public byte[] Model {
|
|
get {
|
|
return ((byte[])(this[this.table__MigrationHistory.ModelColumn]));
|
|
}
|
|
set {
|
|
this[this.table__MigrationHistory.ModelColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public string ProductVersion {
|
|
get {
|
|
return ((string)(this[this.table__MigrationHistory.ProductVersionColumn]));
|
|
}
|
|
set {
|
|
this[this.table__MigrationHistory.ProductVersionColumn] = value;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents strongly named DataRow class.
|
|
///</summary>
|
|
public partial class ProductsRow : global::System.Data.DataRow {
|
|
|
|
private ProductsDataTable tableProducts;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal ProductsRow(global::System.Data.DataRowBuilder rb) :
|
|
base(rb) {
|
|
this.tableProducts = ((ProductsDataTable)(this.Table));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public int ProductId {
|
|
get {
|
|
return ((int)(this[this.tableProducts.ProductIdColumn]));
|
|
}
|
|
set {
|
|
this[this.tableProducts.ProductIdColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public string Name {
|
|
get {
|
|
try {
|
|
return ((string)(this[this.tableProducts.NameColumn]));
|
|
}
|
|
catch (global::System.InvalidCastException e) {
|
|
throw new global::System.Data.StrongTypingException("\'Products\' 테이블의 \'Name\' 열의 값이 DBNull입니다.", e);
|
|
}
|
|
}
|
|
set {
|
|
this[this.tableProducts.NameColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public int Price {
|
|
get {
|
|
return ((int)(this[this.tableProducts.PriceColumn]));
|
|
}
|
|
set {
|
|
this[this.tableProducts.PriceColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public string Barcode {
|
|
get {
|
|
try {
|
|
return ((string)(this[this.tableProducts.BarcodeColumn]));
|
|
}
|
|
catch (global::System.InvalidCastException e) {
|
|
throw new global::System.Data.StrongTypingException("\'Products\' 테이블의 \'Barcode\' 열의 값이 DBNull입니다.", e);
|
|
}
|
|
}
|
|
set {
|
|
this[this.tableProducts.BarcodeColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public int ProductType_ProductTypeId {
|
|
get {
|
|
try {
|
|
return ((int)(this[this.tableProducts.ProductType_ProductTypeIdColumn]));
|
|
}
|
|
catch (global::System.InvalidCastException e) {
|
|
throw new global::System.Data.StrongTypingException("\'Products\' 테이블의 \'ProductType_ProductTypeId\' 열의 값이 DBNull입니다.", e);
|
|
}
|
|
}
|
|
set {
|
|
this[this.tableProducts.ProductType_ProductTypeIdColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductTypesRow ProductTypesRow {
|
|
get {
|
|
return ((ProductTypesRow)(this.GetParentRow(this.Table.ParentRelations["FK_dbo.Products_dbo.ProductTypes_ProductType_ProductTypeId"])));
|
|
}
|
|
set {
|
|
this.SetParentRow(value, this.Table.ParentRelations["FK_dbo.Products_dbo.ProductTypes_ProductType_ProductTypeId"]);
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool IsNameNull() {
|
|
return this.IsNull(this.tableProducts.NameColumn);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void SetNameNull() {
|
|
this[this.tableProducts.NameColumn] = global::System.Convert.DBNull;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool IsBarcodeNull() {
|
|
return this.IsNull(this.tableProducts.BarcodeColumn);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void SetBarcodeNull() {
|
|
this[this.tableProducts.BarcodeColumn] = global::System.Convert.DBNull;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool IsProductType_ProductTypeIdNull() {
|
|
return this.IsNull(this.tableProducts.ProductType_ProductTypeIdColumn);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void SetProductType_ProductTypeIdNull() {
|
|
this[this.tableProducts.ProductType_ProductTypeIdColumn] = global::System.Convert.DBNull;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsRow[] GetTransactionItemsRows() {
|
|
if ((this.Table.ChildRelations["FK_dbo.TransactionItems_dbo.Products_Product_ProductId"] == null)) {
|
|
return new TransactionItemsRow[0];
|
|
}
|
|
else {
|
|
return ((TransactionItemsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_dbo.TransactionItems_dbo.Products_Product_ProductId"])));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents strongly named DataRow class.
|
|
///</summary>
|
|
public partial class ProductTypesRow : global::System.Data.DataRow {
|
|
|
|
private ProductTypesDataTable tableProductTypes;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal ProductTypesRow(global::System.Data.DataRowBuilder rb) :
|
|
base(rb) {
|
|
this.tableProductTypes = ((ProductTypesDataTable)(this.Table));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public int ProductTypeId {
|
|
get {
|
|
return ((int)(this[this.tableProductTypes.ProductTypeIdColumn]));
|
|
}
|
|
set {
|
|
this[this.tableProductTypes.ProductTypeIdColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public string Name {
|
|
get {
|
|
try {
|
|
return ((string)(this[this.tableProductTypes.NameColumn]));
|
|
}
|
|
catch (global::System.InvalidCastException e) {
|
|
throw new global::System.Data.StrongTypingException("\'ProductTypes\' 테이블의 \'Name\' 열의 값이 DBNull입니다.", e);
|
|
}
|
|
}
|
|
set {
|
|
this[this.tableProductTypes.NameColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool IsNameNull() {
|
|
return this.IsNull(this.tableProductTypes.NameColumn);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void SetNameNull() {
|
|
this[this.tableProductTypes.NameColumn] = global::System.Convert.DBNull;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsRow[] GetProductsRows() {
|
|
if ((this.Table.ChildRelations["FK_dbo.Products_dbo.ProductTypes_ProductType_ProductTypeId"] == null)) {
|
|
return new ProductsRow[0];
|
|
}
|
|
else {
|
|
return ((ProductsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_dbo.Products_dbo.ProductTypes_ProductType_ProductTypeId"])));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents strongly named DataRow class.
|
|
///</summary>
|
|
public partial class TransactionItemsRow : global::System.Data.DataRow {
|
|
|
|
private TransactionItemsDataTable tableTransactionItems;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal TransactionItemsRow(global::System.Data.DataRowBuilder rb) :
|
|
base(rb) {
|
|
this.tableTransactionItems = ((TransactionItemsDataTable)(this.Table));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public string TransactionItemId {
|
|
get {
|
|
return ((string)(this[this.tableTransactionItems.TransactionItemIdColumn]));
|
|
}
|
|
set {
|
|
this[this.tableTransactionItems.TransactionItemIdColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public int Product_ProductId {
|
|
get {
|
|
try {
|
|
return ((int)(this[this.tableTransactionItems.Product_ProductIdColumn]));
|
|
}
|
|
catch (global::System.InvalidCastException e) {
|
|
throw new global::System.Data.StrongTypingException("\'TransactionItems\' 테이블의 \'Product_ProductId\' 열의 값이 DBNull입니다.", e);
|
|
}
|
|
}
|
|
set {
|
|
this[this.tableTransactionItems.Product_ProductIdColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public string Transaction_TransactionId {
|
|
get {
|
|
try {
|
|
return ((string)(this[this.tableTransactionItems.Transaction_TransactionIdColumn]));
|
|
}
|
|
catch (global::System.InvalidCastException e) {
|
|
throw new global::System.Data.StrongTypingException("\'TransactionItems\' 테이블의 \'Transaction_TransactionId\' 열의 값이 DBNull입니다.", e);
|
|
}
|
|
}
|
|
set {
|
|
this[this.tableTransactionItems.Transaction_TransactionIdColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsRow ProductsRow {
|
|
get {
|
|
return ((ProductsRow)(this.GetParentRow(this.Table.ParentRelations["FK_dbo.TransactionItems_dbo.Products_Product_ProductId"])));
|
|
}
|
|
set {
|
|
this.SetParentRow(value, this.Table.ParentRelations["FK_dbo.TransactionItems_dbo.Products_Product_ProductId"]);
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionsRow TransactionsRow {
|
|
get {
|
|
return ((TransactionsRow)(this.GetParentRow(this.Table.ParentRelations["FK_dbo.TransactionItems_dbo.Transactions_Transaction_TransactionId"])));
|
|
}
|
|
set {
|
|
this.SetParentRow(value, this.Table.ParentRelations["FK_dbo.TransactionItems_dbo.Transactions_Transaction_TransactionId"]);
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool IsProduct_ProductIdNull() {
|
|
return this.IsNull(this.tableTransactionItems.Product_ProductIdColumn);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void SetProduct_ProductIdNull() {
|
|
this[this.tableTransactionItems.Product_ProductIdColumn] = global::System.Convert.DBNull;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool IsTransaction_TransactionIdNull() {
|
|
return this.IsNull(this.tableTransactionItems.Transaction_TransactionIdColumn);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public void SetTransaction_TransactionIdNull() {
|
|
this[this.tableTransactionItems.Transaction_TransactionIdColumn] = global::System.Convert.DBNull;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents strongly named DataRow class.
|
|
///</summary>
|
|
public partial class TransactionsRow : global::System.Data.DataRow {
|
|
|
|
private TransactionsDataTable tableTransactions;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal TransactionsRow(global::System.Data.DataRowBuilder rb) :
|
|
base(rb) {
|
|
this.tableTransactions = ((TransactionsDataTable)(this.Table));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public string TransactionId {
|
|
get {
|
|
return ((string)(this[this.tableTransactions.TransactionIdColumn]));
|
|
}
|
|
set {
|
|
this[this.tableTransactions.TransactionIdColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public System.DateTime Timestamp {
|
|
get {
|
|
return ((global::System.DateTime)(this[this.tableTransactions.TimestampColumn]));
|
|
}
|
|
set {
|
|
this[this.tableTransactions.TimestampColumn] = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsRow[] GetTransactionItemsRows() {
|
|
if ((this.Table.ChildRelations["FK_dbo.TransactionItems_dbo.Transactions_Transaction_TransactionId"] == null)) {
|
|
return new TransactionItemsRow[0];
|
|
}
|
|
else {
|
|
return ((TransactionItemsRow[])(base.GetChildRows(this.Table.ChildRelations["FK_dbo.TransactionItems_dbo.Transactions_Transaction_TransactionId"])));
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Row event argument class
|
|
///</summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public class @__MigrationHistoryRowChangeEvent : global::System.EventArgs {
|
|
|
|
private @__MigrationHistoryRow eventRow;
|
|
|
|
private global::System.Data.DataRowAction eventAction;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public @__MigrationHistoryRowChangeEvent(@__MigrationHistoryRow row, global::System.Data.DataRowAction action) {
|
|
this.eventRow = row;
|
|
this.eventAction = action;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public @__MigrationHistoryRow Row {
|
|
get {
|
|
return this.eventRow;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataRowAction Action {
|
|
get {
|
|
return this.eventAction;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Row event argument class
|
|
///</summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public class ProductsRowChangeEvent : global::System.EventArgs {
|
|
|
|
private ProductsRow eventRow;
|
|
|
|
private global::System.Data.DataRowAction eventAction;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsRowChangeEvent(ProductsRow row, global::System.Data.DataRowAction action) {
|
|
this.eventRow = row;
|
|
this.eventAction = action;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsRow Row {
|
|
get {
|
|
return this.eventRow;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataRowAction Action {
|
|
get {
|
|
return this.eventAction;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Row event argument class
|
|
///</summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public class ProductTypesRowChangeEvent : global::System.EventArgs {
|
|
|
|
private ProductTypesRow eventRow;
|
|
|
|
private global::System.Data.DataRowAction eventAction;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductTypesRowChangeEvent(ProductTypesRow row, global::System.Data.DataRowAction action) {
|
|
this.eventRow = row;
|
|
this.eventAction = action;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductTypesRow Row {
|
|
get {
|
|
return this.eventRow;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataRowAction Action {
|
|
get {
|
|
return this.eventAction;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Row event argument class
|
|
///</summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public class TransactionItemsRowChangeEvent : global::System.EventArgs {
|
|
|
|
private TransactionItemsRow eventRow;
|
|
|
|
private global::System.Data.DataRowAction eventAction;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsRowChangeEvent(TransactionItemsRow row, global::System.Data.DataRowAction action) {
|
|
this.eventRow = row;
|
|
this.eventAction = action;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsRow Row {
|
|
get {
|
|
return this.eventRow;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataRowAction Action {
|
|
get {
|
|
return this.eventAction;
|
|
}
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Row event argument class
|
|
///</summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public class TransactionsRowChangeEvent : global::System.EventArgs {
|
|
|
|
private TransactionsRow eventRow;
|
|
|
|
private global::System.Data.DataRowAction eventAction;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionsRowChangeEvent(TransactionsRow row, global::System.Data.DataRowAction action) {
|
|
this.eventRow = row;
|
|
this.eventAction = action;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionsRow Row {
|
|
get {
|
|
return this.eventRow;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public global::System.Data.DataRowAction Action {
|
|
get {
|
|
return this.eventAction;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
namespace TinyPosEntity.TestDatabaseDataSetTableAdapters {
|
|
|
|
|
|
/// <summary>
|
|
///Represents the connection and commands used to retrieve and save data.
|
|
///</summary>
|
|
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
[global::System.ComponentModel.ToolboxItem(true)]
|
|
[global::System.ComponentModel.DataObjectAttribute(true)]
|
|
[global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
|
|
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public partial class @__MigrationHistoryTableAdapter : global::System.ComponentModel.Component {
|
|
|
|
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
|
|
|
|
private global::System.Data.SqlClient.SqlConnection _connection;
|
|
|
|
private global::System.Data.SqlClient.SqlTransaction _transaction;
|
|
|
|
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
|
|
|
|
private bool _clearBeforeFill;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public @__MigrationHistoryTableAdapter() {
|
|
this.ClearBeforeFill = true;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
|
|
get {
|
|
if ((this._adapter == null)) {
|
|
this.InitAdapter();
|
|
}
|
|
return this._adapter;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlConnection Connection {
|
|
get {
|
|
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)) {
|
|
((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlTransaction Transaction {
|
|
get {
|
|
return this._transaction;
|
|
}
|
|
set {
|
|
this._transaction = value;
|
|
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
|
|
this.CommandCollection[i].Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.DeleteCommand != null))) {
|
|
this.Adapter.DeleteCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.InsertCommand != null))) {
|
|
this.Adapter.InsertCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.UpdateCommand != null))) {
|
|
this.Adapter.UpdateCommand.Transaction = this._transaction;
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
|
|
get {
|
|
if ((this._commandCollection == null)) {
|
|
this.InitCommandCollection();
|
|
}
|
|
return this._commandCollection;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool ClearBeforeFill {
|
|
get {
|
|
return this._clearBeforeFill;
|
|
}
|
|
set {
|
|
this._clearBeforeFill = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitAdapter() {
|
|
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
|
|
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
|
|
tableMapping.SourceTable = "Table";
|
|
tableMapping.DataSetTable = "__MigrationHistory";
|
|
tableMapping.ColumnMappings.Add("MigrationId", "MigrationId");
|
|
tableMapping.ColumnMappings.Add("ContextKey", "ContextKey");
|
|
tableMapping.ColumnMappings.Add("Model", "Model");
|
|
tableMapping.ColumnMappings.Add("ProductVersion", "ProductVersion");
|
|
this._adapter.TableMappings.Add(tableMapping);
|
|
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.DeleteCommand.Connection = this.Connection;
|
|
this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[__MigrationHistory] WHERE (([MigrationId] = @Original_Migratio" +
|
|
"nId) AND ([ContextKey] = @Original_ContextKey) AND ([ProductVersion] = @Original" +
|
|
"_ProductVersion))";
|
|
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MigrationId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MigrationId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContextKey", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContextKey", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductVersion", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductVersion", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.InsertCommand.Connection = this.Connection;
|
|
this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[__MigrationHistory] ([MigrationId], [ContextKey], [Model], [ProductVersion]) VALUES (@MigrationId, @ContextKey, @Model, @ProductVersion);
|
|
SELECT MigrationId, ContextKey, Model, ProductVersion FROM __MigrationHistory WHERE (ContextKey = @ContextKey) AND (MigrationId = @MigrationId)";
|
|
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MigrationId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MigrationId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContextKey", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContextKey", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Model", global::System.Data.SqlDbType.VarBinary, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Model", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductVersion", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductVersion", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.UpdateCommand.Connection = this.Connection;
|
|
this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[__MigrationHistory] SET [MigrationId] = @MigrationId, [ContextKey] = @ContextKey, [Model] = @Model, [ProductVersion] = @ProductVersion WHERE (([MigrationId] = @Original_MigrationId) AND ([ContextKey] = @Original_ContextKey) AND ([ProductVersion] = @Original_ProductVersion));
|
|
SELECT MigrationId, ContextKey, Model, ProductVersion FROM __MigrationHistory WHERE (ContextKey = @ContextKey) AND (MigrationId = @MigrationId)";
|
|
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@MigrationId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MigrationId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ContextKey", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContextKey", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Model", global::System.Data.SqlDbType.VarBinary, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Model", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductVersion", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductVersion", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_MigrationId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "MigrationId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ContextKey", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ContextKey", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductVersion", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductVersion", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitConnection() {
|
|
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
|
this._connection.ConnectionString = global::TinyPosEntity.Properties.Settings.Default.TestDatabaseConnectionString;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitCommandCollection() {
|
|
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
|
|
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
|
this._commandCollection[0].Connection = this.Connection;
|
|
this._commandCollection[0].CommandText = "SELECT MigrationId, ContextKey, Model, ProductVersion FROM dbo.[__MigrationHistor" +
|
|
"y]";
|
|
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
|
|
public virtual int Fill(TestDatabaseDataSet.@__MigrationHistoryDataTable dataTable) {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
if ((this.ClearBeforeFill == true)) {
|
|
dataTable.Clear();
|
|
}
|
|
int returnValue = this.Adapter.Fill(dataTable);
|
|
return returnValue;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
|
|
public virtual TestDatabaseDataSet.@__MigrationHistoryDataTable GetData() {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
TestDatabaseDataSet.@__MigrationHistoryDataTable dataTable = new TestDatabaseDataSet.@__MigrationHistoryDataTable();
|
|
this.Adapter.Fill(dataTable);
|
|
return dataTable;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet.@__MigrationHistoryDataTable dataTable) {
|
|
return this.Adapter.Update(dataTable);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet dataSet) {
|
|
return this.Adapter.Update(dataSet, "__MigrationHistory");
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow dataRow) {
|
|
return this.Adapter.Update(new global::System.Data.DataRow[] {
|
|
dataRow});
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow[] dataRows) {
|
|
return this.Adapter.Update(dataRows);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
|
|
public virtual int Delete(string Original_MigrationId, string Original_ContextKey, string Original_ProductVersion) {
|
|
if ((Original_MigrationId == null)) {
|
|
throw new global::System.ArgumentNullException("Original_MigrationId");
|
|
}
|
|
else {
|
|
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_MigrationId));
|
|
}
|
|
if ((Original_ContextKey == null)) {
|
|
throw new global::System.ArgumentNullException("Original_ContextKey");
|
|
}
|
|
else {
|
|
this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_ContextKey));
|
|
}
|
|
if ((Original_ProductVersion == null)) {
|
|
throw new global::System.ArgumentNullException("Original_ProductVersion");
|
|
}
|
|
else {
|
|
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_ProductVersion));
|
|
}
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
|
|
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.DeleteCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.DeleteCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
|
|
public virtual int Insert(string MigrationId, string ContextKey, byte[] Model, string ProductVersion) {
|
|
if ((MigrationId == null)) {
|
|
throw new global::System.ArgumentNullException("MigrationId");
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(MigrationId));
|
|
}
|
|
if ((ContextKey == null)) {
|
|
throw new global::System.ArgumentNullException("ContextKey");
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(ContextKey));
|
|
}
|
|
if ((Model == null)) {
|
|
throw new global::System.ArgumentNullException("Model");
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[2].Value = ((byte[])(Model));
|
|
}
|
|
if ((ProductVersion == null)) {
|
|
throw new global::System.ArgumentNullException("ProductVersion");
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[3].Value = ((string)(ProductVersion));
|
|
}
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
|
|
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.InsertCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.InsertCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(string MigrationId, string ContextKey, byte[] Model, string ProductVersion, string Original_MigrationId, string Original_ContextKey, string Original_ProductVersion) {
|
|
if ((MigrationId == null)) {
|
|
throw new global::System.ArgumentNullException("MigrationId");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(MigrationId));
|
|
}
|
|
if ((ContextKey == null)) {
|
|
throw new global::System.ArgumentNullException("ContextKey");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(ContextKey));
|
|
}
|
|
if ((Model == null)) {
|
|
throw new global::System.ArgumentNullException("Model");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[2].Value = ((byte[])(Model));
|
|
}
|
|
if ((ProductVersion == null)) {
|
|
throw new global::System.ArgumentNullException("ProductVersion");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(ProductVersion));
|
|
}
|
|
if ((Original_MigrationId == null)) {
|
|
throw new global::System.ArgumentNullException("Original_MigrationId");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_MigrationId));
|
|
}
|
|
if ((Original_ContextKey == null)) {
|
|
throw new global::System.ArgumentNullException("Original_ContextKey");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_ContextKey));
|
|
}
|
|
if ((Original_ProductVersion == null)) {
|
|
throw new global::System.ArgumentNullException("Original_ProductVersion");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_ProductVersion));
|
|
}
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
|
|
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.UpdateCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.UpdateCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(byte[] Model, string ProductVersion, string Original_MigrationId, string Original_ContextKey, string Original_ProductVersion) {
|
|
return this.Update(Original_MigrationId, Original_ContextKey, Model, ProductVersion, Original_MigrationId, Original_ContextKey, Original_ProductVersion);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents the connection and commands used to retrieve and save data.
|
|
///</summary>
|
|
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
[global::System.ComponentModel.ToolboxItem(true)]
|
|
[global::System.ComponentModel.DataObjectAttribute(true)]
|
|
[global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
|
|
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public partial class ProductsTableAdapter : global::System.ComponentModel.Component {
|
|
|
|
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
|
|
|
|
private global::System.Data.SqlClient.SqlConnection _connection;
|
|
|
|
private global::System.Data.SqlClient.SqlTransaction _transaction;
|
|
|
|
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
|
|
|
|
private bool _clearBeforeFill;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductsTableAdapter() {
|
|
this.ClearBeforeFill = true;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
|
|
get {
|
|
if ((this._adapter == null)) {
|
|
this.InitAdapter();
|
|
}
|
|
return this._adapter;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlConnection Connection {
|
|
get {
|
|
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)) {
|
|
((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlTransaction Transaction {
|
|
get {
|
|
return this._transaction;
|
|
}
|
|
set {
|
|
this._transaction = value;
|
|
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
|
|
this.CommandCollection[i].Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.DeleteCommand != null))) {
|
|
this.Adapter.DeleteCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.InsertCommand != null))) {
|
|
this.Adapter.InsertCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.UpdateCommand != null))) {
|
|
this.Adapter.UpdateCommand.Transaction = this._transaction;
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
|
|
get {
|
|
if ((this._commandCollection == null)) {
|
|
this.InitCommandCollection();
|
|
}
|
|
return this._commandCollection;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool ClearBeforeFill {
|
|
get {
|
|
return this._clearBeforeFill;
|
|
}
|
|
set {
|
|
this._clearBeforeFill = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitAdapter() {
|
|
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
|
|
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
|
|
tableMapping.SourceTable = "Table";
|
|
tableMapping.DataSetTable = "Products";
|
|
tableMapping.ColumnMappings.Add("ProductId", "ProductId");
|
|
tableMapping.ColumnMappings.Add("Name", "Name");
|
|
tableMapping.ColumnMappings.Add("Price", "Price");
|
|
tableMapping.ColumnMappings.Add("Barcode", "Barcode");
|
|
tableMapping.ColumnMappings.Add("ProductType_ProductTypeId", "ProductType_ProductTypeId");
|
|
this._adapter.TableMappings.Add(tableMapping);
|
|
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.DeleteCommand.Connection = this.Connection;
|
|
this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[Products] WHERE (([ProductId] = @Original_ProductId) AND ([Price] = @Original_Price) AND ((@IsNull_ProductType_ProductTypeId = 1 AND [ProductType_ProductTypeId] IS NULL) OR ([ProductType_ProductTypeId] = @Original_ProductType_ProductTypeId)))";
|
|
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Price", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Price", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductType_ProductTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductType_ProductTypeId", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductType_ProductTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductType_ProductTypeId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.InsertCommand.Connection = this.Connection;
|
|
this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[Products] ([Name], [Price], [Barcode], [ProductType_ProductTypeId]) VALUES (@Name, @Price, @Barcode, @ProductType_ProductTypeId);
|
|
SELECT ProductId, Name, Price, Barcode, ProductType_ProductTypeId FROM Products WHERE (ProductId = SCOPE_IDENTITY())";
|
|
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Price", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Price", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Barcode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Barcode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductType_ProductTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductType_ProductTypeId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.UpdateCommand.Connection = this.Connection;
|
|
this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Products] SET [Name] = @Name, [Price] = @Price, [Barcode] = @Barcode, [ProductType_ProductTypeId] = @ProductType_ProductTypeId WHERE (([ProductId] = @Original_ProductId) AND ([Price] = @Original_Price) AND ((@IsNull_ProductType_ProductTypeId = 1 AND [ProductType_ProductTypeId] IS NULL) OR ([ProductType_ProductTypeId] = @Original_ProductType_ProductTypeId)));
|
|
SELECT ProductId, Name, Price, Barcode, ProductType_ProductTypeId FROM Products WHERE (ProductId = @ProductId)";
|
|
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Price", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Price", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Barcode", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Barcode", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductType_ProductTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductType_ProductTypeId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Price", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Price", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_ProductType_ProductTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductType_ProductTypeId", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductType_ProductTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductType_ProductTypeId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductId", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ProductId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitConnection() {
|
|
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
|
this._connection.ConnectionString = global::TinyPosEntity.Properties.Settings.Default.TestDatabaseConnectionString;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitCommandCollection() {
|
|
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
|
|
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
|
this._commandCollection[0].Connection = this.Connection;
|
|
this._commandCollection[0].CommandText = "SELECT ProductId, Name, Price, Barcode, ProductType_ProductTypeId FROM dbo.Produc" +
|
|
"ts";
|
|
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
|
|
public virtual int Fill(TestDatabaseDataSet.ProductsDataTable dataTable) {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
if ((this.ClearBeforeFill == true)) {
|
|
dataTable.Clear();
|
|
}
|
|
int returnValue = this.Adapter.Fill(dataTable);
|
|
return returnValue;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
|
|
public virtual TestDatabaseDataSet.ProductsDataTable GetData() {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
TestDatabaseDataSet.ProductsDataTable dataTable = new TestDatabaseDataSet.ProductsDataTable();
|
|
this.Adapter.Fill(dataTable);
|
|
return dataTable;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet.ProductsDataTable dataTable) {
|
|
return this.Adapter.Update(dataTable);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet dataSet) {
|
|
return this.Adapter.Update(dataSet, "Products");
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow dataRow) {
|
|
return this.Adapter.Update(new global::System.Data.DataRow[] {
|
|
dataRow});
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow[] dataRows) {
|
|
return this.Adapter.Update(dataRows);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
|
|
public virtual int Delete(int Original_ProductId, int Original_Price, global::System.Nullable<int> Original_ProductType_ProductTypeId) {
|
|
this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductId));
|
|
this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_Price));
|
|
if ((Original_ProductType_ProductTypeId.HasValue == true)) {
|
|
this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(0));
|
|
this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_ProductType_ProductTypeId.Value));
|
|
}
|
|
else {
|
|
this.Adapter.DeleteCommand.Parameters[2].Value = ((object)(1));
|
|
this.Adapter.DeleteCommand.Parameters[3].Value = global::System.DBNull.Value;
|
|
}
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
|
|
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.DeleteCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.DeleteCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
|
|
public virtual int Insert(string Name, int Price, string Barcode, global::System.Nullable<int> ProductType_ProductTypeId) {
|
|
if ((Name == null)) {
|
|
this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
|
|
}
|
|
this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Price));
|
|
if ((Barcode == null)) {
|
|
this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Barcode));
|
|
}
|
|
if ((ProductType_ProductTypeId.HasValue == true)) {
|
|
this.Adapter.InsertCommand.Parameters[3].Value = ((int)(ProductType_ProductTypeId.Value));
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value;
|
|
}
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
|
|
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.InsertCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.InsertCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(string Name, int Price, string Barcode, global::System.Nullable<int> ProductType_ProductTypeId, int Original_ProductId, int Original_Price, global::System.Nullable<int> Original_ProductType_ProductTypeId, int ProductId) {
|
|
if ((Name == null)) {
|
|
this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
|
|
}
|
|
this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Price));
|
|
if ((Barcode == null)) {
|
|
this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Barcode));
|
|
}
|
|
if ((ProductType_ProductTypeId.HasValue == true)) {
|
|
this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(ProductType_ProductTypeId.Value));
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value;
|
|
}
|
|
this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_ProductId));
|
|
this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_Price));
|
|
if ((Original_ProductType_ProductTypeId.HasValue == true)) {
|
|
this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0));
|
|
this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_ProductType_ProductTypeId.Value));
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1));
|
|
this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value;
|
|
}
|
|
this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(ProductId));
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
|
|
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.UpdateCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.UpdateCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(string Name, int Price, string Barcode, global::System.Nullable<int> ProductType_ProductTypeId, int Original_ProductId, int Original_Price, global::System.Nullable<int> Original_ProductType_ProductTypeId) {
|
|
return this.Update(Name, Price, Barcode, ProductType_ProductTypeId, Original_ProductId, Original_Price, Original_ProductType_ProductTypeId, Original_ProductId);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents the connection and commands used to retrieve and save data.
|
|
///</summary>
|
|
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
[global::System.ComponentModel.ToolboxItem(true)]
|
|
[global::System.ComponentModel.DataObjectAttribute(true)]
|
|
[global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
|
|
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public partial class ProductTypesTableAdapter : global::System.ComponentModel.Component {
|
|
|
|
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
|
|
|
|
private global::System.Data.SqlClient.SqlConnection _connection;
|
|
|
|
private global::System.Data.SqlClient.SqlTransaction _transaction;
|
|
|
|
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
|
|
|
|
private bool _clearBeforeFill;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public ProductTypesTableAdapter() {
|
|
this.ClearBeforeFill = true;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
|
|
get {
|
|
if ((this._adapter == null)) {
|
|
this.InitAdapter();
|
|
}
|
|
return this._adapter;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlConnection Connection {
|
|
get {
|
|
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)) {
|
|
((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlTransaction Transaction {
|
|
get {
|
|
return this._transaction;
|
|
}
|
|
set {
|
|
this._transaction = value;
|
|
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
|
|
this.CommandCollection[i].Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.DeleteCommand != null))) {
|
|
this.Adapter.DeleteCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.InsertCommand != null))) {
|
|
this.Adapter.InsertCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.UpdateCommand != null))) {
|
|
this.Adapter.UpdateCommand.Transaction = this._transaction;
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
|
|
get {
|
|
if ((this._commandCollection == null)) {
|
|
this.InitCommandCollection();
|
|
}
|
|
return this._commandCollection;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool ClearBeforeFill {
|
|
get {
|
|
return this._clearBeforeFill;
|
|
}
|
|
set {
|
|
this._clearBeforeFill = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitAdapter() {
|
|
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
|
|
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
|
|
tableMapping.SourceTable = "Table";
|
|
tableMapping.DataSetTable = "ProductTypes";
|
|
tableMapping.ColumnMappings.Add("ProductTypeId", "ProductTypeId");
|
|
tableMapping.ColumnMappings.Add("Name", "Name");
|
|
this._adapter.TableMappings.Add(tableMapping);
|
|
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.DeleteCommand.Connection = this.Connection;
|
|
this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[ProductTypes] WHERE (([ProductTypeId] = @Original_ProductTypeI" +
|
|
"d))";
|
|
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.InsertCommand.Connection = this.Connection;
|
|
this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[ProductTypes] ([Name]) VALUES (@Name);\r\nSELECT ProductTypeId, " +
|
|
"Name FROM ProductTypes WHERE (ProductTypeId = SCOPE_IDENTITY())";
|
|
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.UpdateCommand.Connection = this.Connection;
|
|
this._adapter.UpdateCommand.CommandText = "UPDATE [dbo].[ProductTypes] SET [Name] = @Name WHERE (([ProductTypeId] = @Origina" +
|
|
"l_ProductTypeId));\r\nSELECT ProductTypeId, Name FROM ProductTypes WHERE (ProductT" +
|
|
"ypeId = @ProductTypeId)";
|
|
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Name", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Name", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ProductTypeId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ProductTypeId", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ProductTypeId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitConnection() {
|
|
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
|
this._connection.ConnectionString = global::TinyPosEntity.Properties.Settings.Default.TestDatabaseConnectionString;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitCommandCollection() {
|
|
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
|
|
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
|
this._commandCollection[0].Connection = this.Connection;
|
|
this._commandCollection[0].CommandText = "SELECT ProductTypeId, Name FROM dbo.ProductTypes";
|
|
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
|
|
public virtual int Fill(TestDatabaseDataSet.ProductTypesDataTable dataTable) {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
if ((this.ClearBeforeFill == true)) {
|
|
dataTable.Clear();
|
|
}
|
|
int returnValue = this.Adapter.Fill(dataTable);
|
|
return returnValue;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
|
|
public virtual TestDatabaseDataSet.ProductTypesDataTable GetData() {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
TestDatabaseDataSet.ProductTypesDataTable dataTable = new TestDatabaseDataSet.ProductTypesDataTable();
|
|
this.Adapter.Fill(dataTable);
|
|
return dataTable;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet.ProductTypesDataTable dataTable) {
|
|
return this.Adapter.Update(dataTable);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet dataSet) {
|
|
return this.Adapter.Update(dataSet, "ProductTypes");
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow dataRow) {
|
|
return this.Adapter.Update(new global::System.Data.DataRow[] {
|
|
dataRow});
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow[] dataRows) {
|
|
return this.Adapter.Update(dataRows);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
|
|
public virtual int Delete(int Original_ProductTypeId) {
|
|
this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_ProductTypeId));
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
|
|
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.DeleteCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.DeleteCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
|
|
public virtual int Insert(string Name) {
|
|
if ((Name == null)) {
|
|
this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Name));
|
|
}
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
|
|
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.InsertCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.InsertCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(string Name, int Original_ProductTypeId, int ProductTypeId) {
|
|
if ((Name == null)) {
|
|
this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Name));
|
|
}
|
|
this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_ProductTypeId));
|
|
this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(ProductTypeId));
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
|
|
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.UpdateCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.UpdateCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(string Name, int Original_ProductTypeId) {
|
|
return this.Update(Name, Original_ProductTypeId, Original_ProductTypeId);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents the connection and commands used to retrieve and save data.
|
|
///</summary>
|
|
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
[global::System.ComponentModel.ToolboxItem(true)]
|
|
[global::System.ComponentModel.DataObjectAttribute(true)]
|
|
[global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
|
|
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public partial class TransactionItemsTableAdapter : global::System.ComponentModel.Component {
|
|
|
|
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
|
|
|
|
private global::System.Data.SqlClient.SqlConnection _connection;
|
|
|
|
private global::System.Data.SqlClient.SqlTransaction _transaction;
|
|
|
|
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
|
|
|
|
private bool _clearBeforeFill;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionItemsTableAdapter() {
|
|
this.ClearBeforeFill = true;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
|
|
get {
|
|
if ((this._adapter == null)) {
|
|
this.InitAdapter();
|
|
}
|
|
return this._adapter;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlConnection Connection {
|
|
get {
|
|
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)) {
|
|
((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlTransaction Transaction {
|
|
get {
|
|
return this._transaction;
|
|
}
|
|
set {
|
|
this._transaction = value;
|
|
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
|
|
this.CommandCollection[i].Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.DeleteCommand != null))) {
|
|
this.Adapter.DeleteCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.InsertCommand != null))) {
|
|
this.Adapter.InsertCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.UpdateCommand != null))) {
|
|
this.Adapter.UpdateCommand.Transaction = this._transaction;
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
|
|
get {
|
|
if ((this._commandCollection == null)) {
|
|
this.InitCommandCollection();
|
|
}
|
|
return this._commandCollection;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool ClearBeforeFill {
|
|
get {
|
|
return this._clearBeforeFill;
|
|
}
|
|
set {
|
|
this._clearBeforeFill = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitAdapter() {
|
|
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
|
|
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
|
|
tableMapping.SourceTable = "Table";
|
|
tableMapping.DataSetTable = "TransactionItems";
|
|
tableMapping.ColumnMappings.Add("TransactionItemId", "TransactionItemId");
|
|
tableMapping.ColumnMappings.Add("Product_ProductId", "Product_ProductId");
|
|
tableMapping.ColumnMappings.Add("Transaction_TransactionId", "Transaction_TransactionId");
|
|
this._adapter.TableMappings.Add(tableMapping);
|
|
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.DeleteCommand.Connection = this.Connection;
|
|
this._adapter.DeleteCommand.CommandText = @"DELETE FROM [dbo].[TransactionItems] WHERE (([TransactionItemId] = @Original_TransactionItemId) AND ((@IsNull_Product_ProductId = 1 AND [Product_ProductId] IS NULL) OR ([Product_ProductId] = @Original_Product_ProductId)) AND ((@IsNull_Transaction_TransactionId = 1 AND [Transaction_TransactionId] IS NULL) OR ([Transaction_TransactionId] = @Original_Transaction_TransactionId)))";
|
|
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TransactionItemId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TransactionItemId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Product_ProductId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Product_ProductId", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Product_ProductId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Product_ProductId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Transaction_TransactionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Transaction_TransactionId", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Transaction_TransactionId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Transaction_TransactionId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.InsertCommand.Connection = this.Connection;
|
|
this._adapter.InsertCommand.CommandText = @"INSERT INTO [dbo].[TransactionItems] ([TransactionItemId], [Product_ProductId], [Transaction_TransactionId]) VALUES (@TransactionItemId, @Product_ProductId, @Transaction_TransactionId);
|
|
SELECT TransactionItemId, Product_ProductId, Transaction_TransactionId FROM TransactionItems WHERE (TransactionItemId = @TransactionItemId)";
|
|
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TransactionItemId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TransactionItemId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Product_ProductId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Product_ProductId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Transaction_TransactionId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Transaction_TransactionId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.UpdateCommand.Connection = this.Connection;
|
|
this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[TransactionItems] SET [TransactionItemId] = @TransactionItemId, [Product_ProductId] = @Product_ProductId, [Transaction_TransactionId] = @Transaction_TransactionId WHERE (([TransactionItemId] = @Original_TransactionItemId) AND ((@IsNull_Product_ProductId = 1 AND [Product_ProductId] IS NULL) OR ([Product_ProductId] = @Original_Product_ProductId)) AND ((@IsNull_Transaction_TransactionId = 1 AND [Transaction_TransactionId] IS NULL) OR ([Transaction_TransactionId] = @Original_Transaction_TransactionId)));
|
|
SELECT TransactionItemId, Product_ProductId, Transaction_TransactionId FROM TransactionItems WHERE (TransactionItemId = @TransactionItemId)";
|
|
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TransactionItemId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TransactionItemId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Product_ProductId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Product_ProductId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Transaction_TransactionId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Transaction_TransactionId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TransactionItemId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TransactionItemId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Product_ProductId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Product_ProductId", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Product_ProductId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Product_ProductId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Transaction_TransactionId", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Transaction_TransactionId", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Transaction_TransactionId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Transaction_TransactionId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitConnection() {
|
|
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
|
this._connection.ConnectionString = global::TinyPosEntity.Properties.Settings.Default.TestDatabaseConnectionString;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitCommandCollection() {
|
|
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
|
|
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
|
this._commandCollection[0].Connection = this.Connection;
|
|
this._commandCollection[0].CommandText = "SELECT TransactionItemId, Product_ProductId, Transaction_TransactionId FROM dbo.T" +
|
|
"ransactionItems";
|
|
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
|
|
public virtual int Fill(TestDatabaseDataSet.TransactionItemsDataTable dataTable) {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
if ((this.ClearBeforeFill == true)) {
|
|
dataTable.Clear();
|
|
}
|
|
int returnValue = this.Adapter.Fill(dataTable);
|
|
return returnValue;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
|
|
public virtual TestDatabaseDataSet.TransactionItemsDataTable GetData() {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
TestDatabaseDataSet.TransactionItemsDataTable dataTable = new TestDatabaseDataSet.TransactionItemsDataTable();
|
|
this.Adapter.Fill(dataTable);
|
|
return dataTable;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet.TransactionItemsDataTable dataTable) {
|
|
return this.Adapter.Update(dataTable);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet dataSet) {
|
|
return this.Adapter.Update(dataSet, "TransactionItems");
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow dataRow) {
|
|
return this.Adapter.Update(new global::System.Data.DataRow[] {
|
|
dataRow});
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow[] dataRows) {
|
|
return this.Adapter.Update(dataRows);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
|
|
public virtual int Delete(string Original_TransactionItemId, global::System.Nullable<int> Original_Product_ProductId, string Original_Transaction_TransactionId) {
|
|
if ((Original_TransactionItemId == null)) {
|
|
throw new global::System.ArgumentNullException("Original_TransactionItemId");
|
|
}
|
|
else {
|
|
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_TransactionItemId));
|
|
}
|
|
if ((Original_Product_ProductId.HasValue == true)) {
|
|
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
|
|
this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Product_ProductId.Value));
|
|
}
|
|
else {
|
|
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
|
|
this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
|
|
}
|
|
if ((Original_Transaction_TransactionId == null)) {
|
|
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
|
|
this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
|
|
this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Transaction_TransactionId));
|
|
}
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
|
|
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.DeleteCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.DeleteCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
|
|
public virtual int Insert(string TransactionItemId, global::System.Nullable<int> Product_ProductId, string Transaction_TransactionId) {
|
|
if ((TransactionItemId == null)) {
|
|
throw new global::System.ArgumentNullException("TransactionItemId");
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(TransactionItemId));
|
|
}
|
|
if ((Product_ProductId.HasValue == true)) {
|
|
this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Product_ProductId.Value));
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
|
|
}
|
|
if ((Transaction_TransactionId == null)) {
|
|
this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Transaction_TransactionId));
|
|
}
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
|
|
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.InsertCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.InsertCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(string TransactionItemId, global::System.Nullable<int> Product_ProductId, string Transaction_TransactionId, string Original_TransactionItemId, global::System.Nullable<int> Original_Product_ProductId, string Original_Transaction_TransactionId) {
|
|
if ((TransactionItemId == null)) {
|
|
throw new global::System.ArgumentNullException("TransactionItemId");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(TransactionItemId));
|
|
}
|
|
if ((Product_ProductId.HasValue == true)) {
|
|
this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Product_ProductId.Value));
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
|
|
}
|
|
if ((Transaction_TransactionId == null)) {
|
|
this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Transaction_TransactionId));
|
|
}
|
|
if ((Original_TransactionItemId == null)) {
|
|
throw new global::System.ArgumentNullException("Original_TransactionItemId");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_TransactionItemId));
|
|
}
|
|
if ((Original_Product_ProductId.HasValue == true)) {
|
|
this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0));
|
|
this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_Product_ProductId.Value));
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1));
|
|
this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
|
|
}
|
|
if ((Original_Transaction_TransactionId == null)) {
|
|
this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(1));
|
|
this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value;
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[6].Value = ((object)(0));
|
|
this.Adapter.UpdateCommand.Parameters[7].Value = ((string)(Original_Transaction_TransactionId));
|
|
}
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
|
|
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.UpdateCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.UpdateCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(global::System.Nullable<int> Product_ProductId, string Transaction_TransactionId, string Original_TransactionItemId, global::System.Nullable<int> Original_Product_ProductId, string Original_Transaction_TransactionId) {
|
|
return this.Update(Original_TransactionItemId, Product_ProductId, Transaction_TransactionId, Original_TransactionItemId, Original_Product_ProductId, Original_Transaction_TransactionId);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Represents the connection and commands used to retrieve and save data.
|
|
///</summary>
|
|
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
[global::System.ComponentModel.ToolboxItem(true)]
|
|
[global::System.ComponentModel.DataObjectAttribute(true)]
|
|
[global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterDesigner, Microsoft.VSDesigner" +
|
|
", Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public partial class TransactionsTableAdapter : global::System.ComponentModel.Component {
|
|
|
|
private global::System.Data.SqlClient.SqlDataAdapter _adapter;
|
|
|
|
private global::System.Data.SqlClient.SqlConnection _connection;
|
|
|
|
private global::System.Data.SqlClient.SqlTransaction _transaction;
|
|
|
|
private global::System.Data.SqlClient.SqlCommand[] _commandCollection;
|
|
|
|
private bool _clearBeforeFill;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public TransactionsTableAdapter() {
|
|
this.ClearBeforeFill = true;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected internal global::System.Data.SqlClient.SqlDataAdapter Adapter {
|
|
get {
|
|
if ((this._adapter == null)) {
|
|
this.InitAdapter();
|
|
}
|
|
return this._adapter;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlConnection Connection {
|
|
get {
|
|
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)) {
|
|
((global::System.Data.SqlClient.SqlCommand)(this.CommandCollection[i])).Connection = value;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal global::System.Data.SqlClient.SqlTransaction Transaction {
|
|
get {
|
|
return this._transaction;
|
|
}
|
|
set {
|
|
this._transaction = value;
|
|
for (int i = 0; (i < this.CommandCollection.Length); i = (i + 1)) {
|
|
this.CommandCollection[i].Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.DeleteCommand != null))) {
|
|
this.Adapter.DeleteCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.InsertCommand != null))) {
|
|
this.Adapter.InsertCommand.Transaction = this._transaction;
|
|
}
|
|
if (((this.Adapter != null)
|
|
&& (this.Adapter.UpdateCommand != null))) {
|
|
this.Adapter.UpdateCommand.Transaction = this._transaction;
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected global::System.Data.SqlClient.SqlCommand[] CommandCollection {
|
|
get {
|
|
if ((this._commandCollection == null)) {
|
|
this.InitCommandCollection();
|
|
}
|
|
return this._commandCollection;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool ClearBeforeFill {
|
|
get {
|
|
return this._clearBeforeFill;
|
|
}
|
|
set {
|
|
this._clearBeforeFill = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitAdapter() {
|
|
this._adapter = new global::System.Data.SqlClient.SqlDataAdapter();
|
|
global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping();
|
|
tableMapping.SourceTable = "Table";
|
|
tableMapping.DataSetTable = "Transactions";
|
|
tableMapping.ColumnMappings.Add("TransactionId", "TransactionId");
|
|
tableMapping.ColumnMappings.Add("Timestamp", "Timestamp");
|
|
this._adapter.TableMappings.Add(tableMapping);
|
|
this._adapter.DeleteCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.DeleteCommand.Connection = this.Connection;
|
|
this._adapter.DeleteCommand.CommandText = "DELETE FROM [dbo].[Transactions] WHERE (([TransactionId] = @Original_TransactionI" +
|
|
"d) AND ([Timestamp] = @Original_Timestamp))";
|
|
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TransactionId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TransactionId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Timestamp", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Timestamp", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.InsertCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.InsertCommand.Connection = this.Connection;
|
|
this._adapter.InsertCommand.CommandText = "INSERT INTO [dbo].[Transactions] ([TransactionId], [Timestamp]) VALUES (@Transact" +
|
|
"ionId, @Timestamp);\r\nSELECT TransactionId, Timestamp FROM Transactions WHERE (Tr" +
|
|
"ansactionId = @TransactionId)";
|
|
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TransactionId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TransactionId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Timestamp", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Timestamp", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand = new global::System.Data.SqlClient.SqlCommand();
|
|
this._adapter.UpdateCommand.Connection = this.Connection;
|
|
this._adapter.UpdateCommand.CommandText = @"UPDATE [dbo].[Transactions] SET [TransactionId] = @TransactionId, [Timestamp] = @Timestamp WHERE (([TransactionId] = @Original_TransactionId) AND ([Timestamp] = @Original_Timestamp));
|
|
SELECT TransactionId, Timestamp FROM Transactions WHERE (TransactionId = @TransactionId)";
|
|
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@TransactionId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TransactionId", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Timestamp", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Timestamp", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_TransactionId", global::System.Data.SqlDbType.NVarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "TransactionId", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Timestamp", global::System.Data.SqlDbType.DateTime, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Timestamp", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitConnection() {
|
|
this._connection = new global::System.Data.SqlClient.SqlConnection();
|
|
this._connection.ConnectionString = global::TinyPosEntity.Properties.Settings.Default.TestDatabaseConnectionString;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private void InitCommandCollection() {
|
|
this._commandCollection = new global::System.Data.SqlClient.SqlCommand[1];
|
|
this._commandCollection[0] = new global::System.Data.SqlClient.SqlCommand();
|
|
this._commandCollection[0].Connection = this.Connection;
|
|
this._commandCollection[0].CommandText = "SELECT TransactionId, Timestamp FROM dbo.Transactions";
|
|
this._commandCollection[0].CommandType = global::System.Data.CommandType.Text;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, true)]
|
|
public virtual int Fill(TestDatabaseDataSet.TransactionsDataTable dataTable) {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
if ((this.ClearBeforeFill == true)) {
|
|
dataTable.Clear();
|
|
}
|
|
int returnValue = this.Adapter.Fill(dataTable);
|
|
return returnValue;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, true)]
|
|
public virtual TestDatabaseDataSet.TransactionsDataTable GetData() {
|
|
this.Adapter.SelectCommand = this.CommandCollection[0];
|
|
TestDatabaseDataSet.TransactionsDataTable dataTable = new TestDatabaseDataSet.TransactionsDataTable();
|
|
this.Adapter.Fill(dataTable);
|
|
return dataTable;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet.TransactionsDataTable dataTable) {
|
|
return this.Adapter.Update(dataTable);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(TestDatabaseDataSet dataSet) {
|
|
return this.Adapter.Update(dataSet, "Transactions");
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow dataRow) {
|
|
return this.Adapter.Update(new global::System.Data.DataRow[] {
|
|
dataRow});
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
public virtual int Update(global::System.Data.DataRow[] dataRows) {
|
|
return this.Adapter.Update(dataRows);
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Delete, true)]
|
|
public virtual int Delete(string Original_TransactionId, System.DateTime Original_Timestamp) {
|
|
if ((Original_TransactionId == null)) {
|
|
throw new global::System.ArgumentNullException("Original_TransactionId");
|
|
}
|
|
else {
|
|
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_TransactionId));
|
|
}
|
|
this.Adapter.DeleteCommand.Parameters[1].Value = ((System.DateTime)(Original_Timestamp));
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State;
|
|
if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.DeleteCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.DeleteCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)]
|
|
public virtual int Insert(string TransactionId, System.DateTime Timestamp) {
|
|
if ((TransactionId == null)) {
|
|
throw new global::System.ArgumentNullException("TransactionId");
|
|
}
|
|
else {
|
|
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(TransactionId));
|
|
}
|
|
this.Adapter.InsertCommand.Parameters[1].Value = ((System.DateTime)(Timestamp));
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State;
|
|
if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.InsertCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.InsertCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(string TransactionId, System.DateTime Timestamp, string Original_TransactionId, System.DateTime Original_Timestamp) {
|
|
if ((TransactionId == null)) {
|
|
throw new global::System.ArgumentNullException("TransactionId");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(TransactionId));
|
|
}
|
|
this.Adapter.UpdateCommand.Parameters[1].Value = ((System.DateTime)(Timestamp));
|
|
if ((Original_TransactionId == null)) {
|
|
throw new global::System.ArgumentNullException("Original_TransactionId");
|
|
}
|
|
else {
|
|
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_TransactionId));
|
|
}
|
|
this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(Original_Timestamp));
|
|
global::System.Data.ConnectionState previousConnectionState = this.Adapter.UpdateCommand.Connection.State;
|
|
if (((this.Adapter.UpdateCommand.Connection.State & global::System.Data.ConnectionState.Open)
|
|
!= global::System.Data.ConnectionState.Open)) {
|
|
this.Adapter.UpdateCommand.Connection.Open();
|
|
}
|
|
try {
|
|
int returnValue = this.Adapter.UpdateCommand.ExecuteNonQuery();
|
|
return returnValue;
|
|
}
|
|
finally {
|
|
if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) {
|
|
this.Adapter.UpdateCommand.Connection.Close();
|
|
}
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")]
|
|
[global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)]
|
|
public virtual int Update(System.DateTime Timestamp, string Original_TransactionId, System.DateTime Original_Timestamp) {
|
|
return this.Update(Original_TransactionId, Timestamp, Original_TransactionId, Original_Timestamp);
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
|
|
///</summary>
|
|
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
|
|
[global::System.ComponentModel.ToolboxItem(true)]
|
|
[global::System.ComponentModel.DesignerAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerDesigner, Microsoft.VSD" +
|
|
"esigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
|
|
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapterManager")]
|
|
public partial class TableAdapterManager : global::System.ComponentModel.Component {
|
|
|
|
private UpdateOrderOption _updateOrder;
|
|
|
|
private @__MigrationHistoryTableAdapter ___MigrationHistoryTableAdapter;
|
|
|
|
private ProductsTableAdapter _productsTableAdapter;
|
|
|
|
private ProductTypesTableAdapter _productTypesTableAdapter;
|
|
|
|
private TransactionItemsTableAdapter _transactionItemsTableAdapter;
|
|
|
|
private TransactionsTableAdapter _transactionsTableAdapter;
|
|
|
|
private bool _backupDataSetBeforeUpdate;
|
|
|
|
private global::System.Data.IDbConnection _connection;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public UpdateOrderOption UpdateOrder {
|
|
get {
|
|
return this._updateOrder;
|
|
}
|
|
set {
|
|
this._updateOrder = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
|
|
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
|
|
"a", "System.Drawing.Design.UITypeEditor")]
|
|
public @__MigrationHistoryTableAdapter @__MigrationHistoryTableAdapter {
|
|
get {
|
|
return this.___MigrationHistoryTableAdapter;
|
|
}
|
|
set {
|
|
this.___MigrationHistoryTableAdapter = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
|
|
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
|
|
"a", "System.Drawing.Design.UITypeEditor")]
|
|
public ProductsTableAdapter ProductsTableAdapter {
|
|
get {
|
|
return this._productsTableAdapter;
|
|
}
|
|
set {
|
|
this._productsTableAdapter = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
|
|
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
|
|
"a", "System.Drawing.Design.UITypeEditor")]
|
|
public ProductTypesTableAdapter ProductTypesTableAdapter {
|
|
get {
|
|
return this._productTypesTableAdapter;
|
|
}
|
|
set {
|
|
this._productTypesTableAdapter = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
|
|
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
|
|
"a", "System.Drawing.Design.UITypeEditor")]
|
|
public TransactionItemsTableAdapter TransactionItemsTableAdapter {
|
|
get {
|
|
return this._transactionItemsTableAdapter;
|
|
}
|
|
set {
|
|
this._transactionItemsTableAdapter = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.EditorAttribute("Microsoft.VSDesigner.DataSource.Design.TableAdapterManagerPropertyEditor, Microso" +
|
|
"ft.VSDesigner, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3" +
|
|
"a", "System.Drawing.Design.UITypeEditor")]
|
|
public TransactionsTableAdapter TransactionsTableAdapter {
|
|
get {
|
|
return this._transactionsTableAdapter;
|
|
}
|
|
set {
|
|
this._transactionsTableAdapter = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public bool BackupDataSetBeforeUpdate {
|
|
get {
|
|
return this._backupDataSetBeforeUpdate;
|
|
}
|
|
set {
|
|
this._backupDataSetBeforeUpdate = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
public global::System.Data.IDbConnection Connection {
|
|
get {
|
|
if ((this._connection != null)) {
|
|
return this._connection;
|
|
}
|
|
if (((this.___MigrationHistoryTableAdapter != null)
|
|
&& (this.___MigrationHistoryTableAdapter.Connection != null))) {
|
|
return this.___MigrationHistoryTableAdapter.Connection;
|
|
}
|
|
if (((this._productsTableAdapter != null)
|
|
&& (this._productsTableAdapter.Connection != null))) {
|
|
return this._productsTableAdapter.Connection;
|
|
}
|
|
if (((this._productTypesTableAdapter != null)
|
|
&& (this._productTypesTableAdapter.Connection != null))) {
|
|
return this._productTypesTableAdapter.Connection;
|
|
}
|
|
if (((this._transactionItemsTableAdapter != null)
|
|
&& (this._transactionItemsTableAdapter.Connection != null))) {
|
|
return this._transactionItemsTableAdapter.Connection;
|
|
}
|
|
if (((this._transactionsTableAdapter != null)
|
|
&& (this._transactionsTableAdapter.Connection != null))) {
|
|
return this._transactionsTableAdapter.Connection;
|
|
}
|
|
return null;
|
|
}
|
|
set {
|
|
this._connection = value;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
[global::System.ComponentModel.Browsable(false)]
|
|
public int TableAdapterInstanceCount {
|
|
get {
|
|
int count = 0;
|
|
if ((this.___MigrationHistoryTableAdapter != null)) {
|
|
count = (count + 1);
|
|
}
|
|
if ((this._productsTableAdapter != null)) {
|
|
count = (count + 1);
|
|
}
|
|
if ((this._productTypesTableAdapter != null)) {
|
|
count = (count + 1);
|
|
}
|
|
if ((this._transactionItemsTableAdapter != null)) {
|
|
count = (count + 1);
|
|
}
|
|
if ((this._transactionsTableAdapter != null)) {
|
|
count = (count + 1);
|
|
}
|
|
return count;
|
|
}
|
|
}
|
|
|
|
/// <summary>
|
|
///Update rows in top-down order.
|
|
///</summary>
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private int UpdateUpdatedRows(TestDatabaseDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
|
|
int result = 0;
|
|
if ((this._productTypesTableAdapter != null)) {
|
|
global::System.Data.DataRow[] updatedRows = dataSet.ProductTypes.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
|
|
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
|
|
if (((updatedRows != null)
|
|
&& (0 < updatedRows.Length))) {
|
|
result = (result + this._productTypesTableAdapter.Update(updatedRows));
|
|
allChangedRows.AddRange(updatedRows);
|
|
}
|
|
}
|
|
if ((this._productsTableAdapter != null)) {
|
|
global::System.Data.DataRow[] updatedRows = dataSet.Products.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
|
|
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
|
|
if (((updatedRows != null)
|
|
&& (0 < updatedRows.Length))) {
|
|
result = (result + this._productsTableAdapter.Update(updatedRows));
|
|
allChangedRows.AddRange(updatedRows);
|
|
}
|
|
}
|
|
if ((this._transactionsTableAdapter != null)) {
|
|
global::System.Data.DataRow[] updatedRows = dataSet.Transactions.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
|
|
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
|
|
if (((updatedRows != null)
|
|
&& (0 < updatedRows.Length))) {
|
|
result = (result + this._transactionsTableAdapter.Update(updatedRows));
|
|
allChangedRows.AddRange(updatedRows);
|
|
}
|
|
}
|
|
if ((this.___MigrationHistoryTableAdapter != null)) {
|
|
global::System.Data.DataRow[] updatedRows = dataSet.@__MigrationHistory.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
|
|
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
|
|
if (((updatedRows != null)
|
|
&& (0 < updatedRows.Length))) {
|
|
result = (result + this.___MigrationHistoryTableAdapter.Update(updatedRows));
|
|
allChangedRows.AddRange(updatedRows);
|
|
}
|
|
}
|
|
if ((this._transactionItemsTableAdapter != null)) {
|
|
global::System.Data.DataRow[] updatedRows = dataSet.TransactionItems.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
|
|
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
|
|
if (((updatedRows != null)
|
|
&& (0 < updatedRows.Length))) {
|
|
result = (result + this._transactionItemsTableAdapter.Update(updatedRows));
|
|
allChangedRows.AddRange(updatedRows);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/// <summary>
|
|
///Insert rows in top-down order.
|
|
///</summary>
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private int UpdateInsertedRows(TestDatabaseDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
|
|
int result = 0;
|
|
if ((this._productTypesTableAdapter != null)) {
|
|
global::System.Data.DataRow[] addedRows = dataSet.ProductTypes.Select(null, null, global::System.Data.DataViewRowState.Added);
|
|
if (((addedRows != null)
|
|
&& (0 < addedRows.Length))) {
|
|
result = (result + this._productTypesTableAdapter.Update(addedRows));
|
|
allAddedRows.AddRange(addedRows);
|
|
}
|
|
}
|
|
if ((this._productsTableAdapter != null)) {
|
|
global::System.Data.DataRow[] addedRows = dataSet.Products.Select(null, null, global::System.Data.DataViewRowState.Added);
|
|
if (((addedRows != null)
|
|
&& (0 < addedRows.Length))) {
|
|
result = (result + this._productsTableAdapter.Update(addedRows));
|
|
allAddedRows.AddRange(addedRows);
|
|
}
|
|
}
|
|
if ((this._transactionsTableAdapter != null)) {
|
|
global::System.Data.DataRow[] addedRows = dataSet.Transactions.Select(null, null, global::System.Data.DataViewRowState.Added);
|
|
if (((addedRows != null)
|
|
&& (0 < addedRows.Length))) {
|
|
result = (result + this._transactionsTableAdapter.Update(addedRows));
|
|
allAddedRows.AddRange(addedRows);
|
|
}
|
|
}
|
|
if ((this.___MigrationHistoryTableAdapter != null)) {
|
|
global::System.Data.DataRow[] addedRows = dataSet.@__MigrationHistory.Select(null, null, global::System.Data.DataViewRowState.Added);
|
|
if (((addedRows != null)
|
|
&& (0 < addedRows.Length))) {
|
|
result = (result + this.___MigrationHistoryTableAdapter.Update(addedRows));
|
|
allAddedRows.AddRange(addedRows);
|
|
}
|
|
}
|
|
if ((this._transactionItemsTableAdapter != null)) {
|
|
global::System.Data.DataRow[] addedRows = dataSet.TransactionItems.Select(null, null, global::System.Data.DataViewRowState.Added);
|
|
if (((addedRows != null)
|
|
&& (0 < addedRows.Length))) {
|
|
result = (result + this._transactionItemsTableAdapter.Update(addedRows));
|
|
allAddedRows.AddRange(addedRows);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/// <summary>
|
|
///Delete rows in bottom-up order.
|
|
///</summary>
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private int UpdateDeletedRows(TestDatabaseDataSet dataSet, global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows) {
|
|
int result = 0;
|
|
if ((this._transactionItemsTableAdapter != null)) {
|
|
global::System.Data.DataRow[] deletedRows = dataSet.TransactionItems.Select(null, null, global::System.Data.DataViewRowState.Deleted);
|
|
if (((deletedRows != null)
|
|
&& (0 < deletedRows.Length))) {
|
|
result = (result + this._transactionItemsTableAdapter.Update(deletedRows));
|
|
allChangedRows.AddRange(deletedRows);
|
|
}
|
|
}
|
|
if ((this.___MigrationHistoryTableAdapter != null)) {
|
|
global::System.Data.DataRow[] deletedRows = dataSet.@__MigrationHistory.Select(null, null, global::System.Data.DataViewRowState.Deleted);
|
|
if (((deletedRows != null)
|
|
&& (0 < deletedRows.Length))) {
|
|
result = (result + this.___MigrationHistoryTableAdapter.Update(deletedRows));
|
|
allChangedRows.AddRange(deletedRows);
|
|
}
|
|
}
|
|
if ((this._transactionsTableAdapter != null)) {
|
|
global::System.Data.DataRow[] deletedRows = dataSet.Transactions.Select(null, null, global::System.Data.DataViewRowState.Deleted);
|
|
if (((deletedRows != null)
|
|
&& (0 < deletedRows.Length))) {
|
|
result = (result + this._transactionsTableAdapter.Update(deletedRows));
|
|
allChangedRows.AddRange(deletedRows);
|
|
}
|
|
}
|
|
if ((this._productsTableAdapter != null)) {
|
|
global::System.Data.DataRow[] deletedRows = dataSet.Products.Select(null, null, global::System.Data.DataViewRowState.Deleted);
|
|
if (((deletedRows != null)
|
|
&& (0 < deletedRows.Length))) {
|
|
result = (result + this._productsTableAdapter.Update(deletedRows));
|
|
allChangedRows.AddRange(deletedRows);
|
|
}
|
|
}
|
|
if ((this._productTypesTableAdapter != null)) {
|
|
global::System.Data.DataRow[] deletedRows = dataSet.ProductTypes.Select(null, null, global::System.Data.DataViewRowState.Deleted);
|
|
if (((deletedRows != null)
|
|
&& (0 < deletedRows.Length))) {
|
|
result = (result + this._productTypesTableAdapter.Update(deletedRows));
|
|
allChangedRows.AddRange(deletedRows);
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
/// <summary>
|
|
///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
|
|
///</summary>
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private global::System.Data.DataRow[] GetRealUpdatedRows(global::System.Data.DataRow[] updatedRows, global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows) {
|
|
if (((updatedRows == null)
|
|
|| (updatedRows.Length < 1))) {
|
|
return updatedRows;
|
|
}
|
|
if (((allAddedRows == null)
|
|
|| (allAddedRows.Count < 1))) {
|
|
return updatedRows;
|
|
}
|
|
global::System.Collections.Generic.List<global::System.Data.DataRow> realUpdatedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
|
|
for (int i = 0; (i < updatedRows.Length); i = (i + 1)) {
|
|
global::System.Data.DataRow row = updatedRows[i];
|
|
if ((allAddedRows.Contains(row) == false)) {
|
|
realUpdatedRows.Add(row);
|
|
}
|
|
}
|
|
return realUpdatedRows.ToArray();
|
|
}
|
|
|
|
/// <summary>
|
|
///Update all changes to the dataset.
|
|
///</summary>
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public virtual int UpdateAll(TestDatabaseDataSet dataSet) {
|
|
if ((dataSet == null)) {
|
|
throw new global::System.ArgumentNullException("dataSet");
|
|
}
|
|
if ((dataSet.HasChanges() == false)) {
|
|
return 0;
|
|
}
|
|
if (((this.___MigrationHistoryTableAdapter != null)
|
|
&& (this.MatchTableAdapterConnection(this.___MigrationHistoryTableAdapter.Connection) == false))) {
|
|
throw new global::System.ArgumentException("TableAdapterManager에서 관리하는 모든 TableAdapter에는 동일한 연결 문자열을 사용해야 합니다.");
|
|
}
|
|
if (((this._productsTableAdapter != null)
|
|
&& (this.MatchTableAdapterConnection(this._productsTableAdapter.Connection) == false))) {
|
|
throw new global::System.ArgumentException("TableAdapterManager에서 관리하는 모든 TableAdapter에는 동일한 연결 문자열을 사용해야 합니다.");
|
|
}
|
|
if (((this._productTypesTableAdapter != null)
|
|
&& (this.MatchTableAdapterConnection(this._productTypesTableAdapter.Connection) == false))) {
|
|
throw new global::System.ArgumentException("TableAdapterManager에서 관리하는 모든 TableAdapter에는 동일한 연결 문자열을 사용해야 합니다.");
|
|
}
|
|
if (((this._transactionItemsTableAdapter != null)
|
|
&& (this.MatchTableAdapterConnection(this._transactionItemsTableAdapter.Connection) == false))) {
|
|
throw new global::System.ArgumentException("TableAdapterManager에서 관리하는 모든 TableAdapter에는 동일한 연결 문자열을 사용해야 합니다.");
|
|
}
|
|
if (((this._transactionsTableAdapter != null)
|
|
&& (this.MatchTableAdapterConnection(this._transactionsTableAdapter.Connection) == false))) {
|
|
throw new global::System.ArgumentException("TableAdapterManager에서 관리하는 모든 TableAdapter에는 동일한 연결 문자열을 사용해야 합니다.");
|
|
}
|
|
global::System.Data.IDbConnection workConnection = this.Connection;
|
|
if ((workConnection == null)) {
|
|
throw new global::System.ApplicationException("TableAdapterManager에 연결 정보가 없습니다. 각 TableAdapterManager TableAdapter 속성을 올바른 Tabl" +
|
|
"eAdapter 인스턴스로 설정하십시오.");
|
|
}
|
|
bool workConnOpened = false;
|
|
if (((workConnection.State & global::System.Data.ConnectionState.Broken)
|
|
== global::System.Data.ConnectionState.Broken)) {
|
|
workConnection.Close();
|
|
}
|
|
if ((workConnection.State == global::System.Data.ConnectionState.Closed)) {
|
|
workConnection.Open();
|
|
workConnOpened = true;
|
|
}
|
|
global::System.Data.IDbTransaction workTransaction = workConnection.BeginTransaction();
|
|
if ((workTransaction == null)) {
|
|
throw new global::System.ApplicationException("트랜잭션을 시작할 수 없습니다. 현재 데이터 연결에서 트랜잭션이 지원되지 않거나 현재 상태에서 트랜잭션을 시작할 수 없습니다.");
|
|
}
|
|
global::System.Collections.Generic.List<global::System.Data.DataRow> allChangedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
|
|
global::System.Collections.Generic.List<global::System.Data.DataRow> allAddedRows = new global::System.Collections.Generic.List<global::System.Data.DataRow>();
|
|
global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter> adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List<global::System.Data.Common.DataAdapter>();
|
|
global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection> revertConnections = new global::System.Collections.Generic.Dictionary<object, global::System.Data.IDbConnection>();
|
|
int result = 0;
|
|
global::System.Data.DataSet backupDataSet = null;
|
|
if (this.BackupDataSetBeforeUpdate) {
|
|
backupDataSet = new global::System.Data.DataSet();
|
|
backupDataSet.Merge(dataSet);
|
|
}
|
|
try {
|
|
// ---- Prepare for update -----------
|
|
//
|
|
if ((this.___MigrationHistoryTableAdapter != null)) {
|
|
revertConnections.Add(this.___MigrationHistoryTableAdapter, this.___MigrationHistoryTableAdapter.Connection);
|
|
this.___MigrationHistoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
|
|
this.___MigrationHistoryTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
|
|
if (this.___MigrationHistoryTableAdapter.Adapter.AcceptChangesDuringUpdate) {
|
|
this.___MigrationHistoryTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
|
|
adaptersWithAcceptChangesDuringUpdate.Add(this.___MigrationHistoryTableAdapter.Adapter);
|
|
}
|
|
}
|
|
if ((this._productsTableAdapter != null)) {
|
|
revertConnections.Add(this._productsTableAdapter, this._productsTableAdapter.Connection);
|
|
this._productsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
|
|
this._productsTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
|
|
if (this._productsTableAdapter.Adapter.AcceptChangesDuringUpdate) {
|
|
this._productsTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
|
|
adaptersWithAcceptChangesDuringUpdate.Add(this._productsTableAdapter.Adapter);
|
|
}
|
|
}
|
|
if ((this._productTypesTableAdapter != null)) {
|
|
revertConnections.Add(this._productTypesTableAdapter, this._productTypesTableAdapter.Connection);
|
|
this._productTypesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
|
|
this._productTypesTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
|
|
if (this._productTypesTableAdapter.Adapter.AcceptChangesDuringUpdate) {
|
|
this._productTypesTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
|
|
adaptersWithAcceptChangesDuringUpdate.Add(this._productTypesTableAdapter.Adapter);
|
|
}
|
|
}
|
|
if ((this._transactionItemsTableAdapter != null)) {
|
|
revertConnections.Add(this._transactionItemsTableAdapter, this._transactionItemsTableAdapter.Connection);
|
|
this._transactionItemsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
|
|
this._transactionItemsTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
|
|
if (this._transactionItemsTableAdapter.Adapter.AcceptChangesDuringUpdate) {
|
|
this._transactionItemsTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
|
|
adaptersWithAcceptChangesDuringUpdate.Add(this._transactionItemsTableAdapter.Adapter);
|
|
}
|
|
}
|
|
if ((this._transactionsTableAdapter != null)) {
|
|
revertConnections.Add(this._transactionsTableAdapter, this._transactionsTableAdapter.Connection);
|
|
this._transactionsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(workConnection));
|
|
this._transactionsTableAdapter.Transaction = ((global::System.Data.SqlClient.SqlTransaction)(workTransaction));
|
|
if (this._transactionsTableAdapter.Adapter.AcceptChangesDuringUpdate) {
|
|
this._transactionsTableAdapter.Adapter.AcceptChangesDuringUpdate = false;
|
|
adaptersWithAcceptChangesDuringUpdate.Add(this._transactionsTableAdapter.Adapter);
|
|
}
|
|
}
|
|
//
|
|
//---- Perform updates -----------
|
|
//
|
|
if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) {
|
|
result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
|
|
result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
|
|
}
|
|
else {
|
|
result = (result + this.UpdateInsertedRows(dataSet, allAddedRows));
|
|
result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows));
|
|
}
|
|
result = (result + this.UpdateDeletedRows(dataSet, allChangedRows));
|
|
//
|
|
//---- Commit updates -----------
|
|
//
|
|
workTransaction.Commit();
|
|
if ((0 < allAddedRows.Count)) {
|
|
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
|
|
allAddedRows.CopyTo(rows);
|
|
for (int i = 0; (i < rows.Length); i = (i + 1)) {
|
|
global::System.Data.DataRow row = rows[i];
|
|
row.AcceptChanges();
|
|
}
|
|
}
|
|
if ((0 < allChangedRows.Count)) {
|
|
global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count];
|
|
allChangedRows.CopyTo(rows);
|
|
for (int i = 0; (i < rows.Length); i = (i + 1)) {
|
|
global::System.Data.DataRow row = rows[i];
|
|
row.AcceptChanges();
|
|
}
|
|
}
|
|
}
|
|
catch (global::System.Exception ex) {
|
|
workTransaction.Rollback();
|
|
// ---- Restore the dataset -----------
|
|
if (this.BackupDataSetBeforeUpdate) {
|
|
global::System.Diagnostics.Debug.Assert((backupDataSet != null));
|
|
dataSet.Clear();
|
|
dataSet.Merge(backupDataSet);
|
|
}
|
|
else {
|
|
if ((0 < allAddedRows.Count)) {
|
|
global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count];
|
|
allAddedRows.CopyTo(rows);
|
|
for (int i = 0; (i < rows.Length); i = (i + 1)) {
|
|
global::System.Data.DataRow row = rows[i];
|
|
row.AcceptChanges();
|
|
row.SetAdded();
|
|
}
|
|
}
|
|
}
|
|
throw ex;
|
|
}
|
|
finally {
|
|
if (workConnOpened) {
|
|
workConnection.Close();
|
|
}
|
|
if ((this.___MigrationHistoryTableAdapter != null)) {
|
|
this.___MigrationHistoryTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this.___MigrationHistoryTableAdapter]));
|
|
this.___MigrationHistoryTableAdapter.Transaction = null;
|
|
}
|
|
if ((this._productsTableAdapter != null)) {
|
|
this._productsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productsTableAdapter]));
|
|
this._productsTableAdapter.Transaction = null;
|
|
}
|
|
if ((this._productTypesTableAdapter != null)) {
|
|
this._productTypesTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._productTypesTableAdapter]));
|
|
this._productTypesTableAdapter.Transaction = null;
|
|
}
|
|
if ((this._transactionItemsTableAdapter != null)) {
|
|
this._transactionItemsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._transactionItemsTableAdapter]));
|
|
this._transactionItemsTableAdapter.Transaction = null;
|
|
}
|
|
if ((this._transactionsTableAdapter != null)) {
|
|
this._transactionsTableAdapter.Connection = ((global::System.Data.SqlClient.SqlConnection)(revertConnections[this._transactionsTableAdapter]));
|
|
this._transactionsTableAdapter.Transaction = null;
|
|
}
|
|
if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) {
|
|
global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count];
|
|
adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters);
|
|
for (int i = 0; (i < adapters.Length); i = (i + 1)) {
|
|
global::System.Data.Common.DataAdapter adapter = adapters[i];
|
|
adapter.AcceptChangesDuringUpdate = true;
|
|
}
|
|
}
|
|
}
|
|
return result;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) {
|
|
global::System.Array.Sort<global::System.Data.DataRow>(rows, new SelfReferenceComparer(relation, childFirst));
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) {
|
|
if ((this._connection != null)) {
|
|
return true;
|
|
}
|
|
if (((this.Connection == null)
|
|
|| (inputConnection == null))) {
|
|
return true;
|
|
}
|
|
if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
/// <summary>
|
|
///Update Order Option
|
|
///</summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public enum UpdateOrderOption {
|
|
|
|
InsertUpdateDelete = 0,
|
|
|
|
UpdateInsertDelete = 1,
|
|
}
|
|
|
|
/// <summary>
|
|
///Used to sort self-referenced table's rows
|
|
///</summary>
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer<global::System.Data.DataRow> {
|
|
|
|
private global::System.Data.DataRelation _relation;
|
|
|
|
private int _childFirst;
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) {
|
|
this._relation = relation;
|
|
if (childFirst) {
|
|
this._childFirst = -1;
|
|
}
|
|
else {
|
|
this._childFirst = 1;
|
|
}
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) {
|
|
global::System.Diagnostics.Debug.Assert((row != null));
|
|
global::System.Data.DataRow root = row;
|
|
distance = 0;
|
|
|
|
global::System.Collections.Generic.IDictionary<global::System.Data.DataRow, global::System.Data.DataRow> traversedRows = new global::System.Collections.Generic.Dictionary<global::System.Data.DataRow, global::System.Data.DataRow>();
|
|
traversedRows[row] = row;
|
|
|
|
global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
|
|
for (
|
|
; ((parent != null)
|
|
&& (traversedRows.ContainsKey(parent) == false));
|
|
) {
|
|
distance = (distance + 1);
|
|
root = parent;
|
|
traversedRows[parent] = parent;
|
|
parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default);
|
|
}
|
|
|
|
if ((distance == 0)) {
|
|
traversedRows.Clear();
|
|
traversedRows[row] = row;
|
|
parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
|
|
for (
|
|
; ((parent != null)
|
|
&& (traversedRows.ContainsKey(parent) == false));
|
|
) {
|
|
distance = (distance + 1);
|
|
root = parent;
|
|
traversedRows[parent] = parent;
|
|
parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original);
|
|
}
|
|
}
|
|
|
|
return root;
|
|
}
|
|
|
|
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
|
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
|
|
public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) {
|
|
if (object.ReferenceEquals(row1, row2)) {
|
|
return 0;
|
|
}
|
|
if ((row1 == null)) {
|
|
return -1;
|
|
}
|
|
if ((row2 == null)) {
|
|
return 1;
|
|
}
|
|
|
|
int distance1 = 0;
|
|
global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1);
|
|
|
|
int distance2 = 0;
|
|
global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2);
|
|
|
|
if (object.ReferenceEquals(root1, root2)) {
|
|
return (this._childFirst * distance1.CompareTo(distance2));
|
|
}
|
|
else {
|
|
global::System.Diagnostics.Debug.Assert(((root1.Table != null)
|
|
&& (root2.Table != null)));
|
|
if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) {
|
|
return -1;
|
|
}
|
|
else {
|
|
return 1;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
#pragma warning restore 1591 |