//------------------------------------------------------------------------------
//
// This code was generated by a tool.
// Runtime Version:4.0.30319.261
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
//
//------------------------------------------------------------------------------
#pragma warning disable 1591
namespace malli {
///
///Represents a strongly typed in-memory cache of data.
///
[global::System.Serializable()]
[global::System.ComponentModel.DesignerCategoryAttribute("code")]
[global::System.ComponentModel.ToolboxItem(true)]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedDataSetSchema")]
[global::System.Xml.Serialization.XmlRootAttribute("luento20malliDataSet")]
[global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")]
public partial class luento20malliDataSet : global::System.Data.DataSet {
private AineDataTable tableAine;
private LiittyyDataTable tableLiittyy;
private OhjeDataTable tableOhje;
private ReseptiDataTable tableResepti;
private RuokalajiDataTable tableRuokalaji;
private YksikkoDataTable tableYksikko;
private global::System.Data.DataRelation relationLiittyy_AineID;
private global::System.Data.DataRelation relationLiittyy_Lyhenne;
private global::System.Data.DataRelation relationLiittyy_ReseptiID;
private global::System.Data.DataRelation relationOhje_ReseptiID;
private global::System.Data.DataRelation relationResepti_RuokalajiID;
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 luento20malliDataSet() {
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 luento20malliDataSet(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["Aine"] != null)) {
base.Tables.Add(new AineDataTable(ds.Tables["Aine"]));
}
if ((ds.Tables["Liittyy"] != null)) {
base.Tables.Add(new LiittyyDataTable(ds.Tables["Liittyy"]));
}
if ((ds.Tables["Ohje"] != null)) {
base.Tables.Add(new OhjeDataTable(ds.Tables["Ohje"]));
}
if ((ds.Tables["Resepti"] != null)) {
base.Tables.Add(new ReseptiDataTable(ds.Tables["Resepti"]));
}
if ((ds.Tables["Ruokalaji"] != null)) {
base.Tables.Add(new RuokalajiDataTable(ds.Tables["Ruokalaji"]));
}
if ((ds.Tables["Yksikko"] != null)) {
base.Tables.Add(new YksikkoDataTable(ds.Tables["Yksikko"]));
}
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 AineDataTable Aine {
get {
return this.tableAine;
}
}
[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 LiittyyDataTable Liittyy {
get {
return this.tableLiittyy;
}
}
[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 OhjeDataTable Ohje {
get {
return this.tableOhje;
}
}
[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 ReseptiDataTable Resepti {
get {
return this.tableResepti;
}
}
[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 RuokalajiDataTable Ruokalaji {
get {
return this.tableRuokalaji;
}
}
[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 YksikkoDataTable Yksikko {
get {
return this.tableYksikko;
}
}
[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() {
luento20malliDataSet cln = ((luento20malliDataSet)(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["Aine"] != null)) {
base.Tables.Add(new AineDataTable(ds.Tables["Aine"]));
}
if ((ds.Tables["Liittyy"] != null)) {
base.Tables.Add(new LiittyyDataTable(ds.Tables["Liittyy"]));
}
if ((ds.Tables["Ohje"] != null)) {
base.Tables.Add(new OhjeDataTable(ds.Tables["Ohje"]));
}
if ((ds.Tables["Resepti"] != null)) {
base.Tables.Add(new ReseptiDataTable(ds.Tables["Resepti"]));
}
if ((ds.Tables["Ruokalaji"] != null)) {
base.Tables.Add(new RuokalajiDataTable(ds.Tables["Ruokalaji"]));
}
if ((ds.Tables["Yksikko"] != null)) {
base.Tables.Add(new YksikkoDataTable(ds.Tables["Yksikko"]));
}
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.tableAine = ((AineDataTable)(base.Tables["Aine"]));
if ((initTable == true)) {
if ((this.tableAine != null)) {
this.tableAine.InitVars();
}
}
this.tableLiittyy = ((LiittyyDataTable)(base.Tables["Liittyy"]));
if ((initTable == true)) {
if ((this.tableLiittyy != null)) {
this.tableLiittyy.InitVars();
}
}
this.tableOhje = ((OhjeDataTable)(base.Tables["Ohje"]));
if ((initTable == true)) {
if ((this.tableOhje != null)) {
this.tableOhje.InitVars();
}
}
this.tableResepti = ((ReseptiDataTable)(base.Tables["Resepti"]));
if ((initTable == true)) {
if ((this.tableResepti != null)) {
this.tableResepti.InitVars();
}
}
this.tableRuokalaji = ((RuokalajiDataTable)(base.Tables["Ruokalaji"]));
if ((initTable == true)) {
if ((this.tableRuokalaji != null)) {
this.tableRuokalaji.InitVars();
}
}
this.tableYksikko = ((YksikkoDataTable)(base.Tables["Yksikko"]));
if ((initTable == true)) {
if ((this.tableYksikko != null)) {
this.tableYksikko.InitVars();
}
}
this.relationLiittyy_AineID = this.Relations["Liittyy_AineID"];
this.relationLiittyy_Lyhenne = this.Relations["Liittyy_Lyhenne"];
this.relationLiittyy_ReseptiID = this.Relations["Liittyy_ReseptiID"];
this.relationOhje_ReseptiID = this.Relations["Ohje_ReseptiID"];
this.relationResepti_RuokalajiID = this.Relations["Resepti_RuokalajiID"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitClass() {
this.DataSetName = "luento20malliDataSet";
this.Prefix = "";
this.Namespace = "http://tempuri.org/luento20malliDataSet.xsd";
this.EnforceConstraints = true;
this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema;
this.tableAine = new AineDataTable();
base.Tables.Add(this.tableAine);
this.tableLiittyy = new LiittyyDataTable();
base.Tables.Add(this.tableLiittyy);
this.tableOhje = new OhjeDataTable();
base.Tables.Add(this.tableOhje);
this.tableResepti = new ReseptiDataTable();
base.Tables.Add(this.tableResepti);
this.tableRuokalaji = new RuokalajiDataTable();
base.Tables.Add(this.tableRuokalaji);
this.tableYksikko = new YksikkoDataTable();
base.Tables.Add(this.tableYksikko);
this.relationLiittyy_AineID = new global::System.Data.DataRelation("Liittyy_AineID", new global::System.Data.DataColumn[] {
this.tableAine.AineIDColumn}, new global::System.Data.DataColumn[] {
this.tableLiittyy.Aine_AineIDColumn}, false);
this.Relations.Add(this.relationLiittyy_AineID);
this.relationLiittyy_Lyhenne = new global::System.Data.DataRelation("Liittyy_Lyhenne", new global::System.Data.DataColumn[] {
this.tableYksikko.LyhenneColumn}, new global::System.Data.DataColumn[] {
this.tableLiittyy.Yksikko_LyhenneColumn}, false);
this.Relations.Add(this.relationLiittyy_Lyhenne);
this.relationLiittyy_ReseptiID = new global::System.Data.DataRelation("Liittyy_ReseptiID", new global::System.Data.DataColumn[] {
this.tableResepti.ReseptiIDColumn}, new global::System.Data.DataColumn[] {
this.tableLiittyy.Resepti_ReseptiIDColumn}, false);
this.Relations.Add(this.relationLiittyy_ReseptiID);
this.relationOhje_ReseptiID = new global::System.Data.DataRelation("Ohje_ReseptiID", new global::System.Data.DataColumn[] {
this.tableResepti.ReseptiIDColumn}, new global::System.Data.DataColumn[] {
this.tableOhje.ReseptiIDColumn}, false);
this.Relations.Add(this.relationOhje_ReseptiID);
this.relationResepti_RuokalajiID = new global::System.Data.DataRelation("Resepti_RuokalajiID", new global::System.Data.DataColumn[] {
this.tableRuokalaji.RuokalajiIDColumn}, new global::System.Data.DataColumn[] {
this.tableResepti.RuokalajiIDColumn}, false);
this.Relations.Add(this.relationResepti_RuokalajiID);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private bool ShouldSerializeAine() {
return false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private bool ShouldSerializeLiittyy() {
return false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private bool ShouldSerializeOhje() {
return false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private bool ShouldSerializeResepti() {
return false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private bool ShouldSerializeRuokalaji() {
return false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private bool ShouldSerializeYksikko() {
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) {
luento20malliDataSet ds = new luento20malliDataSet();
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 AineRowChangeEventHandler(object sender, AineRowChangeEvent e);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public delegate void LiittyyRowChangeEventHandler(object sender, LiittyyRowChangeEvent e);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public delegate void OhjeRowChangeEventHandler(object sender, OhjeRowChangeEvent e);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public delegate void ReseptiRowChangeEventHandler(object sender, ReseptiRowChangeEvent e);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public delegate void RuokalajiRowChangeEventHandler(object sender, RuokalajiRowChangeEvent e);
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public delegate void YksikkoRowChangeEventHandler(object sender, YksikkoRowChangeEvent e);
///
///Represents the strongly named DataTable class.
///
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class AineDataTable : global::System.Data.TypedTableBase {
private global::System.Data.DataColumn columnNimi;
private global::System.Data.DataColumn columnKuvaus;
private global::System.Data.DataColumn columnAineID;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public AineDataTable() {
this.TableName = "Aine";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal AineDataTable(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 AineDataTable(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 NimiColumn {
get {
return this.columnNimi;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn KuvausColumn {
get {
return this.columnKuvaus;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn AineIDColumn {
get {
return this.columnAineID;
}
}
[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 AineRow this[int index] {
get {
return ((AineRow)(this.Rows[index]));
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event AineRowChangeEventHandler AineRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event AineRowChangeEventHandler AineRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event AineRowChangeEventHandler AineRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event AineRowChangeEventHandler AineRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void AddAineRow(AineRow row) {
this.Rows.Add(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public AineRow AddAineRow(string Nimi, string Kuvaus) {
AineRow rowAineRow = ((AineRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
Nimi,
Kuvaus,
null};
rowAineRow.ItemArray = columnValuesArray;
this.Rows.Add(rowAineRow);
return rowAineRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public AineRow FindByAineID(int AineID) {
return ((AineRow)(this.Rows.Find(new object[] {
AineID})));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {
AineDataTable cln = ((AineDataTable)(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 AineDataTable();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal void InitVars() {
this.columnNimi = base.Columns["Nimi"];
this.columnKuvaus = base.Columns["Kuvaus"];
this.columnAineID = base.Columns["AineID"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitClass() {
this.columnNimi = new global::System.Data.DataColumn("Nimi", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnNimi);
this.columnKuvaus = new global::System.Data.DataColumn("Kuvaus", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnKuvaus);
this.columnAineID = new global::System.Data.DataColumn("AineID", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnAineID);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnAineID}, true));
this.columnNimi.AllowDBNull = false;
this.columnNimi.MaxLength = 60;
this.columnKuvaus.MaxLength = 250;
this.columnAineID.AutoIncrement = true;
this.columnAineID.AutoIncrementSeed = -1;
this.columnAineID.AutoIncrementStep = -1;
this.columnAineID.AllowDBNull = false;
this.columnAineID.ReadOnly = true;
this.columnAineID.Unique = true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public AineRow NewAineRow() {
return ((AineRow)(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 AineRow(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(AineRow);
}
[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.AineRowChanged != null)) {
this.AineRowChanged(this, new AineRowChangeEvent(((AineRow)(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.AineRowChanging != null)) {
this.AineRowChanging(this, new AineRowChangeEvent(((AineRow)(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.AineRowDeleted != null)) {
this.AineRowDeleted(this, new AineRowChangeEvent(((AineRow)(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.AineRowDeleting != null)) {
this.AineRowDeleting(this, new AineRowChangeEvent(((AineRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void RemoveAineRow(AineRow 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();
luento20malliDataSet ds = new luento20malliDataSet();
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 = "AineDataTable";
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;
}
}
///
///Represents the strongly named DataTable class.
///
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class LiittyyDataTable : global::System.Data.TypedTableBase {
private global::System.Data.DataColumn columnMaara;
private global::System.Data.DataColumn columnResepti_ReseptiID;
private global::System.Data.DataColumn columnAine_AineID;
private global::System.Data.DataColumn columnYksikko_Lyhenne;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public LiittyyDataTable() {
this.TableName = "Liittyy";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal LiittyyDataTable(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 LiittyyDataTable(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 MaaraColumn {
get {
return this.columnMaara;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn Resepti_ReseptiIDColumn {
get {
return this.columnResepti_ReseptiID;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn Aine_AineIDColumn {
get {
return this.columnAine_AineID;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn Yksikko_LyhenneColumn {
get {
return this.columnYksikko_Lyhenne;
}
}
[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 LiittyyRow this[int index] {
get {
return ((LiittyyRow)(this.Rows[index]));
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event LiittyyRowChangeEventHandler LiittyyRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event LiittyyRowChangeEventHandler LiittyyRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event LiittyyRowChangeEventHandler LiittyyRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event LiittyyRowChangeEventHandler LiittyyRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void AddLiittyyRow(LiittyyRow row) {
this.Rows.Add(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public LiittyyRow AddLiittyyRow(decimal Maara, ReseptiRow parentReseptiRowByLiittyy_ReseptiID, AineRow parentAineRowByLiittyy_AineID, YksikkoRow parentYksikkoRowByLiittyy_Lyhenne) {
LiittyyRow rowLiittyyRow = ((LiittyyRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
Maara,
null,
null,
null};
if ((parentReseptiRowByLiittyy_ReseptiID != null)) {
columnValuesArray[1] = parentReseptiRowByLiittyy_ReseptiID[3];
}
if ((parentAineRowByLiittyy_AineID != null)) {
columnValuesArray[2] = parentAineRowByLiittyy_AineID[2];
}
if ((parentYksikkoRowByLiittyy_Lyhenne != null)) {
columnValuesArray[3] = parentYksikkoRowByLiittyy_Lyhenne[1];
}
rowLiittyyRow.ItemArray = columnValuesArray;
this.Rows.Add(rowLiittyyRow);
return rowLiittyyRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public LiittyyRow FindByResepti_ReseptiIDAine_AineIDYksikko_Lyhenne(int Resepti_ReseptiID, int Aine_AineID, string Yksikko_Lyhenne) {
return ((LiittyyRow)(this.Rows.Find(new object[] {
Resepti_ReseptiID,
Aine_AineID,
Yksikko_Lyhenne})));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {
LiittyyDataTable cln = ((LiittyyDataTable)(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 LiittyyDataTable();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal void InitVars() {
this.columnMaara = base.Columns["Maara"];
this.columnResepti_ReseptiID = base.Columns["Resepti_ReseptiID"];
this.columnAine_AineID = base.Columns["Aine_AineID"];
this.columnYksikko_Lyhenne = base.Columns["Yksikko_Lyhenne"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitClass() {
this.columnMaara = new global::System.Data.DataColumn("Maara", typeof(decimal), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnMaara);
this.columnResepti_ReseptiID = new global::System.Data.DataColumn("Resepti_ReseptiID", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnResepti_ReseptiID);
this.columnAine_AineID = new global::System.Data.DataColumn("Aine_AineID", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnAine_AineID);
this.columnYksikko_Lyhenne = new global::System.Data.DataColumn("Yksikko_Lyhenne", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnYksikko_Lyhenne);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnResepti_ReseptiID,
this.columnAine_AineID,
this.columnYksikko_Lyhenne}, true));
this.columnResepti_ReseptiID.AllowDBNull = false;
this.columnAine_AineID.AllowDBNull = false;
this.columnYksikko_Lyhenne.AllowDBNull = false;
this.columnYksikko_Lyhenne.MaxLength = 3;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public LiittyyRow NewLiittyyRow() {
return ((LiittyyRow)(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 LiittyyRow(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(LiittyyRow);
}
[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.LiittyyRowChanged != null)) {
this.LiittyyRowChanged(this, new LiittyyRowChangeEvent(((LiittyyRow)(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.LiittyyRowChanging != null)) {
this.LiittyyRowChanging(this, new LiittyyRowChangeEvent(((LiittyyRow)(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.LiittyyRowDeleted != null)) {
this.LiittyyRowDeleted(this, new LiittyyRowChangeEvent(((LiittyyRow)(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.LiittyyRowDeleting != null)) {
this.LiittyyRowDeleting(this, new LiittyyRowChangeEvent(((LiittyyRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void RemoveLiittyyRow(LiittyyRow 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();
luento20malliDataSet ds = new luento20malliDataSet();
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 = "LiittyyDataTable";
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;
}
}
///
///Represents the strongly named DataTable class.
///
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class OhjeDataTable : global::System.Data.TypedTableBase {
private global::System.Data.DataColumn columnVaihenro;
private global::System.Data.DataColumn columnReseptiID;
private global::System.Data.DataColumn columnOhjeteksti;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public OhjeDataTable() {
this.TableName = "Ohje";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal OhjeDataTable(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 OhjeDataTable(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 VaihenroColumn {
get {
return this.columnVaihenro;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn ReseptiIDColumn {
get {
return this.columnReseptiID;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn OhjetekstiColumn {
get {
return this.columnOhjeteksti;
}
}
[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 OhjeRow this[int index] {
get {
return ((OhjeRow)(this.Rows[index]));
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event OhjeRowChangeEventHandler OhjeRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event OhjeRowChangeEventHandler OhjeRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event OhjeRowChangeEventHandler OhjeRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event OhjeRowChangeEventHandler OhjeRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void AddOhjeRow(OhjeRow row) {
this.Rows.Add(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public OhjeRow AddOhjeRow(int Vaihenro, ReseptiRow parentReseptiRowByOhje_ReseptiID, string Ohjeteksti) {
OhjeRow rowOhjeRow = ((OhjeRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
Vaihenro,
null,
Ohjeteksti};
if ((parentReseptiRowByOhje_ReseptiID != null)) {
columnValuesArray[1] = parentReseptiRowByOhje_ReseptiID[3];
}
rowOhjeRow.ItemArray = columnValuesArray;
this.Rows.Add(rowOhjeRow);
return rowOhjeRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public OhjeRow FindByVaihenroReseptiID(int Vaihenro, int ReseptiID) {
return ((OhjeRow)(this.Rows.Find(new object[] {
Vaihenro,
ReseptiID})));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {
OhjeDataTable cln = ((OhjeDataTable)(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 OhjeDataTable();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal void InitVars() {
this.columnVaihenro = base.Columns["Vaihenro"];
this.columnReseptiID = base.Columns["ReseptiID"];
this.columnOhjeteksti = base.Columns["Ohjeteksti"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitClass() {
this.columnVaihenro = new global::System.Data.DataColumn("Vaihenro", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnVaihenro);
this.columnReseptiID = new global::System.Data.DataColumn("ReseptiID", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnReseptiID);
this.columnOhjeteksti = new global::System.Data.DataColumn("Ohjeteksti", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnOhjeteksti);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnVaihenro,
this.columnReseptiID}, true));
this.columnVaihenro.AllowDBNull = false;
this.columnReseptiID.AllowDBNull = false;
this.columnOhjeteksti.AllowDBNull = false;
this.columnOhjeteksti.MaxLength = 255;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public OhjeRow NewOhjeRow() {
return ((OhjeRow)(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 OhjeRow(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(OhjeRow);
}
[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.OhjeRowChanged != null)) {
this.OhjeRowChanged(this, new OhjeRowChangeEvent(((OhjeRow)(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.OhjeRowChanging != null)) {
this.OhjeRowChanging(this, new OhjeRowChangeEvent(((OhjeRow)(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.OhjeRowDeleted != null)) {
this.OhjeRowDeleted(this, new OhjeRowChangeEvent(((OhjeRow)(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.OhjeRowDeleting != null)) {
this.OhjeRowDeleting(this, new OhjeRowChangeEvent(((OhjeRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void RemoveOhjeRow(OhjeRow 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();
luento20malliDataSet ds = new luento20malliDataSet();
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 = "OhjeDataTable";
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;
}
}
///
///Represents the strongly named DataTable class.
///
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class ReseptiDataTable : global::System.Data.TypedTableBase {
private global::System.Data.DataColumn columnNimi;
private global::System.Data.DataColumn columnKuvaus;
private global::System.Data.DataColumn columnHenkilomaara;
private global::System.Data.DataColumn columnReseptiID;
private global::System.Data.DataColumn columnRuokalajiID;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public ReseptiDataTable() {
this.TableName = "Resepti";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal ReseptiDataTable(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 ReseptiDataTable(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 NimiColumn {
get {
return this.columnNimi;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn KuvausColumn {
get {
return this.columnKuvaus;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn HenkilomaaraColumn {
get {
return this.columnHenkilomaara;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn ReseptiIDColumn {
get {
return this.columnReseptiID;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn RuokalajiIDColumn {
get {
return this.columnRuokalajiID;
}
}
[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 ReseptiRow this[int index] {
get {
return ((ReseptiRow)(this.Rows[index]));
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event ReseptiRowChangeEventHandler ReseptiRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event ReseptiRowChangeEventHandler ReseptiRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event ReseptiRowChangeEventHandler ReseptiRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event ReseptiRowChangeEventHandler ReseptiRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void AddReseptiRow(ReseptiRow row) {
this.Rows.Add(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public ReseptiRow AddReseptiRow(string Nimi, string Kuvaus, int Henkilomaara, RuokalajiRow parentRuokalajiRowByResepti_RuokalajiID) {
ReseptiRow rowReseptiRow = ((ReseptiRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
Nimi,
Kuvaus,
Henkilomaara,
null,
null};
if ((parentRuokalajiRowByResepti_RuokalajiID != null)) {
columnValuesArray[4] = parentRuokalajiRowByResepti_RuokalajiID[2];
}
rowReseptiRow.ItemArray = columnValuesArray;
this.Rows.Add(rowReseptiRow);
return rowReseptiRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public ReseptiRow FindByReseptiID(int ReseptiID) {
return ((ReseptiRow)(this.Rows.Find(new object[] {
ReseptiID})));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {
ReseptiDataTable cln = ((ReseptiDataTable)(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 ReseptiDataTable();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal void InitVars() {
this.columnNimi = base.Columns["Nimi"];
this.columnKuvaus = base.Columns["Kuvaus"];
this.columnHenkilomaara = base.Columns["Henkilomaara"];
this.columnReseptiID = base.Columns["ReseptiID"];
this.columnRuokalajiID = base.Columns["RuokalajiID"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitClass() {
this.columnNimi = new global::System.Data.DataColumn("Nimi", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnNimi);
this.columnKuvaus = new global::System.Data.DataColumn("Kuvaus", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnKuvaus);
this.columnHenkilomaara = new global::System.Data.DataColumn("Henkilomaara", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnHenkilomaara);
this.columnReseptiID = new global::System.Data.DataColumn("ReseptiID", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnReseptiID);
this.columnRuokalajiID = new global::System.Data.DataColumn("RuokalajiID", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnRuokalajiID);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnReseptiID}, true));
this.columnNimi.AllowDBNull = false;
this.columnNimi.MaxLength = 100;
this.columnKuvaus.MaxLength = 250;
this.columnReseptiID.AutoIncrement = true;
this.columnReseptiID.AutoIncrementSeed = -1;
this.columnReseptiID.AutoIncrementStep = -1;
this.columnReseptiID.AllowDBNull = false;
this.columnReseptiID.ReadOnly = true;
this.columnReseptiID.Unique = true;
this.columnRuokalajiID.AllowDBNull = false;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public ReseptiRow NewReseptiRow() {
return ((ReseptiRow)(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 ReseptiRow(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(ReseptiRow);
}
[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.ReseptiRowChanged != null)) {
this.ReseptiRowChanged(this, new ReseptiRowChangeEvent(((ReseptiRow)(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.ReseptiRowChanging != null)) {
this.ReseptiRowChanging(this, new ReseptiRowChangeEvent(((ReseptiRow)(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.ReseptiRowDeleted != null)) {
this.ReseptiRowDeleted(this, new ReseptiRowChangeEvent(((ReseptiRow)(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.ReseptiRowDeleting != null)) {
this.ReseptiRowDeleting(this, new ReseptiRowChangeEvent(((ReseptiRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void RemoveReseptiRow(ReseptiRow 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();
luento20malliDataSet ds = new luento20malliDataSet();
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 = "ReseptiDataTable";
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;
}
}
///
///Represents the strongly named DataTable class.
///
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class RuokalajiDataTable : global::System.Data.TypedTableBase {
private global::System.Data.DataColumn columnNimi;
private global::System.Data.DataColumn columnKuvaus;
private global::System.Data.DataColumn columnRuokalajiID;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public RuokalajiDataTable() {
this.TableName = "Ruokalaji";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal RuokalajiDataTable(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 RuokalajiDataTable(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 NimiColumn {
get {
return this.columnNimi;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn KuvausColumn {
get {
return this.columnKuvaus;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn RuokalajiIDColumn {
get {
return this.columnRuokalajiID;
}
}
[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 RuokalajiRow this[int index] {
get {
return ((RuokalajiRow)(this.Rows[index]));
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event RuokalajiRowChangeEventHandler RuokalajiRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event RuokalajiRowChangeEventHandler RuokalajiRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event RuokalajiRowChangeEventHandler RuokalajiRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event RuokalajiRowChangeEventHandler RuokalajiRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void AddRuokalajiRow(RuokalajiRow row) {
this.Rows.Add(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public RuokalajiRow AddRuokalajiRow(string Nimi, string Kuvaus) {
RuokalajiRow rowRuokalajiRow = ((RuokalajiRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
Nimi,
Kuvaus,
null};
rowRuokalajiRow.ItemArray = columnValuesArray;
this.Rows.Add(rowRuokalajiRow);
return rowRuokalajiRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public RuokalajiRow FindByRuokalajiID(int RuokalajiID) {
return ((RuokalajiRow)(this.Rows.Find(new object[] {
RuokalajiID})));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {
RuokalajiDataTable cln = ((RuokalajiDataTable)(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 RuokalajiDataTable();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal void InitVars() {
this.columnNimi = base.Columns["Nimi"];
this.columnKuvaus = base.Columns["Kuvaus"];
this.columnRuokalajiID = base.Columns["RuokalajiID"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitClass() {
this.columnNimi = new global::System.Data.DataColumn("Nimi", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnNimi);
this.columnKuvaus = new global::System.Data.DataColumn("Kuvaus", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnKuvaus);
this.columnRuokalajiID = new global::System.Data.DataColumn("RuokalajiID", typeof(int), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnRuokalajiID);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnRuokalajiID}, true));
this.columnNimi.AllowDBNull = false;
this.columnNimi.MaxLength = 100;
this.columnKuvaus.MaxLength = 250;
this.columnRuokalajiID.AutoIncrement = true;
this.columnRuokalajiID.AutoIncrementSeed = -1;
this.columnRuokalajiID.AutoIncrementStep = -1;
this.columnRuokalajiID.AllowDBNull = false;
this.columnRuokalajiID.ReadOnly = true;
this.columnRuokalajiID.Unique = true;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public RuokalajiRow NewRuokalajiRow() {
return ((RuokalajiRow)(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 RuokalajiRow(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(RuokalajiRow);
}
[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.RuokalajiRowChanged != null)) {
this.RuokalajiRowChanged(this, new RuokalajiRowChangeEvent(((RuokalajiRow)(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.RuokalajiRowChanging != null)) {
this.RuokalajiRowChanging(this, new RuokalajiRowChangeEvent(((RuokalajiRow)(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.RuokalajiRowDeleted != null)) {
this.RuokalajiRowDeleted(this, new RuokalajiRowChangeEvent(((RuokalajiRow)(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.RuokalajiRowDeleting != null)) {
this.RuokalajiRowDeleting(this, new RuokalajiRowChangeEvent(((RuokalajiRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void RemoveRuokalajiRow(RuokalajiRow 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();
luento20malliDataSet ds = new luento20malliDataSet();
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 = "RuokalajiDataTable";
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;
}
}
///
///Represents the strongly named DataTable class.
///
[global::System.Serializable()]
[global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")]
public partial class YksikkoDataTable : global::System.Data.TypedTableBase {
private global::System.Data.DataColumn columnNimi;
private global::System.Data.DataColumn columnLyhenne;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public YksikkoDataTable() {
this.TableName = "Yksikko";
this.BeginInit();
this.InitClass();
this.EndInit();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal YksikkoDataTable(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 YksikkoDataTable(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 NimiColumn {
get {
return this.columnNimi;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public global::System.Data.DataColumn LyhenneColumn {
get {
return this.columnLyhenne;
}
}
[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 YksikkoRow this[int index] {
get {
return ((YksikkoRow)(this.Rows[index]));
}
}
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event YksikkoRowChangeEventHandler YksikkoRowChanging;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event YksikkoRowChangeEventHandler YksikkoRowChanged;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event YksikkoRowChangeEventHandler YksikkoRowDeleting;
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public event YksikkoRowChangeEventHandler YksikkoRowDeleted;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void AddYksikkoRow(YksikkoRow row) {
this.Rows.Add(row);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public YksikkoRow AddYksikkoRow(string Nimi, string Lyhenne) {
YksikkoRow rowYksikkoRow = ((YksikkoRow)(this.NewRow()));
object[] columnValuesArray = new object[] {
Nimi,
Lyhenne};
rowYksikkoRow.ItemArray = columnValuesArray;
this.Rows.Add(rowYksikkoRow);
return rowYksikkoRow;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public YksikkoRow FindByLyhenne(string Lyhenne) {
return ((YksikkoRow)(this.Rows.Find(new object[] {
Lyhenne})));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public override global::System.Data.DataTable Clone() {
YksikkoDataTable cln = ((YksikkoDataTable)(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 YksikkoDataTable();
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal void InitVars() {
this.columnNimi = base.Columns["Nimi"];
this.columnLyhenne = base.Columns["Lyhenne"];
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private void InitClass() {
this.columnNimi = new global::System.Data.DataColumn("Nimi", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnNimi);
this.columnLyhenne = new global::System.Data.DataColumn("Lyhenne", typeof(string), null, global::System.Data.MappingType.Element);
base.Columns.Add(this.columnLyhenne);
this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] {
this.columnLyhenne}, true));
this.columnNimi.AllowDBNull = false;
this.columnNimi.MaxLength = 20;
this.columnLyhenne.AllowDBNull = false;
this.columnLyhenne.Unique = true;
this.columnLyhenne.MaxLength = 3;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public YksikkoRow NewYksikkoRow() {
return ((YksikkoRow)(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 YksikkoRow(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(YksikkoRow);
}
[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.YksikkoRowChanged != null)) {
this.YksikkoRowChanged(this, new YksikkoRowChangeEvent(((YksikkoRow)(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.YksikkoRowChanging != null)) {
this.YksikkoRowChanging(this, new YksikkoRowChangeEvent(((YksikkoRow)(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.YksikkoRowDeleted != null)) {
this.YksikkoRowDeleted(this, new YksikkoRowChangeEvent(((YksikkoRow)(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.YksikkoRowDeleting != null)) {
this.YksikkoRowDeleting(this, new YksikkoRowChangeEvent(((YksikkoRow)(e.Row)), e.Action));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void RemoveYksikkoRow(YksikkoRow 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();
luento20malliDataSet ds = new luento20malliDataSet();
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 = "YksikkoDataTable";
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;
}
}
///
///Represents strongly named DataRow class.
///
public partial class AineRow : global::System.Data.DataRow {
private AineDataTable tableAine;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal AineRow(global::System.Data.DataRowBuilder rb) :
base(rb) {
this.tableAine = ((AineDataTable)(this.Table));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Nimi {
get {
return ((string)(this[this.tableAine.NimiColumn]));
}
set {
this[this.tableAine.NimiColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Kuvaus {
get {
try {
return ((string)(this[this.tableAine.KuvausColumn]));
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("The value for column \'Kuvaus\' in table \'Aine\' is DBNull.", e);
}
}
set {
this[this.tableAine.KuvausColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int AineID {
get {
return ((int)(this[this.tableAine.AineIDColumn]));
}
set {
this[this.tableAine.AineIDColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public bool IsKuvausNull() {
return this.IsNull(this.tableAine.KuvausColumn);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void SetKuvausNull() {
this[this.tableAine.KuvausColumn] = global::System.Convert.DBNull;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public LiittyyRow[] GetLiittyyRows() {
if ((this.Table.ChildRelations["Liittyy_AineID"] == null)) {
return new LiittyyRow[0];
}
else {
return ((LiittyyRow[])(base.GetChildRows(this.Table.ChildRelations["Liittyy_AineID"])));
}
}
}
///
///Represents strongly named DataRow class.
///
public partial class LiittyyRow : global::System.Data.DataRow {
private LiittyyDataTable tableLiittyy;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal LiittyyRow(global::System.Data.DataRowBuilder rb) :
base(rb) {
this.tableLiittyy = ((LiittyyDataTable)(this.Table));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public decimal Maara {
get {
try {
return ((decimal)(this[this.tableLiittyy.MaaraColumn]));
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("The value for column \'Maara\' in table \'Liittyy\' is DBNull.", e);
}
}
set {
this[this.tableLiittyy.MaaraColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int Resepti_ReseptiID {
get {
return ((int)(this[this.tableLiittyy.Resepti_ReseptiIDColumn]));
}
set {
this[this.tableLiittyy.Resepti_ReseptiIDColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int Aine_AineID {
get {
return ((int)(this[this.tableLiittyy.Aine_AineIDColumn]));
}
set {
this[this.tableLiittyy.Aine_AineIDColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Yksikko_Lyhenne {
get {
return ((string)(this[this.tableLiittyy.Yksikko_LyhenneColumn]));
}
set {
this[this.tableLiittyy.Yksikko_LyhenneColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public AineRow AineRow {
get {
return ((AineRow)(this.GetParentRow(this.Table.ParentRelations["Liittyy_AineID"])));
}
set {
this.SetParentRow(value, this.Table.ParentRelations["Liittyy_AineID"]);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public YksikkoRow YksikkoRow {
get {
return ((YksikkoRow)(this.GetParentRow(this.Table.ParentRelations["Liittyy_Lyhenne"])));
}
set {
this.SetParentRow(value, this.Table.ParentRelations["Liittyy_Lyhenne"]);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public ReseptiRow ReseptiRow {
get {
return ((ReseptiRow)(this.GetParentRow(this.Table.ParentRelations["Liittyy_ReseptiID"])));
}
set {
this.SetParentRow(value, this.Table.ParentRelations["Liittyy_ReseptiID"]);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public bool IsMaaraNull() {
return this.IsNull(this.tableLiittyy.MaaraColumn);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void SetMaaraNull() {
this[this.tableLiittyy.MaaraColumn] = global::System.Convert.DBNull;
}
}
///
///Represents strongly named DataRow class.
///
public partial class OhjeRow : global::System.Data.DataRow {
private OhjeDataTable tableOhje;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal OhjeRow(global::System.Data.DataRowBuilder rb) :
base(rb) {
this.tableOhje = ((OhjeDataTable)(this.Table));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int Vaihenro {
get {
return ((int)(this[this.tableOhje.VaihenroColumn]));
}
set {
this[this.tableOhje.VaihenroColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int ReseptiID {
get {
return ((int)(this[this.tableOhje.ReseptiIDColumn]));
}
set {
this[this.tableOhje.ReseptiIDColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Ohjeteksti {
get {
return ((string)(this[this.tableOhje.OhjetekstiColumn]));
}
set {
this[this.tableOhje.OhjetekstiColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public ReseptiRow ReseptiRow {
get {
return ((ReseptiRow)(this.GetParentRow(this.Table.ParentRelations["Ohje_ReseptiID"])));
}
set {
this.SetParentRow(value, this.Table.ParentRelations["Ohje_ReseptiID"]);
}
}
}
///
///Represents strongly named DataRow class.
///
public partial class ReseptiRow : global::System.Data.DataRow {
private ReseptiDataTable tableResepti;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal ReseptiRow(global::System.Data.DataRowBuilder rb) :
base(rb) {
this.tableResepti = ((ReseptiDataTable)(this.Table));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Nimi {
get {
return ((string)(this[this.tableResepti.NimiColumn]));
}
set {
this[this.tableResepti.NimiColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Kuvaus {
get {
try {
return ((string)(this[this.tableResepti.KuvausColumn]));
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("The value for column \'Kuvaus\' in table \'Resepti\' is DBNull.", e);
}
}
set {
this[this.tableResepti.KuvausColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int Henkilomaara {
get {
try {
return ((int)(this[this.tableResepti.HenkilomaaraColumn]));
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("The value for column \'Henkilomaara\' in table \'Resepti\' is DBNull.", e);
}
}
set {
this[this.tableResepti.HenkilomaaraColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int ReseptiID {
get {
return ((int)(this[this.tableResepti.ReseptiIDColumn]));
}
set {
this[this.tableResepti.ReseptiIDColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int RuokalajiID {
get {
return ((int)(this[this.tableResepti.RuokalajiIDColumn]));
}
set {
this[this.tableResepti.RuokalajiIDColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public RuokalajiRow RuokalajiRow {
get {
return ((RuokalajiRow)(this.GetParentRow(this.Table.ParentRelations["Resepti_RuokalajiID"])));
}
set {
this.SetParentRow(value, this.Table.ParentRelations["Resepti_RuokalajiID"]);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public bool IsKuvausNull() {
return this.IsNull(this.tableResepti.KuvausColumn);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void SetKuvausNull() {
this[this.tableResepti.KuvausColumn] = global::System.Convert.DBNull;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public bool IsHenkilomaaraNull() {
return this.IsNull(this.tableResepti.HenkilomaaraColumn);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void SetHenkilomaaraNull() {
this[this.tableResepti.HenkilomaaraColumn] = global::System.Convert.DBNull;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public LiittyyRow[] GetLiittyyRows() {
if ((this.Table.ChildRelations["Liittyy_ReseptiID"] == null)) {
return new LiittyyRow[0];
}
else {
return ((LiittyyRow[])(base.GetChildRows(this.Table.ChildRelations["Liittyy_ReseptiID"])));
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public OhjeRow[] GetOhjeRows() {
if ((this.Table.ChildRelations["Ohje_ReseptiID"] == null)) {
return new OhjeRow[0];
}
else {
return ((OhjeRow[])(base.GetChildRows(this.Table.ChildRelations["Ohje_ReseptiID"])));
}
}
}
///
///Represents strongly named DataRow class.
///
public partial class RuokalajiRow : global::System.Data.DataRow {
private RuokalajiDataTable tableRuokalaji;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal RuokalajiRow(global::System.Data.DataRowBuilder rb) :
base(rb) {
this.tableRuokalaji = ((RuokalajiDataTable)(this.Table));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Nimi {
get {
return ((string)(this[this.tableRuokalaji.NimiColumn]));
}
set {
this[this.tableRuokalaji.NimiColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Kuvaus {
get {
try {
return ((string)(this[this.tableRuokalaji.KuvausColumn]));
}
catch (global::System.InvalidCastException e) {
throw new global::System.Data.StrongTypingException("The value for column \'Kuvaus\' in table \'Ruokalaji\' is DBNull.", e);
}
}
set {
this[this.tableRuokalaji.KuvausColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public int RuokalajiID {
get {
return ((int)(this[this.tableRuokalaji.RuokalajiIDColumn]));
}
set {
this[this.tableRuokalaji.RuokalajiIDColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public bool IsKuvausNull() {
return this.IsNull(this.tableRuokalaji.KuvausColumn);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public void SetKuvausNull() {
this[this.tableRuokalaji.KuvausColumn] = global::System.Convert.DBNull;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public ReseptiRow[] GetReseptiRows() {
if ((this.Table.ChildRelations["Resepti_RuokalajiID"] == null)) {
return new ReseptiRow[0];
}
else {
return ((ReseptiRow[])(base.GetChildRows(this.Table.ChildRelations["Resepti_RuokalajiID"])));
}
}
}
///
///Represents strongly named DataRow class.
///
public partial class YksikkoRow : global::System.Data.DataRow {
private YksikkoDataTable tableYksikko;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
internal YksikkoRow(global::System.Data.DataRowBuilder rb) :
base(rb) {
this.tableYksikko = ((YksikkoDataTable)(this.Table));
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Nimi {
get {
return ((string)(this[this.tableYksikko.NimiColumn]));
}
set {
this[this.tableYksikko.NimiColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public string Lyhenne {
get {
return ((string)(this[this.tableYksikko.LyhenneColumn]));
}
set {
this[this.tableYksikko.LyhenneColumn] = value;
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public LiittyyRow[] GetLiittyyRows() {
if ((this.Table.ChildRelations["Liittyy_Lyhenne"] == null)) {
return new LiittyyRow[0];
}
else {
return ((LiittyyRow[])(base.GetChildRows(this.Table.ChildRelations["Liittyy_Lyhenne"])));
}
}
}
///
///Row event argument class
///
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public class AineRowChangeEvent : global::System.EventArgs {
private AineRow 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 AineRowChangeEvent(AineRow 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 AineRow 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;
}
}
}
///
///Row event argument class
///
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public class LiittyyRowChangeEvent : global::System.EventArgs {
private LiittyyRow 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 LiittyyRowChangeEvent(LiittyyRow 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 LiittyyRow 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;
}
}
}
///
///Row event argument class
///
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public class OhjeRowChangeEvent : global::System.EventArgs {
private OhjeRow 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 OhjeRowChangeEvent(OhjeRow 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 OhjeRow 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;
}
}
}
///
///Row event argument class
///
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public class ReseptiRowChangeEvent : global::System.EventArgs {
private ReseptiRow 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 ReseptiRowChangeEvent(ReseptiRow 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 ReseptiRow 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;
}
}
}
///
///Row event argument class
///
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public class RuokalajiRowChangeEvent : global::System.EventArgs {
private RuokalajiRow 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 RuokalajiRowChangeEvent(RuokalajiRow 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 RuokalajiRow 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;
}
}
}
///
///Row event argument class
///
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public class YksikkoRowChangeEvent : global::System.EventArgs {
private YksikkoRow 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 YksikkoRowChangeEvent(YksikkoRow 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 YksikkoRow 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 malli.luento20malliDataSetTableAdapters {
///
///Represents the connection and commands used to retrieve and save data.
///
[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 AineTableAdapter : 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 AineTableAdapter() {
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 = "Aine";
tableMapping.ColumnMappings.Add("Nimi", "Nimi");
tableMapping.ColumnMappings.Add("Kuvaus", "Kuvaus");
tableMapping.ColumnMappings.Add("AineID", "AineID");
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].[Aine] WHERE (([Nimi] = @Original_Nimi) AND ((@IsNull_Kuvaus = " +
"1 AND [Kuvaus] IS NULL) OR ([Kuvaus] = @Original_Kuvaus)) AND ([AineID] = @Origi" +
"nal_AineID))";
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Kuvaus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AineID", 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].[Aine] ([Nimi], [Kuvaus]) VALUES (@Nimi, @Kuvaus);\r\nSELECT Nimi" +
", Kuvaus, AineID FROM Aine WHERE (AineID = SCOPE_IDENTITY())";
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", 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].[Aine] SET [Nimi] = @Nimi, [Kuvaus] = @Kuvaus WHERE (([Nimi] = @Original_Nimi) AND ((@IsNull_Kuvaus = 1 AND [Kuvaus] IS NULL) OR ([Kuvaus] = @Original_Kuvaus)) AND ([AineID] = @Original_AineID));
SELECT Nimi, Kuvaus, AineID FROM Aine WHERE (AineID = @AineID)";
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Kuvaus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_AineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "AineID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@AineID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "AineID", 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::malli.Properties.Settings.Default.luento20malliConnectionString;
}
[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 Nimi, Kuvaus, AineID FROM dbo.Aine";
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(luento20malliDataSet.AineDataTable 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 luento20malliDataSet.AineDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
luento20malliDataSet.AineDataTable dataTable = new luento20malliDataSet.AineDataTable();
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(luento20malliDataSet.AineDataTable 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(luento20malliDataSet dataSet) {
return this.Adapter.Update(dataSet, "Aine");
}
[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_Nimi, string Original_Kuvaus, int Original_AineID) {
if ((Original_Nimi == null)) {
throw new global::System.ArgumentNullException("Original_Nimi");
}
else {
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Nimi));
}
if ((Original_Kuvaus == null)) {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Kuvaus));
}
this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_AineID));
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 Nimi, string Kuvaus) {
if ((Nimi == null)) {
throw new global::System.ArgumentNullException("Nimi");
}
else {
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Nimi));
}
if ((Kuvaus == null)) {
this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Kuvaus));
}
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 Nimi, string Kuvaus, string Original_Nimi, string Original_Kuvaus, int Original_AineID, int AineID) {
if ((Nimi == null)) {
throw new global::System.ArgumentNullException("Nimi");
}
else {
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Nimi));
}
if ((Kuvaus == null)) {
this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Kuvaus));
}
if ((Original_Nimi == null)) {
throw new global::System.ArgumentNullException("Original_Nimi");
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_Nimi));
}
if ((Original_Kuvaus == null)) {
this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Kuvaus));
}
this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_AineID));
this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(AineID));
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 Nimi, string Kuvaus, string Original_Nimi, string Original_Kuvaus, int Original_AineID) {
return this.Update(Nimi, Kuvaus, Original_Nimi, Original_Kuvaus, Original_AineID, Original_AineID);
}
}
///
///Represents the connection and commands used to retrieve and save data.
///
[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 LiittyyTableAdapter : 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 LiittyyTableAdapter() {
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 = "Liittyy";
tableMapping.ColumnMappings.Add("Maara", "Maara");
tableMapping.ColumnMappings.Add("Resepti_ReseptiID", "Resepti_ReseptiID");
tableMapping.ColumnMappings.Add("Aine_AineID", "Aine_AineID");
tableMapping.ColumnMappings.Add("Yksikko_Lyhenne", "Yksikko_Lyhenne");
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].[Liittyy] WHERE (((@IsNull_Maara = 1 AND [Maara] IS NULL) OR ([Maara] = @Original_Maara)) AND ([Resepti_ReseptiID] = @Original_Resepti_ReseptiID) AND ([Aine_AineID] = @Original_Aine_AineID) AND ([Yksikko_Lyhenne] = @Original_Yksikko_Lyhenne))";
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Maara", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Maara", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Maara", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 5, 2, "Maara", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Resepti_ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Resepti_ReseptiID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Aine_AineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Aine_AineID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Yksikko_Lyhenne", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Yksikko_Lyhenne", 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].[Liittyy] ([Maara], [Resepti_ReseptiID], [Aine_AineID], [Yksikko_Lyhenne]) VALUES (@Maara, @Resepti_ReseptiID, @Aine_AineID, @Yksikko_Lyhenne);
SELECT Maara, Resepti_ReseptiID, Aine_AineID, Yksikko_Lyhenne FROM Liittyy WHERE (Aine_AineID = @Aine_AineID) AND (Resepti_ReseptiID = @Resepti_ReseptiID) AND (Yksikko_Lyhenne = @Yksikko_Lyhenne)";
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Maara", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 5, 2, "Maara", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Resepti_ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Resepti_ReseptiID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Aine_AineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Aine_AineID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Yksikko_Lyhenne", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Yksikko_Lyhenne", 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].[Liittyy] SET [Maara] = @Maara, [Resepti_ReseptiID] = @Resepti_ReseptiID, [Aine_AineID] = @Aine_AineID, [Yksikko_Lyhenne] = @Yksikko_Lyhenne WHERE (((@IsNull_Maara = 1 AND [Maara] IS NULL) OR ([Maara] = @Original_Maara)) AND ([Resepti_ReseptiID] = @Original_Resepti_ReseptiID) AND ([Aine_AineID] = @Original_Aine_AineID) AND ([Yksikko_Lyhenne] = @Original_Yksikko_Lyhenne));
SELECT Maara, Resepti_ReseptiID, Aine_AineID, Yksikko_Lyhenne FROM Liittyy WHERE (Aine_AineID = @Aine_AineID) AND (Resepti_ReseptiID = @Resepti_ReseptiID) AND (Yksikko_Lyhenne = @Yksikko_Lyhenne)";
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Maara", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 5, 2, "Maara", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Resepti_ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Resepti_ReseptiID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Aine_AineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Aine_AineID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Yksikko_Lyhenne", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Yksikko_Lyhenne", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Maara", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Maara", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Maara", global::System.Data.SqlDbType.Decimal, 0, global::System.Data.ParameterDirection.Input, 5, 2, "Maara", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Resepti_ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Resepti_ReseptiID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Aine_AineID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Aine_AineID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Yksikko_Lyhenne", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Yksikko_Lyhenne", 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::malli.Properties.Settings.Default.luento20malliConnectionString;
}
[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 Maara, Resepti_ReseptiID, Aine_AineID, Yksikko_Lyhenne FROM dbo.Liittyy";
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(luento20malliDataSet.LiittyyDataTable 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 luento20malliDataSet.LiittyyDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
luento20malliDataSet.LiittyyDataTable dataTable = new luento20malliDataSet.LiittyyDataTable();
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(luento20malliDataSet.LiittyyDataTable 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(luento20malliDataSet dataSet) {
return this.Adapter.Update(dataSet, "Liittyy");
}
[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(global::System.Nullable Original_Maara, int Original_Resepti_ReseptiID, int Original_Aine_AineID, string Original_Yksikko_Lyhenne) {
if ((Original_Maara.HasValue == true)) {
this.Adapter.DeleteCommand.Parameters[0].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[1].Value = ((decimal)(Original_Maara.Value));
}
else {
this.Adapter.DeleteCommand.Parameters[0].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[1].Value = global::System.DBNull.Value;
}
this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Resepti_ReseptiID));
this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_Aine_AineID));
if ((Original_Yksikko_Lyhenne == null)) {
throw new global::System.ArgumentNullException("Original_Yksikko_Lyhenne");
}
else {
this.Adapter.DeleteCommand.Parameters[4].Value = ((string)(Original_Yksikko_Lyhenne));
}
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(global::System.Nullable Maara, int Resepti_ReseptiID, int Aine_AineID, string Yksikko_Lyhenne) {
if ((Maara.HasValue == true)) {
this.Adapter.InsertCommand.Parameters[0].Value = ((decimal)(Maara.Value));
}
else {
this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value;
}
this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Resepti_ReseptiID));
this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Aine_AineID));
if ((Yksikko_Lyhenne == null)) {
throw new global::System.ArgumentNullException("Yksikko_Lyhenne");
}
else {
this.Adapter.InsertCommand.Parameters[3].Value = ((string)(Yksikko_Lyhenne));
}
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(global::System.Nullable Maara, int Resepti_ReseptiID, int Aine_AineID, string Yksikko_Lyhenne, global::System.Nullable Original_Maara, int Original_Resepti_ReseptiID, int Original_Aine_AineID, string Original_Yksikko_Lyhenne) {
if ((Maara.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[0].Value = ((decimal)(Maara.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value;
}
this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Resepti_ReseptiID));
this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Aine_AineID));
if ((Yksikko_Lyhenne == null)) {
throw new global::System.ArgumentNullException("Yksikko_Lyhenne");
}
else {
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Yksikko_Lyhenne));
}
if ((Original_Maara.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[5].Value = ((decimal)(Original_Maara.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[4].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value;
}
this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Original_Resepti_ReseptiID));
this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_Aine_AineID));
if ((Original_Yksikko_Lyhenne == null)) {
throw new global::System.ArgumentNullException("Original_Yksikko_Lyhenne");
}
else {
this.Adapter.UpdateCommand.Parameters[8].Value = ((string)(Original_Yksikko_Lyhenne));
}
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 Maara, global::System.Nullable Original_Maara, int Original_Resepti_ReseptiID, int Original_Aine_AineID, string Original_Yksikko_Lyhenne) {
return this.Update(Maara, Original_Resepti_ReseptiID, Original_Aine_AineID, Original_Yksikko_Lyhenne, Original_Maara, Original_Resepti_ReseptiID, Original_Aine_AineID, Original_Yksikko_Lyhenne);
}
}
///
///Represents the connection and commands used to retrieve and save data.
///
[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 OhjeTableAdapter : 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 OhjeTableAdapter() {
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 = "Ohje";
tableMapping.ColumnMappings.Add("Vaihenro", "Vaihenro");
tableMapping.ColumnMappings.Add("ReseptiID", "ReseptiID");
tableMapping.ColumnMappings.Add("Ohjeteksti", "Ohjeteksti");
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].[Ohje] WHERE (([Vaihenro] = @Original_Vaihenro) AND ([ReseptiID" +
"] = @Original_ReseptiID) AND ([Ohjeteksti] = @Original_Ohjeteksti))";
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Vaihenro", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Vaihenro", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReseptiID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ohjeteksti", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ohjeteksti", 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].[Ohje] ([Vaihenro], [ReseptiID], [Ohjeteksti]) VALUES (@Vaihenr" +
"o, @ReseptiID, @Ohjeteksti);\r\nSELECT Vaihenro, ReseptiID, Ohjeteksti FROM Ohje W" +
"HERE (ReseptiID = @ReseptiID) AND (Vaihenro = @Vaihenro)";
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Vaihenro", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Vaihenro", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReseptiID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ohjeteksti", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ohjeteksti", 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].[Ohje] SET [Vaihenro] = @Vaihenro, [ReseptiID] = @ReseptiID, [Ohjeteksti] = @Ohjeteksti WHERE (([Vaihenro] = @Original_Vaihenro) AND ([ReseptiID] = @Original_ReseptiID) AND ([Ohjeteksti] = @Original_Ohjeteksti));
SELECT Vaihenro, ReseptiID, Ohjeteksti FROM Ohje WHERE (ReseptiID = @ReseptiID) AND (Vaihenro = @Vaihenro)";
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Vaihenro", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Vaihenro", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReseptiID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Ohjeteksti", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ohjeteksti", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Vaihenro", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Vaihenro", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReseptiID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Ohjeteksti", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Ohjeteksti", 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::malli.Properties.Settings.Default.luento20malliConnectionString;
}
[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 Vaihenro, ReseptiID, Ohjeteksti FROM dbo.Ohje";
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(luento20malliDataSet.OhjeDataTable 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 luento20malliDataSet.OhjeDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
luento20malliDataSet.OhjeDataTable dataTable = new luento20malliDataSet.OhjeDataTable();
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(luento20malliDataSet.OhjeDataTable 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(luento20malliDataSet dataSet) {
return this.Adapter.Update(dataSet, "Ohje");
}
[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_Vaihenro, int Original_ReseptiID, string Original_Ohjeteksti) {
this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_Vaihenro));
this.Adapter.DeleteCommand.Parameters[1].Value = ((int)(Original_ReseptiID));
if ((Original_Ohjeteksti == null)) {
throw new global::System.ArgumentNullException("Original_Ohjeteksti");
}
else {
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Ohjeteksti));
}
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(int Vaihenro, int ReseptiID, string Ohjeteksti) {
this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Vaihenro));
this.Adapter.InsertCommand.Parameters[1].Value = ((int)(ReseptiID));
if ((Ohjeteksti == null)) {
throw new global::System.ArgumentNullException("Ohjeteksti");
}
else {
this.Adapter.InsertCommand.Parameters[2].Value = ((string)(Ohjeteksti));
}
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(int Vaihenro, int ReseptiID, string Ohjeteksti, int Original_Vaihenro, int Original_ReseptiID, string Original_Ohjeteksti) {
this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Vaihenro));
this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(ReseptiID));
if ((Ohjeteksti == null)) {
throw new global::System.ArgumentNullException("Ohjeteksti");
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Ohjeteksti));
}
this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Original_Vaihenro));
this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_ReseptiID));
if ((Original_Ohjeteksti == null)) {
throw new global::System.ArgumentNullException("Original_Ohjeteksti");
}
else {
this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(Original_Ohjeteksti));
}
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 Ohjeteksti, int Original_Vaihenro, int Original_ReseptiID, string Original_Ohjeteksti) {
return this.Update(Original_Vaihenro, Original_ReseptiID, Ohjeteksti, Original_Vaihenro, Original_ReseptiID, Original_Ohjeteksti);
}
}
///
///Represents the connection and commands used to retrieve and save data.
///
[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 ReseptiTableAdapter : 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 ReseptiTableAdapter() {
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 = "Resepti";
tableMapping.ColumnMappings.Add("Nimi", "Nimi");
tableMapping.ColumnMappings.Add("Kuvaus", "Kuvaus");
tableMapping.ColumnMappings.Add("Henkilomaara", "Henkilomaara");
tableMapping.ColumnMappings.Add("ReseptiID", "ReseptiID");
tableMapping.ColumnMappings.Add("RuokalajiID", "RuokalajiID");
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].[Resepti] WHERE (([Nimi] = @Original_Nimi) AND ((@IsNull_Kuvaus = 1 AND [Kuvaus] IS NULL) OR ([Kuvaus] = @Original_Kuvaus)) AND ((@IsNull_Henkilomaara = 1 AND [Henkilomaara] IS NULL) OR ([Henkilomaara] = @Original_Henkilomaara)) AND ([ReseptiID] = @Original_ReseptiID) AND ([RuokalajiID] = @Original_RuokalajiID))";
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Kuvaus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Henkilomaara", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Henkilomaara", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Henkilomaara", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Henkilomaara", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReseptiID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RuokalajiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RuokalajiID", 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].[Resepti] ([Nimi], [Kuvaus], [Henkilomaara], [RuokalajiID]) VAL" +
"UES (@Nimi, @Kuvaus, @Henkilomaara, @RuokalajiID);\r\nSELECT Nimi, Kuvaus, Henkilo" +
"maara, ReseptiID, RuokalajiID FROM Resepti WHERE (ReseptiID = SCOPE_IDENTITY())";
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Henkilomaara", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Henkilomaara", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RuokalajiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RuokalajiID", 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].[Resepti] SET [Nimi] = @Nimi, [Kuvaus] = @Kuvaus, [Henkilomaara] = @Henkilomaara, [RuokalajiID] = @RuokalajiID WHERE (([Nimi] = @Original_Nimi) AND ((@IsNull_Kuvaus = 1 AND [Kuvaus] IS NULL) OR ([Kuvaus] = @Original_Kuvaus)) AND ((@IsNull_Henkilomaara = 1 AND [Henkilomaara] IS NULL) OR ([Henkilomaara] = @Original_Henkilomaara)) AND ([ReseptiID] = @Original_ReseptiID) AND ([RuokalajiID] = @Original_RuokalajiID));
SELECT Nimi, Kuvaus, Henkilomaara, ReseptiID, RuokalajiID FROM Resepti WHERE (ReseptiID = @ReseptiID)";
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Henkilomaara", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Henkilomaara", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RuokalajiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RuokalajiID", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Kuvaus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Henkilomaara", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Henkilomaara", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Henkilomaara", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Henkilomaara", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_ReseptiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "ReseptiID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RuokalajiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RuokalajiID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@ReseptiID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "ReseptiID", 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::malli.Properties.Settings.Default.luento20malliConnectionString;
}
[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 Nimi, Kuvaus, Henkilomaara, ReseptiID, RuokalajiID FROM dbo.Resepti";
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(luento20malliDataSet.ReseptiDataTable 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 luento20malliDataSet.ReseptiDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
luento20malliDataSet.ReseptiDataTable dataTable = new luento20malliDataSet.ReseptiDataTable();
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(luento20malliDataSet.ReseptiDataTable 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(luento20malliDataSet dataSet) {
return this.Adapter.Update(dataSet, "Resepti");
}
[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_Nimi, string Original_Kuvaus, global::System.Nullable Original_Henkilomaara, int Original_ReseptiID, int Original_RuokalajiID) {
if ((Original_Nimi == null)) {
throw new global::System.ArgumentNullException("Original_Nimi");
}
else {
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Nimi));
}
if ((Original_Kuvaus == null)) {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Kuvaus));
}
if ((Original_Henkilomaara.HasValue == true)) {
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Henkilomaara.Value));
}
else {
this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value;
}
this.Adapter.DeleteCommand.Parameters[5].Value = ((int)(Original_ReseptiID));
this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_RuokalajiID));
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 Nimi, string Kuvaus, global::System.Nullable Henkilomaara, int RuokalajiID) {
if ((Nimi == null)) {
throw new global::System.ArgumentNullException("Nimi");
}
else {
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Nimi));
}
if ((Kuvaus == null)) {
this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Kuvaus));
}
if ((Henkilomaara.HasValue == true)) {
this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Henkilomaara.Value));
}
else {
this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value;
}
this.Adapter.InsertCommand.Parameters[3].Value = ((int)(RuokalajiID));
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 Nimi, string Kuvaus, global::System.Nullable Henkilomaara, int RuokalajiID, string Original_Nimi, string Original_Kuvaus, global::System.Nullable Original_Henkilomaara, int Original_ReseptiID, int Original_RuokalajiID, int ReseptiID) {
if ((Nimi == null)) {
throw new global::System.ArgumentNullException("Nimi");
}
else {
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Nimi));
}
if ((Kuvaus == null)) {
this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Kuvaus));
}
if ((Henkilomaara.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Henkilomaara.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value;
}
this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(RuokalajiID));
if ((Original_Nimi == null)) {
throw new global::System.ArgumentNullException("Original_Nimi");
}
else {
this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Nimi));
}
if ((Original_Kuvaus == null)) {
this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[5].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(Original_Kuvaus));
}
if ((Original_Henkilomaara.HasValue == true)) {
this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_Henkilomaara.Value));
}
else {
this.Adapter.UpdateCommand.Parameters[7].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value;
}
this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_ReseptiID));
this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_RuokalajiID));
this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(ReseptiID));
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 Nimi, string Kuvaus, global::System.Nullable Henkilomaara, int RuokalajiID, string Original_Nimi, string Original_Kuvaus, global::System.Nullable Original_Henkilomaara, int Original_ReseptiID, int Original_RuokalajiID) {
return this.Update(Nimi, Kuvaus, Henkilomaara, RuokalajiID, Original_Nimi, Original_Kuvaus, Original_Henkilomaara, Original_ReseptiID, Original_RuokalajiID, Original_ReseptiID);
}
}
///
///Represents the connection and commands used to retrieve and save data.
///
[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 RuokalajiTableAdapter : 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 RuokalajiTableAdapter() {
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 = "Ruokalaji";
tableMapping.ColumnMappings.Add("Nimi", "Nimi");
tableMapping.ColumnMappings.Add("Kuvaus", "Kuvaus");
tableMapping.ColumnMappings.Add("RuokalajiID", "RuokalajiID");
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].[Ruokalaji] WHERE (([Nimi] = @Original_Nimi) AND ((@IsNull_Kuva" +
"us = 1 AND [Kuvaus] IS NULL) OR ([Kuvaus] = @Original_Kuvaus)) AND ([RuokalajiID" +
"] = @Original_RuokalajiID))";
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Kuvaus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RuokalajiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RuokalajiID", 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].[Ruokalaji] ([Nimi], [Kuvaus]) VALUES (@Nimi, @Kuvaus);\r\nSELECT" +
" Nimi, Kuvaus, RuokalajiID FROM Ruokalaji WHERE (RuokalajiID = SCOPE_IDENTITY())" +
"";
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", 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].[Ruokalaji] SET [Nimi] = @Nimi, [Kuvaus] = @Kuvaus WHERE (([Nimi] = @Original_Nimi) AND ((@IsNull_Kuvaus = 1 AND [Kuvaus] IS NULL) OR ([Kuvaus] = @Original_Kuvaus)) AND ([RuokalajiID] = @Original_RuokalajiID));
SELECT Nimi, Kuvaus, RuokalajiID FROM Ruokalaji WHERE (RuokalajiID = @RuokalajiID)";
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@IsNull_Kuvaus", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, true, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Kuvaus", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Kuvaus", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_RuokalajiID", global::System.Data.SqlDbType.Int, 0, global::System.Data.ParameterDirection.Input, 0, 0, "RuokalajiID", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@RuokalajiID", global::System.Data.SqlDbType.Int, 4, global::System.Data.ParameterDirection.Input, 0, 0, "RuokalajiID", 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::malli.Properties.Settings.Default.luento20malliConnectionString;
}
[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 Nimi, Kuvaus, RuokalajiID FROM dbo.Ruokalaji";
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(luento20malliDataSet.RuokalajiDataTable 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 luento20malliDataSet.RuokalajiDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
luento20malliDataSet.RuokalajiDataTable dataTable = new luento20malliDataSet.RuokalajiDataTable();
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(luento20malliDataSet.RuokalajiDataTable 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(luento20malliDataSet dataSet) {
return this.Adapter.Update(dataSet, "Ruokalaji");
}
[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_Nimi, string Original_Kuvaus, int Original_RuokalajiID) {
if ((Original_Nimi == null)) {
throw new global::System.ArgumentNullException("Original_Nimi");
}
else {
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Nimi));
}
if ((Original_Kuvaus == null)) {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1));
this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value;
}
else {
this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0));
this.Adapter.DeleteCommand.Parameters[2].Value = ((string)(Original_Kuvaus));
}
this.Adapter.DeleteCommand.Parameters[3].Value = ((int)(Original_RuokalajiID));
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 Nimi, string Kuvaus) {
if ((Nimi == null)) {
throw new global::System.ArgumentNullException("Nimi");
}
else {
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Nimi));
}
if ((Kuvaus == null)) {
this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Kuvaus));
}
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 Nimi, string Kuvaus, string Original_Nimi, string Original_Kuvaus, int Original_RuokalajiID, int RuokalajiID) {
if ((Nimi == null)) {
throw new global::System.ArgumentNullException("Nimi");
}
else {
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Nimi));
}
if ((Kuvaus == null)) {
this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Kuvaus));
}
if ((Original_Nimi == null)) {
throw new global::System.ArgumentNullException("Original_Nimi");
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_Nimi));
}
if ((Original_Kuvaus == null)) {
this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1));
this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value;
}
else {
this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0));
this.Adapter.UpdateCommand.Parameters[4].Value = ((string)(Original_Kuvaus));
}
this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Original_RuokalajiID));
this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(RuokalajiID));
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 Nimi, string Kuvaus, string Original_Nimi, string Original_Kuvaus, int Original_RuokalajiID) {
return this.Update(Nimi, Kuvaus, Original_Nimi, Original_Kuvaus, Original_RuokalajiID, Original_RuokalajiID);
}
}
///
///Represents the connection and commands used to retrieve and save data.
///
[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 YksikkoTableAdapter : 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 YksikkoTableAdapter() {
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 = "Yksikko";
tableMapping.ColumnMappings.Add("Nimi", "Nimi");
tableMapping.ColumnMappings.Add("Lyhenne", "Lyhenne");
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].[Yksikko] WHERE (([Nimi] = @Original_Nimi) AND ([Lyhenne] = @Or" +
"iginal_Lyhenne))";
this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Lyhenne", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Lyhenne", 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].[Yksikko] ([Nimi], [Lyhenne]) VALUES (@Nimi, @Lyhenne);\r\nSELECT" +
" Nimi, Lyhenne FROM Yksikko WHERE (Lyhenne = @Lyhenne)";
this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.InsertCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Lyhenne", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Lyhenne", 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].[Yksikko] SET [Nimi] = @Nimi, [Lyhenne] = @Lyhenne WHERE (([Nimi] = " +
"@Original_Nimi) AND ([Lyhenne] = @Original_Lyhenne));\r\nSELECT Nimi, Lyhenne FROM" +
" Yksikko WHERE (Lyhenne = @Lyhenne)";
this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text;
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Lyhenne", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Lyhenne", global::System.Data.DataRowVersion.Current, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Nimi", global::System.Data.SqlDbType.VarChar, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Nimi", global::System.Data.DataRowVersion.Original, false, null, "", "", ""));
this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.SqlClient.SqlParameter("@Original_Lyhenne", global::System.Data.SqlDbType.Char, 0, global::System.Data.ParameterDirection.Input, 0, 0, "Lyhenne", 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::malli.Properties.Settings.Default.luento20malliConnectionString;
}
[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 Nimi, Lyhenne FROM dbo.Yksikko";
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(luento20malliDataSet.YksikkoDataTable 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 luento20malliDataSet.YksikkoDataTable GetData() {
this.Adapter.SelectCommand = this.CommandCollection[0];
luento20malliDataSet.YksikkoDataTable dataTable = new luento20malliDataSet.YksikkoDataTable();
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(luento20malliDataSet.YksikkoDataTable 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(luento20malliDataSet dataSet) {
return this.Adapter.Update(dataSet, "Yksikko");
}
[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_Nimi, string Original_Lyhenne) {
if ((Original_Nimi == null)) {
throw new global::System.ArgumentNullException("Original_Nimi");
}
else {
this.Adapter.DeleteCommand.Parameters[0].Value = ((string)(Original_Nimi));
}
if ((Original_Lyhenne == null)) {
throw new global::System.ArgumentNullException("Original_Lyhenne");
}
else {
this.Adapter.DeleteCommand.Parameters[1].Value = ((string)(Original_Lyhenne));
}
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 Nimi, string Lyhenne) {
if ((Nimi == null)) {
throw new global::System.ArgumentNullException("Nimi");
}
else {
this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Nimi));
}
if ((Lyhenne == null)) {
throw new global::System.ArgumentNullException("Lyhenne");
}
else {
this.Adapter.InsertCommand.Parameters[1].Value = ((string)(Lyhenne));
}
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 Nimi, string Lyhenne, string Original_Nimi, string Original_Lyhenne) {
if ((Nimi == null)) {
throw new global::System.ArgumentNullException("Nimi");
}
else {
this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Nimi));
}
if ((Lyhenne == null)) {
throw new global::System.ArgumentNullException("Lyhenne");
}
else {
this.Adapter.UpdateCommand.Parameters[1].Value = ((string)(Lyhenne));
}
if ((Original_Nimi == null)) {
throw new global::System.ArgumentNullException("Original_Nimi");
}
else {
this.Adapter.UpdateCommand.Parameters[2].Value = ((string)(Original_Nimi));
}
if ((Original_Lyhenne == null)) {
throw new global::System.ArgumentNullException("Original_Lyhenne");
}
else {
this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_Lyhenne));
}
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 Nimi, string Original_Nimi, string Original_Lyhenne) {
return this.Update(Nimi, Original_Lyhenne, Original_Nimi, Original_Lyhenne);
}
}
///
///TableAdapterManager is used to coordinate TableAdapters in the dataset to enable Hierarchical Update scenarios
///
[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 AineTableAdapter _aineTableAdapter;
private LiittyyTableAdapter _liittyyTableAdapter;
private OhjeTableAdapter _ohjeTableAdapter;
private ReseptiTableAdapter _reseptiTableAdapter;
private RuokalajiTableAdapter _ruokalajiTableAdapter;
private YksikkoTableAdapter _yksikkoTableAdapter;
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 AineTableAdapter AineTableAdapter {
get {
return this._aineTableAdapter;
}
set {
this._aineTableAdapter = 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 LiittyyTableAdapter LiittyyTableAdapter {
get {
return this._liittyyTableAdapter;
}
set {
this._liittyyTableAdapter = 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 OhjeTableAdapter OhjeTableAdapter {
get {
return this._ohjeTableAdapter;
}
set {
this._ohjeTableAdapter = 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 ReseptiTableAdapter ReseptiTableAdapter {
get {
return this._reseptiTableAdapter;
}
set {
this._reseptiTableAdapter = 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 RuokalajiTableAdapter RuokalajiTableAdapter {
get {
return this._ruokalajiTableAdapter;
}
set {
this._ruokalajiTableAdapter = 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 YksikkoTableAdapter YksikkoTableAdapter {
get {
return this._yksikkoTableAdapter;
}
set {
this._yksikkoTableAdapter = 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._aineTableAdapter != null)
&& (this._aineTableAdapter.Connection != null))) {
return this._aineTableAdapter.Connection;
}
if (((this._liittyyTableAdapter != null)
&& (this._liittyyTableAdapter.Connection != null))) {
return this._liittyyTableAdapter.Connection;
}
if (((this._ohjeTableAdapter != null)
&& (this._ohjeTableAdapter.Connection != null))) {
return this._ohjeTableAdapter.Connection;
}
if (((this._reseptiTableAdapter != null)
&& (this._reseptiTableAdapter.Connection != null))) {
return this._reseptiTableAdapter.Connection;
}
if (((this._ruokalajiTableAdapter != null)
&& (this._ruokalajiTableAdapter.Connection != null))) {
return this._ruokalajiTableAdapter.Connection;
}
if (((this._yksikkoTableAdapter != null)
&& (this._yksikkoTableAdapter.Connection != null))) {
return this._yksikkoTableAdapter.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._aineTableAdapter != null)) {
count = (count + 1);
}
if ((this._liittyyTableAdapter != null)) {
count = (count + 1);
}
if ((this._ohjeTableAdapter != null)) {
count = (count + 1);
}
if ((this._reseptiTableAdapter != null)) {
count = (count + 1);
}
if ((this._ruokalajiTableAdapter != null)) {
count = (count + 1);
}
if ((this._yksikkoTableAdapter != null)) {
count = (count + 1);
}
return count;
}
}
///
///Update rows in top-down order.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private int UpdateUpdatedRows(luento20malliDataSet dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) {
int result = 0;
if ((this._ruokalajiTableAdapter != null)) {
global::System.Data.DataRow[] updatedRows = dataSet.Ruokalaji.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length))) {
result = (result + this._ruokalajiTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
if ((this._reseptiTableAdapter != null)) {
global::System.Data.DataRow[] updatedRows = dataSet.Resepti.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length))) {
result = (result + this._reseptiTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
if ((this._yksikkoTableAdapter != null)) {
global::System.Data.DataRow[] updatedRows = dataSet.Yksikko.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length))) {
result = (result + this._yksikkoTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
if ((this._aineTableAdapter != null)) {
global::System.Data.DataRow[] updatedRows = dataSet.Aine.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length))) {
result = (result + this._aineTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
if ((this._ohjeTableAdapter != null)) {
global::System.Data.DataRow[] updatedRows = dataSet.Ohje.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length))) {
result = (result + this._ohjeTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
if ((this._liittyyTableAdapter != null)) {
global::System.Data.DataRow[] updatedRows = dataSet.Liittyy.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent);
updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows);
if (((updatedRows != null)
&& (0 < updatedRows.Length))) {
result = (result + this._liittyyTableAdapter.Update(updatedRows));
allChangedRows.AddRange(updatedRows);
}
}
return result;
}
///
///Insert rows in top-down order.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private int UpdateInsertedRows(luento20malliDataSet dataSet, global::System.Collections.Generic.List allAddedRows) {
int result = 0;
if ((this._ruokalajiTableAdapter != null)) {
global::System.Data.DataRow[] addedRows = dataSet.Ruokalaji.Select(null, null, global::System.Data.DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length))) {
result = (result + this._ruokalajiTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
if ((this._reseptiTableAdapter != null)) {
global::System.Data.DataRow[] addedRows = dataSet.Resepti.Select(null, null, global::System.Data.DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length))) {
result = (result + this._reseptiTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
if ((this._yksikkoTableAdapter != null)) {
global::System.Data.DataRow[] addedRows = dataSet.Yksikko.Select(null, null, global::System.Data.DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length))) {
result = (result + this._yksikkoTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
if ((this._aineTableAdapter != null)) {
global::System.Data.DataRow[] addedRows = dataSet.Aine.Select(null, null, global::System.Data.DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length))) {
result = (result + this._aineTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
if ((this._ohjeTableAdapter != null)) {
global::System.Data.DataRow[] addedRows = dataSet.Ohje.Select(null, null, global::System.Data.DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length))) {
result = (result + this._ohjeTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
if ((this._liittyyTableAdapter != null)) {
global::System.Data.DataRow[] addedRows = dataSet.Liittyy.Select(null, null, global::System.Data.DataViewRowState.Added);
if (((addedRows != null)
&& (0 < addedRows.Length))) {
result = (result + this._liittyyTableAdapter.Update(addedRows));
allAddedRows.AddRange(addedRows);
}
}
return result;
}
///
///Delete rows in bottom-up order.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
private int UpdateDeletedRows(luento20malliDataSet dataSet, global::System.Collections.Generic.List allChangedRows) {
int result = 0;
if ((this._liittyyTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.Liittyy.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length))) {
result = (result + this._liittyyTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
if ((this._ohjeTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.Ohje.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length))) {
result = (result + this._ohjeTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
if ((this._aineTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.Aine.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length))) {
result = (result + this._aineTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
if ((this._yksikkoTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.Yksikko.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length))) {
result = (result + this._yksikkoTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
if ((this._reseptiTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.Resepti.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length))) {
result = (result + this._reseptiTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
if ((this._ruokalajiTableAdapter != null)) {
global::System.Data.DataRow[] deletedRows = dataSet.Ruokalaji.Select(null, null, global::System.Data.DataViewRowState.Deleted);
if (((deletedRows != null)
&& (0 < deletedRows.Length))) {
result = (result + this._ruokalajiTableAdapter.Update(deletedRows));
allChangedRows.AddRange(deletedRows);
}
}
return result;
}
///
///Remove inserted rows that become updated rows after calling TableAdapter.Update(inserted rows) first
///
[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 allAddedRows) {
if (((updatedRows == null)
|| (updatedRows.Length < 1))) {
return updatedRows;
}
if (((allAddedRows == null)
|| (allAddedRows.Count < 1))) {
return updatedRows;
}
global::System.Collections.Generic.List realUpdatedRows = new global::System.Collections.Generic.List();
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();
}
///
///Update all changes to the dataset.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")]
public virtual int UpdateAll(luento20malliDataSet dataSet) {
if ((dataSet == null)) {
throw new global::System.ArgumentNullException("dataSet");
}
if ((dataSet.HasChanges() == false)) {
return 0;
}
if (((this._aineTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._aineTableAdapter.Connection) == false))) {
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
if (((this._liittyyTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._liittyyTableAdapter.Connection) == false))) {
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
if (((this._ohjeTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._ohjeTableAdapter.Connection) == false))) {
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
if (((this._reseptiTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._reseptiTableAdapter.Connection) == false))) {
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
if (((this._ruokalajiTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._ruokalajiTableAdapter.Connection) == false))) {
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
if (((this._yksikkoTableAdapter != null)
&& (this.MatchTableAdapterConnection(this._yksikkoTableAdapter.Connection) == false))) {
throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" +
"tring.");
}
global::System.Data.IDbConnection workConnection = this.Connection;
if ((workConnection == null)) {
throw new global::System.ApplicationException("TableAdapterManager contains no connection information. Set each TableAdapterMana" +
"ger TableAdapter property to a valid TableAdapter instance.");
}
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("The transaction cannot begin. The current data connection does not support transa" +
"ctions or the current state is not allowing the transaction to begin.");
}
global::System.Collections.Generic.List allChangedRows = new global::System.Collections.Generic.List();
global::System.Collections.Generic.List allAddedRows = new global::System.Collections.Generic.List();
global::System.Collections.Generic.List adaptersWithAcceptChangesDuringUpdate = new global::System.Collections.Generic.List();
global::System.Collections.Generic.Dictionary