commit 58501fec366070ea498997b56bfe10b9fdb4fb30 Author: Garritt McCune Date: Thu Jan 28 19:53:08 2021 -0600 What I believe is the olderest, marked as 'AdvertsingProfitControl Alpha' by the folder. Only had a simple 'Add Records' form, quite incomplete. diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..fcaa385 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +AdvertsingProfitControl/bin +AdvertsingProfitControl/obj \ No newline at end of file diff --git a/AdvertsingProfitControl.sln b/AdvertsingProfitControl.sln new file mode 100644 index 0000000..f1b7119 --- /dev/null +++ b/AdvertsingProfitControl.sln @@ -0,0 +1,20 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio 2012 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "AdvertsingProfitControl", "AdvertsingProfitControl\AdvertsingProfitControl.csproj", "{4A45C665-5D02-4724-9CC5-C0C50CA44760}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4A45C665-5D02-4724-9CC5-C0C50CA44760}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4A45C665-5D02-4724-9CC5-C0C50CA44760}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4A45C665-5D02-4724-9CC5-C0C50CA44760}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4A45C665-5D02-4724-9CC5-C0C50CA44760}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection +EndGlobal diff --git a/AdvertsingProfitControl.v11.suo b/AdvertsingProfitControl.v11.suo new file mode 100644 index 0000000..05092a9 Binary files /dev/null and b/AdvertsingProfitControl.v11.suo differ diff --git a/AdvertsingProfitControl/AddRecord.cs b/AdvertsingProfitControl/AddRecord.cs new file mode 100644 index 0000000..0a5715c --- /dev/null +++ b/AdvertsingProfitControl/AddRecord.cs @@ -0,0 +1,38 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Data.OleDb; +using System.Windows.Forms; + +namespace AdvertsingProfitControl +{ + class AddRecord + { + private static string gConnectionString = @"Provider=Microsoft.ACE.OLEDB.12.0;Data Source=apcDatabase.accdb;Persist Security Info=False"; + + public AddRecord() + { + //Get database location from DBLocation class + } + + public int ExecuteQuery(string query) + { + int rowsAffected = -1; + using (OleDbConnection conn = new OleDbConnection(gConnectionString)) + { + try + { + OleDbCommand queryCommand = new OleDbCommand(query, conn); + conn.Open(); + rowsAffected = queryCommand.ExecuteNonQuery(); + } + catch (Exception e) + { + MessageBox.Show(e.Message, "Error Writing to Database"); + } + } + + return rowsAffected; + } + } +} diff --git a/AdvertsingProfitControl/AdvertsingProfitControl.csproj b/AdvertsingProfitControl/AdvertsingProfitControl.csproj new file mode 100644 index 0000000..3995e1a --- /dev/null +++ b/AdvertsingProfitControl/AdvertsingProfitControl.csproj @@ -0,0 +1,119 @@ + + + + + Debug + AnyCPU + {4A45C665-5D02-4724-9CC5-C0C50CA44760} + WinExe + Properties + AdvertsingProfitControl + AdvertsingProfitControl + v2.0 + 512 + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + apcDatabase.xsd + Component + + + True + True + apcDatabase.xsd + + + Form + + + frmAddRecord.cs + + + Form + + + frmMain.cs + + + + + + + frmAddRecord.cs + + + frmMain.cs + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + apcDatabase.xsd + + + MSDataSetGenerator + apcDatabase.Designer.cs + Designer + + + apcDatabase.xsd + + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + Always + + + + + \ No newline at end of file diff --git a/AdvertsingProfitControl/Program.cs b/AdvertsingProfitControl/Program.cs new file mode 100644 index 0000000..932c713 --- /dev/null +++ b/AdvertsingProfitControl/Program.cs @@ -0,0 +1,20 @@ +using System; +using System.Collections.Generic; +using System.Windows.Forms; + +namespace AdvertsingProfitControl +{ + static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + Application.EnableVisualStyles(); + Application.SetCompatibleTextRenderingDefault(false); + Application.Run(new frmMain()); + } + } +} diff --git a/AdvertsingProfitControl/Properties/AssemblyInfo.cs b/AdvertsingProfitControl/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..fb379a6 --- /dev/null +++ b/AdvertsingProfitControl/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("AdvertsingProfitControl")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("AdvertsingProfitControl")] +[assembly: AssemblyCopyright("Copyright © 2015")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("ddd8ea52-f3a1-4e6f-8b7e-8d9c1c19179d")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/AdvertsingProfitControl/Properties/Resources.Designer.cs b/AdvertsingProfitControl/Properties/Resources.Designer.cs new file mode 100644 index 0000000..b28b1c2 --- /dev/null +++ b/AdvertsingProfitControl/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AdvertsingProfitControl.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("AdvertsingProfitControl.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/AdvertsingProfitControl/Properties/Resources.resx b/AdvertsingProfitControl/Properties/Resources.resx new file mode 100644 index 0000000..ffecec8 --- /dev/null +++ b/AdvertsingProfitControl/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/AdvertsingProfitControl/Properties/Settings.Designer.cs b/AdvertsingProfitControl/Properties/Settings.Designer.cs new file mode 100644 index 0000000..9cfe85b --- /dev/null +++ b/AdvertsingProfitControl/Properties/Settings.Designer.cs @@ -0,0 +1,70 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace AdvertsingProfitControl.Properties { + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default { + get { + return defaultInstance; + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] + [global::System.Configuration.DefaultSettingValueAttribute("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\\apc.accdb;Persist S" + + "ecurity Info=True")] + public string apcConnectionString { + get { + return ((string)(this["apcConnectionString"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] + [global::System.Configuration.DefaultSettingValueAttribute("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\\apc.accdb;Persist S" + + "ecurity Info=True")] + public string apc___CopyConnectionString { + get { + return ((string)(this["apc___CopyConnectionString"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] + [global::System.Configuration.DefaultSettingValueAttribute("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\\apcDatabase.accdb;P" + + "ersist Security Info=True")] + public string apc___CopyConnectionString1 { + get { + return ((string)(this["apc___CopyConnectionString1"])); + } + } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] + [global::System.Configuration.DefaultSettingValueAttribute("Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\\apcDatabase.accdb;P" + + "ersist Security Info=True")] + public string apc___CopyConnectionString2 { + get { + return ((string)(this["apc___CopyConnectionString2"])); + } + } + } +} diff --git a/AdvertsingProfitControl/Properties/Settings.settings b/AdvertsingProfitControl/Properties/Settings.settings new file mode 100644 index 0000000..06bc006 --- /dev/null +++ b/AdvertsingProfitControl/Properties/Settings.settings @@ -0,0 +1,38 @@ + + + + + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\apc.accdb;Persist Security Info=True</ConnectionString> + <ProviderName>System.Data.OleDb</ProviderName> +</SerializableConnectionString> + Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\apc.accdb;Persist Security Info=True + + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\apc.accdb;Persist Security Info=True</ConnectionString> + <ProviderName>System.Data.OleDb</ProviderName> +</SerializableConnectionString> + Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\apc.accdb;Persist Security Info=True + + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\apcDatabase.accdb;Persist Security Info=True</ConnectionString> + <ProviderName>System.Data.OleDb</ProviderName> +</SerializableConnectionString> + Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\apcDatabase.accdb;Persist Security Info=True + + + <?xml version="1.0" encoding="utf-16"?> +<SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> + <ConnectionString>Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\apcDatabase.accdb;Persist Security Info=True</ConnectionString> + <ProviderName>System.Data.OleDb</ProviderName> +</SerializableConnectionString> + Provider=Microsoft.ACE.OLEDB.12.0;Data Source=|DataDirectory|\apcDatabase.accdb;Persist Security Info=True + + + \ No newline at end of file diff --git a/AdvertsingProfitControl/RetrieveTables.cs b/AdvertsingProfitControl/RetrieveTables.cs new file mode 100644 index 0000000..8996875 --- /dev/null +++ b/AdvertsingProfitControl/RetrieveTables.cs @@ -0,0 +1,103 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Text; +using System.Data.OleDb; +using System.Windows.Forms; + +namespace AdvertsingProfitControl +{ + class RetrieveTables + { + private string MostRecentDate; + + public RetrieveTables() + { + if (MostRecentDate == null) + { + apcDatabaseTableAdapters.WeekEndingDateTableAdapter date = new apcDatabaseTableAdapters.WeekEndingDateTableAdapter(); + MostRecentDate = date.GetMostRecentDate().ToString(); + } + MostRecentDate = "1"; + } + + public DataTable APCProjectionSaleTable() + { + DataTable APCProjectionSaleTable = new DataTable(); + apcDatabaseTableAdapters.ProjectedSalesTableAdapter APCProjectionSaleTableAdapter = new apcDatabaseTableAdapters.ProjectedSalesTableAdapter(); + APCProjectionSaleTable = APCProjectionSaleTableAdapter.GetDataByProjections(MostRecentDate); + return APCProjectionSaleTable; + } + + public DataTable APCActualSalesTable() + { + DataTable APCActualSalesTable = new DataTable(); + apcDatabaseTableAdapters.ActualSalesTableAdapter APCActualSalesTableAdapter = new apcDatabaseTableAdapters.ActualSalesTableAdapter(); + APCActualSalesTable = APCActualSalesTableAdapter.ReturnInventoryAndActualSales(MostRecentDate); + return APCActualSalesTable; + } + + public string GetAdItemID(string adItemString) + { + string adItemID; + apcDatabaseTableAdapters.AdItemTableAdapter adItemTableAdapter = new apcDatabaseTableAdapters.AdItemTableAdapter(); + adItemID = adItemTableAdapter.ReturnAddItemIDByItemString(adItemString).Rows[0][0].ToString(); + + return adItemID; + } + + public DataGridView WICTable() + { + DataGridView wicTable = new DataGridView(); + apcDatabaseTableAdapters.WeekEndingDateTableAdapter weekEndingTableAdapter = new apcDatabaseTableAdapters.WeekEndingDateTableAdapter(); + wicTable.DataSource = weekEndingTableAdapter.ReturnWICTable("1"); + return wicTable; + } + + public string[] Comment() + { + DataGridView commentTable = new DataGridView(); + List comments = new List(); + + apcDatabaseTableAdapters.CommentTableAdapter commentsTableAdapter = new apcDatabaseTableAdapters.CommentTableAdapter(); + commentTable.DataSource = commentsTableAdapter.GetDataByDateID(MostRecentDate); + + if (commentTable.Rows.Count > 0) + { + string[] finalCommentArray = new String[commentTable.Rows.Count]; + for (int i = 0; i < commentTable.Rows.Count; i++) + { + finalCommentArray[i] = Convert.ToString(commentTable.Rows[i].Cells[0].Value); + comments.Add(finalCommentArray[i]); + } + return finalCommentArray; + } + else + { + comments.Add("No comments to display for the week ending on " + Date()); + return comments.ToArray(); + } + } + + public string Date() + { + string dateString; + apcDatabaseTableAdapters.WeekEndingDateTableAdapter weekEnding = new apcDatabaseTableAdapters.WeekEndingDateTableAdapter(); + DateTime dateTime = new DateTime(); + dateTime = (DateTime)weekEnding.ReturnDate(MostRecentDate).Rows[0][1]; + dateString = dateTime.ToLongDateString(); + return dateString; + } + + public string DateID(string dateString) + { + apcDatabaseTableAdapters.WeekEndingDateTableAdapter weekEnding = new apcDatabaseTableAdapters.WeekEndingDateTableAdapter(); + string dateID; + + dateID = weekEnding.ReturnDateIDByDateString(dateString).Rows[0][0].ToString(); + + return dateID; + } + } +} diff --git a/AdvertsingProfitControl/WriteToDatabase.cs b/AdvertsingProfitControl/WriteToDatabase.cs new file mode 100644 index 0000000..c645b06 --- /dev/null +++ b/AdvertsingProfitControl/WriteToDatabase.cs @@ -0,0 +1,97 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Data.OleDb; +using System.Windows.Forms; + +namespace AdvertsingProfitControl +{ + class WriteToDatabase + { + + public void InsertIntoActualSales(string[] parameters, string conn) + { + using (OleDbConnection connection = new OleDbConnection(conn)) + { + string sqlInsert = "INSERT INTO ActualSales(AcSold, AcSalePrice, AcTotalSales, AcCost, AcProfitReturn, AcTotalProfitReturn, FK_AdItemID, FK_DateID) VALUES (@sold, @salesPrice, @totalSales, @cost, @profitReturn, @toalProfitReturn, @adItemID, @dateID)"; + OleDbCommand command = new OleDbCommand(sqlInsert, connection); + command.Parameters.AddWithValue("@sold", parameters[0]); + command.Parameters.AddWithValue("@salesPrice", parameters[1]); + command.Parameters.AddWithValue("@totalSales", parameters[2]); + command.Parameters.AddWithValue("@cost", parameters[3]); + command.Parameters.AddWithValue("@profitReturn", parameters[4]); + command.Parameters.AddWithValue("@totalProfitReturn", parameters[5]); + command.Parameters.AddWithValue("@adItemID", parameters[6]); + command.Parameters.AddWithValue("@dateID", parameters[7]); + try + { + connection.Open(); + command.ExecuteNonQuery(); + } + catch (Exception e) + { + MessageBox.Show(e.Message, "Error Writing to Database"); + } + } + } + + public void InsertIntoAdItems(string[] parameters, string conn) + { + + } + + public void InsertIntoComment(string[] parameters, string conn) + { + + } + + public void InsertIntoInventory(string[] parameters, string conn) + { + using (OleDbConnection connection = new OleDbConnection(conn)) + { + string sql = "INSERT INTO Inventory(InvBeginingInventory, InvRecieved, InvTotal, InvEnding, Fk_AditemID, Fk_DateID) VALUES (@begining, @recieved, @total, @ending, @adItem, @dateID)"; + OleDbCommand command = new OleDbCommand(sql, connection); + command.Parameters.AddWithValue("@begining", parameters[0]); + command.Parameters.AddWithValue("@recieved", parameters[1]); + command.Parameters.AddWithValue("@total", parameters[2]); + command.Parameters.AddWithValue("@ending", parameters[3]); + command.Parameters.AddWithValue("@adItem", parameters[4]); + command.Parameters.AddWithValue("@dateID", parameters[5]); + try + { + connection.Open(); + command.ExecuteNonQuery(); + } + catch (Exception e) + { + MessageBox.Show(e.Message, "Error Writing to Database"); + } + } + } + + public void InsertIntoInvoice(string[] parameters, string conn) + { + + } + + public void InsertIntoProjectedSales(string[] parameters, string conn) + { + + } + + public void InsertIntoSupplier(string[] parameters, string conn) + { + + } + + public void InsertIntoWeekEndingDate(string[] parameters, string conn) + { + + } + + public void InsertIntoWeeklySales(string[] parameters, string conn) + { + + } + } +} diff --git a/AdvertsingProfitControl/apcDatabase.Designer.cs b/AdvertsingProfitControl/apcDatabase.Designer.cs new file mode 100644 index 0000000..3e4b61a --- /dev/null +++ b/AdvertsingProfitControl/apcDatabase.Designer.cs @@ -0,0 +1,10916 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.34209 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +#pragma warning disable 1591 + +namespace AdvertsingProfitControl { + + + /// + ///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("apcDatabase")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.DataSet")] + public partial class apcDatabase : global::System.Data.DataSet { + + private ActualSalesDataTable tableActualSales; + + private AdItemDataTable tableAdItem; + + private CommentDataTable tableComment; + + private InventoryDataTable tableInventory; + + private InvoiceDataTable tableInvoice; + + private ProjectedSalesDataTable tableProjectedSales; + + private SupplierDataTable tableSupplier; + + private WeekEndingDateDataTable tableWeekEndingDate; + + private WeeklySalesDataTable tableWeeklySales; + + private global::System.Data.DataRelation relationAdItemActualSales; + + private global::System.Data.DataRelation relationWeekEndingDateActualSales; + + private global::System.Data.DataRelation relationWeekEndingDateComment; + + private global::System.Data.DataRelation relationSupplierInvoice; + + private global::System.Data.DataRelation relationWeekEndingDateInvoice; + + private global::System.Data.DataRelation relationWeekEndingDateWeeklySales; + + 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 apcDatabase() { + 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 apcDatabase(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["ActualSales"] != null)) { + base.Tables.Add(new ActualSalesDataTable(ds.Tables["ActualSales"])); + } + if ((ds.Tables["AdItem"] != null)) { + base.Tables.Add(new AdItemDataTable(ds.Tables["AdItem"])); + } + if ((ds.Tables["Comment"] != null)) { + base.Tables.Add(new CommentDataTable(ds.Tables["Comment"])); + } + if ((ds.Tables["Inventory"] != null)) { + base.Tables.Add(new InventoryDataTable(ds.Tables["Inventory"])); + } + if ((ds.Tables["Invoice"] != null)) { + base.Tables.Add(new InvoiceDataTable(ds.Tables["Invoice"])); + } + if ((ds.Tables["ProjectedSales"] != null)) { + base.Tables.Add(new ProjectedSalesDataTable(ds.Tables["ProjectedSales"])); + } + if ((ds.Tables["Supplier"] != null)) { + base.Tables.Add(new SupplierDataTable(ds.Tables["Supplier"])); + } + if ((ds.Tables["WeekEndingDate"] != null)) { + base.Tables.Add(new WeekEndingDateDataTable(ds.Tables["WeekEndingDate"])); + } + if ((ds.Tables["WeeklySales"] != null)) { + base.Tables.Add(new WeeklySalesDataTable(ds.Tables["WeeklySales"])); + } + 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 ActualSalesDataTable ActualSales { + get { + return this.tableActualSales; + } + } + + [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 AdItemDataTable AdItem { + get { + return this.tableAdItem; + } + } + + [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 CommentDataTable Comment { + get { + return this.tableComment; + } + } + + [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 InventoryDataTable Inventory { + get { + return this.tableInventory; + } + } + + [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 InvoiceDataTable Invoice { + get { + return this.tableInvoice; + } + } + + [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 ProjectedSalesDataTable ProjectedSales { + get { + return this.tableProjectedSales; + } + } + + [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 SupplierDataTable Supplier { + get { + return this.tableSupplier; + } + } + + [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 WeekEndingDateDataTable WeekEndingDate { + get { + return this.tableWeekEndingDate; + } + } + + [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 WeeklySalesDataTable WeeklySales { + get { + return this.tableWeeklySales; + } + } + + [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() { + apcDatabase cln = ((apcDatabase)(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["ActualSales"] != null)) { + base.Tables.Add(new ActualSalesDataTable(ds.Tables["ActualSales"])); + } + if ((ds.Tables["AdItem"] != null)) { + base.Tables.Add(new AdItemDataTable(ds.Tables["AdItem"])); + } + if ((ds.Tables["Comment"] != null)) { + base.Tables.Add(new CommentDataTable(ds.Tables["Comment"])); + } + if ((ds.Tables["Inventory"] != null)) { + base.Tables.Add(new InventoryDataTable(ds.Tables["Inventory"])); + } + if ((ds.Tables["Invoice"] != null)) { + base.Tables.Add(new InvoiceDataTable(ds.Tables["Invoice"])); + } + if ((ds.Tables["ProjectedSales"] != null)) { + base.Tables.Add(new ProjectedSalesDataTable(ds.Tables["ProjectedSales"])); + } + if ((ds.Tables["Supplier"] != null)) { + base.Tables.Add(new SupplierDataTable(ds.Tables["Supplier"])); + } + if ((ds.Tables["WeekEndingDate"] != null)) { + base.Tables.Add(new WeekEndingDateDataTable(ds.Tables["WeekEndingDate"])); + } + if ((ds.Tables["WeeklySales"] != null)) { + base.Tables.Add(new WeeklySalesDataTable(ds.Tables["WeeklySales"])); + } + 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.tableActualSales = ((ActualSalesDataTable)(base.Tables["ActualSales"])); + if ((initTable == true)) { + if ((this.tableActualSales != null)) { + this.tableActualSales.InitVars(); + } + } + this.tableAdItem = ((AdItemDataTable)(base.Tables["AdItem"])); + if ((initTable == true)) { + if ((this.tableAdItem != null)) { + this.tableAdItem.InitVars(); + } + } + this.tableComment = ((CommentDataTable)(base.Tables["Comment"])); + if ((initTable == true)) { + if ((this.tableComment != null)) { + this.tableComment.InitVars(); + } + } + this.tableInventory = ((InventoryDataTable)(base.Tables["Inventory"])); + if ((initTable == true)) { + if ((this.tableInventory != null)) { + this.tableInventory.InitVars(); + } + } + this.tableInvoice = ((InvoiceDataTable)(base.Tables["Invoice"])); + if ((initTable == true)) { + if ((this.tableInvoice != null)) { + this.tableInvoice.InitVars(); + } + } + this.tableProjectedSales = ((ProjectedSalesDataTable)(base.Tables["ProjectedSales"])); + if ((initTable == true)) { + if ((this.tableProjectedSales != null)) { + this.tableProjectedSales.InitVars(); + } + } + this.tableSupplier = ((SupplierDataTable)(base.Tables["Supplier"])); + if ((initTable == true)) { + if ((this.tableSupplier != null)) { + this.tableSupplier.InitVars(); + } + } + this.tableWeekEndingDate = ((WeekEndingDateDataTable)(base.Tables["WeekEndingDate"])); + if ((initTable == true)) { + if ((this.tableWeekEndingDate != null)) { + this.tableWeekEndingDate.InitVars(); + } + } + this.tableWeeklySales = ((WeeklySalesDataTable)(base.Tables["WeeklySales"])); + if ((initTable == true)) { + if ((this.tableWeeklySales != null)) { + this.tableWeeklySales.InitVars(); + } + } + this.relationAdItemActualSales = this.Relations["AdItemActualSales"]; + this.relationWeekEndingDateActualSales = this.Relations["WeekEndingDateActualSales"]; + this.relationWeekEndingDateComment = this.Relations["WeekEndingDateComment"]; + this.relationSupplierInvoice = this.Relations["SupplierInvoice"]; + this.relationWeekEndingDateInvoice = this.Relations["WeekEndingDateInvoice"]; + this.relationWeekEndingDateWeeklySales = this.Relations["WeekEndingDateWeeklySales"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.DataSetName = "apcDatabase"; + this.Prefix = ""; + this.Namespace = "http://tempuri.org/apcDatabase.xsd"; + this.EnforceConstraints = true; + this.SchemaSerializationMode = global::System.Data.SchemaSerializationMode.IncludeSchema; + this.tableActualSales = new ActualSalesDataTable(); + base.Tables.Add(this.tableActualSales); + this.tableAdItem = new AdItemDataTable(); + base.Tables.Add(this.tableAdItem); + this.tableComment = new CommentDataTable(); + base.Tables.Add(this.tableComment); + this.tableInventory = new InventoryDataTable(); + base.Tables.Add(this.tableInventory); + this.tableInvoice = new InvoiceDataTable(); + base.Tables.Add(this.tableInvoice); + this.tableProjectedSales = new ProjectedSalesDataTable(); + base.Tables.Add(this.tableProjectedSales); + this.tableSupplier = new SupplierDataTable(); + base.Tables.Add(this.tableSupplier); + this.tableWeekEndingDate = new WeekEndingDateDataTable(); + base.Tables.Add(this.tableWeekEndingDate); + this.tableWeeklySales = new WeeklySalesDataTable(); + base.Tables.Add(this.tableWeeklySales); + this.relationAdItemActualSales = new global::System.Data.DataRelation("AdItemActualSales", new global::System.Data.DataColumn[] { + this.tableAdItem.AdItemIDColumn}, new global::System.Data.DataColumn[] { + this.tableActualSales.Fk_DateIDColumn}, false); + this.Relations.Add(this.relationAdItemActualSales); + this.relationWeekEndingDateActualSales = new global::System.Data.DataRelation("WeekEndingDateActualSales", new global::System.Data.DataColumn[] { + this.tableWeekEndingDate.DateIDColumn}, new global::System.Data.DataColumn[] { + this.tableActualSales.Fk_DateIDColumn}, false); + this.Relations.Add(this.relationWeekEndingDateActualSales); + this.relationWeekEndingDateComment = new global::System.Data.DataRelation("WeekEndingDateComment", new global::System.Data.DataColumn[] { + this.tableWeekEndingDate.DateIDColumn}, new global::System.Data.DataColumn[] { + this.tableComment.Fk_DateIDColumn}, false); + this.Relations.Add(this.relationWeekEndingDateComment); + this.relationSupplierInvoice = new global::System.Data.DataRelation("SupplierInvoice", new global::System.Data.DataColumn[] { + this.tableSupplier.SupplierIDColumn}, new global::System.Data.DataColumn[] { + this.tableInvoice.Fk_SupplierIDColumn}, false); + this.Relations.Add(this.relationSupplierInvoice); + this.relationWeekEndingDateInvoice = new global::System.Data.DataRelation("WeekEndingDateInvoice", new global::System.Data.DataColumn[] { + this.tableWeekEndingDate.DateIDColumn}, new global::System.Data.DataColumn[] { + this.tableInvoice.Fk_DateIDColumn}, false); + this.Relations.Add(this.relationWeekEndingDateInvoice); + this.relationWeekEndingDateWeeklySales = new global::System.Data.DataRelation("WeekEndingDateWeeklySales", new global::System.Data.DataColumn[] { + this.tableWeekEndingDate.DateIDColumn}, new global::System.Data.DataColumn[] { + this.tableWeeklySales.Fk_DateIDColumn}, false); + this.Relations.Add(this.relationWeekEndingDateWeeklySales); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeActualSales() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeAdItem() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeComment() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeInventory() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeInvoice() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeProjectedSales() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeSupplier() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeWeekEndingDate() { + return false; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private bool ShouldSerializeWeeklySales() { + 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) { + apcDatabase ds = new apcDatabase(); + 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 ActualSalesRowChangeEventHandler(object sender, ActualSalesRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void AdItemRowChangeEventHandler(object sender, AdItemRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void CommentRowChangeEventHandler(object sender, CommentRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void InventoryRowChangeEventHandler(object sender, InventoryRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void InvoiceRowChangeEventHandler(object sender, InvoiceRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void ProjectedSalesRowChangeEventHandler(object sender, ProjectedSalesRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void SupplierRowChangeEventHandler(object sender, SupplierRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void WeekEndingDateRowChangeEventHandler(object sender, WeekEndingDateRowChangeEvent e); + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public delegate void WeeklySalesRowChangeEventHandler(object sender, WeeklySalesRowChangeEvent e); + + /// + ///Represents the strongly named DataTable class. + /// + [global::System.Serializable()] + [global::System.Xml.Serialization.XmlSchemaProviderAttribute("GetTypedTableSchema")] + public partial class ActualSalesDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnAcID; + + private global::System.Data.DataColumn columnAcSold; + + private global::System.Data.DataColumn columnAcSalePrice; + + private global::System.Data.DataColumn columnAcTotalSales; + + private global::System.Data.DataColumn columnAcCost; + + private global::System.Data.DataColumn columnAcProfitReturn; + + private global::System.Data.DataColumn columnAcTotalProfitReturn; + + private global::System.Data.DataColumn columnFk_DateID; + + private global::System.Data.DataColumn columnFk_AdItemID; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ActualSalesDataTable() { + this.TableName = "ActualSales"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal ActualSalesDataTable(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 ActualSalesDataTable(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 AcIDColumn { + get { + return this.columnAcID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn AcSoldColumn { + get { + return this.columnAcSold; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn AcSalePriceColumn { + get { + return this.columnAcSalePrice; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn AcTotalSalesColumn { + get { + return this.columnAcTotalSales; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn AcCostColumn { + get { + return this.columnAcCost; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn AcProfitReturnColumn { + get { + return this.columnAcProfitReturn; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn AcTotalProfitReturnColumn { + get { + return this.columnAcTotalProfitReturn; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_DateIDColumn { + get { + return this.columnFk_DateID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_AdItemIDColumn { + get { + return this.columnFk_AdItemID; + } + } + + [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 ActualSalesRow this[int index] { + get { + return ((ActualSalesRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ActualSalesRowChangeEventHandler ActualSalesRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ActualSalesRowChangeEventHandler ActualSalesRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ActualSalesRowChangeEventHandler ActualSalesRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ActualSalesRowChangeEventHandler ActualSalesRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddActualSalesRow(ActualSalesRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ActualSalesRow AddActualSalesRow(int AcSold, decimal AcSalePrice, decimal AcTotalSales, decimal AcCost, decimal AcProfitReturn, decimal AcTotalProfitReturn, AdItemRow parentAdItemRowByAdItemActualSales, int Fk_AdItemID) { + ActualSalesRow rowActualSalesRow = ((ActualSalesRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + AcSold, + AcSalePrice, + AcTotalSales, + AcCost, + AcProfitReturn, + AcTotalProfitReturn, + null, + Fk_AdItemID}; + if ((parentAdItemRowByAdItemActualSales != null)) { + columnValuesArray[7] = parentAdItemRowByAdItemActualSales[0]; + } + rowActualSalesRow.ItemArray = columnValuesArray; + this.Rows.Add(rowActualSalesRow); + return rowActualSalesRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ActualSalesRow FindByAcID(int AcID) { + return ((ActualSalesRow)(this.Rows.Find(new object[] { + AcID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + ActualSalesDataTable cln = ((ActualSalesDataTable)(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 ActualSalesDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnAcID = base.Columns["AcID"]; + this.columnAcSold = base.Columns["AcSold"]; + this.columnAcSalePrice = base.Columns["AcSalePrice"]; + this.columnAcTotalSales = base.Columns["AcTotalSales"]; + this.columnAcCost = base.Columns["AcCost"]; + this.columnAcProfitReturn = base.Columns["AcProfitReturn"]; + this.columnAcTotalProfitReturn = base.Columns["AcTotalProfitReturn"]; + this.columnFk_DateID = base.Columns["Fk_DateID"]; + this.columnFk_AdItemID = base.Columns["Fk_AdItemID"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnAcID = new global::System.Data.DataColumn("AcID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAcID); + this.columnAcSold = new global::System.Data.DataColumn("AcSold", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAcSold); + this.columnAcSalePrice = new global::System.Data.DataColumn("AcSalePrice", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAcSalePrice); + this.columnAcTotalSales = new global::System.Data.DataColumn("AcTotalSales", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAcTotalSales); + this.columnAcCost = new global::System.Data.DataColumn("AcCost", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAcCost); + this.columnAcProfitReturn = new global::System.Data.DataColumn("AcProfitReturn", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAcProfitReturn); + this.columnAcTotalProfitReturn = new global::System.Data.DataColumn("AcTotalProfitReturn", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAcTotalProfitReturn); + this.columnFk_DateID = new global::System.Data.DataColumn("Fk_DateID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_DateID); + this.columnFk_AdItemID = new global::System.Data.DataColumn("Fk_AdItemID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_AdItemID); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnAcID}, true)); + this.columnAcID.AutoIncrement = true; + this.columnAcID.AutoIncrementSeed = -1; + this.columnAcID.AutoIncrementStep = -1; + this.columnAcID.AllowDBNull = false; + this.columnAcID.Unique = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ActualSalesRow NewActualSalesRow() { + return ((ActualSalesRow)(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 ActualSalesRow(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(ActualSalesRow); + } + + [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.ActualSalesRowChanged != null)) { + this.ActualSalesRowChanged(this, new ActualSalesRowChangeEvent(((ActualSalesRow)(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.ActualSalesRowChanging != null)) { + this.ActualSalesRowChanging(this, new ActualSalesRowChangeEvent(((ActualSalesRow)(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.ActualSalesRowDeleted != null)) { + this.ActualSalesRowDeleted(this, new ActualSalesRowChangeEvent(((ActualSalesRow)(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.ActualSalesRowDeleting != null)) { + this.ActualSalesRowDeleting(this, new ActualSalesRowChangeEvent(((ActualSalesRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveActualSalesRow(ActualSalesRow 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(); + apcDatabase ds = new apcDatabase(); + 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 = "ActualSalesDataTable"; + 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 AdItemDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnAdItemID; + + private global::System.Data.DataColumn columnAdItem; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public AdItemDataTable() { + this.TableName = "AdItem"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal AdItemDataTable(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 AdItemDataTable(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 AdItemIDColumn { + get { + return this.columnAdItemID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn AdItemColumn { + get { + return this.columnAdItem; + } + } + + [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 AdItemRow this[int index] { + get { + return ((AdItemRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event AdItemRowChangeEventHandler AdItemRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event AdItemRowChangeEventHandler AdItemRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event AdItemRowChangeEventHandler AdItemRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event AdItemRowChangeEventHandler AdItemRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddAdItemRow(AdItemRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public AdItemRow AddAdItemRow(string AdItem) { + AdItemRow rowAdItemRow = ((AdItemRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + AdItem}; + rowAdItemRow.ItemArray = columnValuesArray; + this.Rows.Add(rowAdItemRow); + return rowAdItemRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public AdItemRow FindByAdItemID(int AdItemID) { + return ((AdItemRow)(this.Rows.Find(new object[] { + AdItemID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + AdItemDataTable cln = ((AdItemDataTable)(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 AdItemDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnAdItemID = base.Columns["AdItemID"]; + this.columnAdItem = base.Columns["AdItem"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnAdItemID = new global::System.Data.DataColumn("AdItemID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAdItemID); + this.columnAdItem = new global::System.Data.DataColumn("AdItem", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnAdItem); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnAdItemID}, true)); + this.columnAdItemID.AutoIncrement = true; + this.columnAdItemID.AutoIncrementSeed = -1; + this.columnAdItemID.AutoIncrementStep = -1; + this.columnAdItemID.AllowDBNull = false; + this.columnAdItemID.Unique = true; + this.columnAdItem.MaxLength = 255; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public AdItemRow NewAdItemRow() { + return ((AdItemRow)(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 AdItemRow(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(AdItemRow); + } + + [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.AdItemRowChanged != null)) { + this.AdItemRowChanged(this, new AdItemRowChangeEvent(((AdItemRow)(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.AdItemRowChanging != null)) { + this.AdItemRowChanging(this, new AdItemRowChangeEvent(((AdItemRow)(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.AdItemRowDeleted != null)) { + this.AdItemRowDeleted(this, new AdItemRowChangeEvent(((AdItemRow)(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.AdItemRowDeleting != null)) { + this.AdItemRowDeleting(this, new AdItemRowChangeEvent(((AdItemRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveAdItemRow(AdItemRow 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(); + apcDatabase ds = new apcDatabase(); + 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 = "AdItemDataTable"; + 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 CommentDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnCommnetID; + + private global::System.Data.DataColumn columnComment; + + private global::System.Data.DataColumn columnFk_DateID; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public CommentDataTable() { + this.TableName = "Comment"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal CommentDataTable(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 CommentDataTable(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 CommnetIDColumn { + get { + return this.columnCommnetID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn CommentColumn { + get { + return this.columnComment; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_DateIDColumn { + get { + return this.columnFk_DateID; + } + } + + [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 CommentRow this[int index] { + get { + return ((CommentRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event CommentRowChangeEventHandler CommentRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event CommentRowChangeEventHandler CommentRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event CommentRowChangeEventHandler CommentRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event CommentRowChangeEventHandler CommentRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddCommentRow(CommentRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public CommentRow AddCommentRow(string Comment, WeekEndingDateRow parentWeekEndingDateRowByWeekEndingDateComment) { + CommentRow rowCommentRow = ((CommentRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + Comment, + null}; + if ((parentWeekEndingDateRowByWeekEndingDateComment != null)) { + columnValuesArray[2] = parentWeekEndingDateRowByWeekEndingDateComment[0]; + } + rowCommentRow.ItemArray = columnValuesArray; + this.Rows.Add(rowCommentRow); + return rowCommentRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public CommentRow FindByCommnetID(int CommnetID) { + return ((CommentRow)(this.Rows.Find(new object[] { + CommnetID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + CommentDataTable cln = ((CommentDataTable)(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 CommentDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnCommnetID = base.Columns["CommnetID"]; + this.columnComment = base.Columns["Comment"]; + this.columnFk_DateID = base.Columns["Fk_DateID"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnCommnetID = new global::System.Data.DataColumn("CommnetID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnCommnetID); + this.columnComment = new global::System.Data.DataColumn("Comment", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnComment); + this.columnFk_DateID = new global::System.Data.DataColumn("Fk_DateID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_DateID); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnCommnetID}, true)); + this.columnCommnetID.AutoIncrement = true; + this.columnCommnetID.AutoIncrementSeed = -1; + this.columnCommnetID.AutoIncrementStep = -1; + this.columnCommnetID.AllowDBNull = false; + this.columnCommnetID.Unique = true; + this.columnComment.MaxLength = 536870910; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public CommentRow NewCommentRow() { + return ((CommentRow)(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 CommentRow(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(CommentRow); + } + + [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.CommentRowChanged != null)) { + this.CommentRowChanged(this, new CommentRowChangeEvent(((CommentRow)(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.CommentRowChanging != null)) { + this.CommentRowChanging(this, new CommentRowChangeEvent(((CommentRow)(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.CommentRowDeleted != null)) { + this.CommentRowDeleted(this, new CommentRowChangeEvent(((CommentRow)(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.CommentRowDeleting != null)) { + this.CommentRowDeleting(this, new CommentRowChangeEvent(((CommentRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveCommentRow(CommentRow 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(); + apcDatabase ds = new apcDatabase(); + 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 = "CommentDataTable"; + 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 InventoryDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnInvID; + + private global::System.Data.DataColumn columnInvBeginingInventory; + + private global::System.Data.DataColumn columnInvRecieved; + + private global::System.Data.DataColumn columnInvTotal; + + private global::System.Data.DataColumn columnInvEnding; + + private global::System.Data.DataColumn columnFk_AdItemID; + + private global::System.Data.DataColumn columnFk_DateID; + + private global::System.Data.DataColumn columnInvNote; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InventoryDataTable() { + this.TableName = "Inventory"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal InventoryDataTable(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 InventoryDataTable(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 InvIDColumn { + get { + return this.columnInvID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvBeginingInventoryColumn { + get { + return this.columnInvBeginingInventory; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvRecievedColumn { + get { + return this.columnInvRecieved; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvTotalColumn { + get { + return this.columnInvTotal; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvEndingColumn { + get { + return this.columnInvEnding; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_AdItemIDColumn { + get { + return this.columnFk_AdItemID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_DateIDColumn { + get { + return this.columnFk_DateID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvNoteColumn { + get { + return this.columnInvNote; + } + } + + [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 InventoryRow this[int index] { + get { + return ((InventoryRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event InventoryRowChangeEventHandler InventoryRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event InventoryRowChangeEventHandler InventoryRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event InventoryRowChangeEventHandler InventoryRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event InventoryRowChangeEventHandler InventoryRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddInventoryRow(InventoryRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InventoryRow AddInventoryRow(int InvBeginingInventory, int InvRecieved, int InvTotal, int InvEnding, int Fk_AdItemID, int Fk_DateID, string InvNote) { + InventoryRow rowInventoryRow = ((InventoryRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + InvBeginingInventory, + InvRecieved, + InvTotal, + InvEnding, + Fk_AdItemID, + Fk_DateID, + InvNote}; + rowInventoryRow.ItemArray = columnValuesArray; + this.Rows.Add(rowInventoryRow); + return rowInventoryRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InventoryRow FindByInvID(int InvID) { + return ((InventoryRow)(this.Rows.Find(new object[] { + InvID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + InventoryDataTable cln = ((InventoryDataTable)(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 InventoryDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnInvID = base.Columns["InvID"]; + this.columnInvBeginingInventory = base.Columns["InvBeginingInventory"]; + this.columnInvRecieved = base.Columns["InvRecieved"]; + this.columnInvTotal = base.Columns["InvTotal"]; + this.columnInvEnding = base.Columns["InvEnding"]; + this.columnFk_AdItemID = base.Columns["Fk_AdItemID"]; + this.columnFk_DateID = base.Columns["Fk_DateID"]; + this.columnInvNote = base.Columns["InvNote"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnInvID = new global::System.Data.DataColumn("InvID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvID); + this.columnInvBeginingInventory = new global::System.Data.DataColumn("InvBeginingInventory", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvBeginingInventory); + this.columnInvRecieved = new global::System.Data.DataColumn("InvRecieved", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvRecieved); + this.columnInvTotal = new global::System.Data.DataColumn("InvTotal", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvTotal); + this.columnInvEnding = new global::System.Data.DataColumn("InvEnding", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvEnding); + this.columnFk_AdItemID = new global::System.Data.DataColumn("Fk_AdItemID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_AdItemID); + this.columnFk_DateID = new global::System.Data.DataColumn("Fk_DateID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_DateID); + this.columnInvNote = new global::System.Data.DataColumn("InvNote", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvNote); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnInvID}, true)); + this.columnInvID.AutoIncrement = true; + this.columnInvID.AutoIncrementSeed = -1; + this.columnInvID.AutoIncrementStep = -1; + this.columnInvID.AllowDBNull = false; + this.columnInvID.Unique = true; + this.columnInvNote.MaxLength = 255; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InventoryRow NewInventoryRow() { + return ((InventoryRow)(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 InventoryRow(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(InventoryRow); + } + + [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.InventoryRowChanged != null)) { + this.InventoryRowChanged(this, new InventoryRowChangeEvent(((InventoryRow)(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.InventoryRowChanging != null)) { + this.InventoryRowChanging(this, new InventoryRowChangeEvent(((InventoryRow)(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.InventoryRowDeleted != null)) { + this.InventoryRowDeleted(this, new InventoryRowChangeEvent(((InventoryRow)(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.InventoryRowDeleting != null)) { + this.InventoryRowDeleting(this, new InventoryRowChangeEvent(((InventoryRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveInventoryRow(InventoryRow 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(); + apcDatabase ds = new apcDatabase(); + 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 = "InventoryDataTable"; + 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 InvoiceDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnInvoiceID; + + private global::System.Data.DataColumn columnInvoiceNetAmountAtCost; + + private global::System.Data.DataColumn columnInvoiceAmountOf; + + private global::System.Data.DataColumn columnInvoiceDate; + + private global::System.Data.DataColumn columnFk_DateID; + + private global::System.Data.DataColumn columnFk_SupplierID; + + private global::System.Data.DataColumn columnInvoiceNumber; + + private global::System.Data.DataColumn columnInvoiceNote; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InvoiceDataTable() { + this.TableName = "Invoice"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal InvoiceDataTable(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 InvoiceDataTable(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 InvoiceIDColumn { + get { + return this.columnInvoiceID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvoiceNetAmountAtCostColumn { + get { + return this.columnInvoiceNetAmountAtCost; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvoiceAmountOfColumn { + get { + return this.columnInvoiceAmountOf; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvoiceDateColumn { + get { + return this.columnInvoiceDate; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_DateIDColumn { + get { + return this.columnFk_DateID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_SupplierIDColumn { + get { + return this.columnFk_SupplierID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvoiceNumberColumn { + get { + return this.columnInvoiceNumber; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn InvoiceNoteColumn { + get { + return this.columnInvoiceNote; + } + } + + [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 InvoiceRow this[int index] { + get { + return ((InvoiceRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event InvoiceRowChangeEventHandler InvoiceRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event InvoiceRowChangeEventHandler InvoiceRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event InvoiceRowChangeEventHandler InvoiceRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event InvoiceRowChangeEventHandler InvoiceRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddInvoiceRow(InvoiceRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InvoiceRow AddInvoiceRow(int InvoiceNetAmountAtCost, int InvoiceAmountOf, System.DateTime InvoiceDate, WeekEndingDateRow parentWeekEndingDateRowByWeekEndingDateInvoice, SupplierRow parentSupplierRowBySupplierInvoice, string InvoiceNumber, string InvoiceNote) { + InvoiceRow rowInvoiceRow = ((InvoiceRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + InvoiceNetAmountAtCost, + InvoiceAmountOf, + InvoiceDate, + null, + null, + InvoiceNumber, + InvoiceNote}; + if ((parentWeekEndingDateRowByWeekEndingDateInvoice != null)) { + columnValuesArray[4] = parentWeekEndingDateRowByWeekEndingDateInvoice[0]; + } + if ((parentSupplierRowBySupplierInvoice != null)) { + columnValuesArray[5] = parentSupplierRowBySupplierInvoice[0]; + } + rowInvoiceRow.ItemArray = columnValuesArray; + this.Rows.Add(rowInvoiceRow); + return rowInvoiceRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InvoiceRow FindByInvoiceID(int InvoiceID) { + return ((InvoiceRow)(this.Rows.Find(new object[] { + InvoiceID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + InvoiceDataTable cln = ((InvoiceDataTable)(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 InvoiceDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnInvoiceID = base.Columns["InvoiceID"]; + this.columnInvoiceNetAmountAtCost = base.Columns["InvoiceNetAmountAtCost"]; + this.columnInvoiceAmountOf = base.Columns["InvoiceAmountOf"]; + this.columnInvoiceDate = base.Columns["InvoiceDate"]; + this.columnFk_DateID = base.Columns["Fk_DateID"]; + this.columnFk_SupplierID = base.Columns["Fk_SupplierID"]; + this.columnInvoiceNumber = base.Columns["InvoiceNumber"]; + this.columnInvoiceNote = base.Columns["InvoiceNote"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnInvoiceID = new global::System.Data.DataColumn("InvoiceID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvoiceID); + this.columnInvoiceNetAmountAtCost = new global::System.Data.DataColumn("InvoiceNetAmountAtCost", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvoiceNetAmountAtCost); + this.columnInvoiceAmountOf = new global::System.Data.DataColumn("InvoiceAmountOf", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvoiceAmountOf); + this.columnInvoiceDate = new global::System.Data.DataColumn("InvoiceDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvoiceDate); + this.columnFk_DateID = new global::System.Data.DataColumn("Fk_DateID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_DateID); + this.columnFk_SupplierID = new global::System.Data.DataColumn("Fk_SupplierID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_SupplierID); + this.columnInvoiceNumber = new global::System.Data.DataColumn("InvoiceNumber", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvoiceNumber); + this.columnInvoiceNote = new global::System.Data.DataColumn("InvoiceNote", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnInvoiceNote); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnInvoiceID}, true)); + this.columnInvoiceID.AutoIncrement = true; + this.columnInvoiceID.AutoIncrementSeed = -1; + this.columnInvoiceID.AutoIncrementStep = -1; + this.columnInvoiceID.AllowDBNull = false; + this.columnInvoiceID.Unique = true; + this.columnInvoiceNumber.MaxLength = 255; + this.columnInvoiceNote.MaxLength = 255; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InvoiceRow NewInvoiceRow() { + return ((InvoiceRow)(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 InvoiceRow(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(InvoiceRow); + } + + [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.InvoiceRowChanged != null)) { + this.InvoiceRowChanged(this, new InvoiceRowChangeEvent(((InvoiceRow)(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.InvoiceRowChanging != null)) { + this.InvoiceRowChanging(this, new InvoiceRowChangeEvent(((InvoiceRow)(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.InvoiceRowDeleted != null)) { + this.InvoiceRowDeleted(this, new InvoiceRowChangeEvent(((InvoiceRow)(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.InvoiceRowDeleting != null)) { + this.InvoiceRowDeleting(this, new InvoiceRowChangeEvent(((InvoiceRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveInvoiceRow(InvoiceRow 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(); + apcDatabase ds = new apcDatabase(); + 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 = "InvoiceDataTable"; + 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 ProjectedSalesDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnPrSalesID; + + private global::System.Data.DataColumn columnPrSold; + + private global::System.Data.DataColumn columnPrSalePrice; + + private global::System.Data.DataColumn columnPrProfitReturn; + + private global::System.Data.DataColumn columnPrTotalProfitReturn; + + private global::System.Data.DataColumn columnPrTotalSales; + + private global::System.Data.DataColumn columnFk_DateID; + + private global::System.Data.DataColumn columnFk_AdItemID; + + private global::System.Data.DataColumn columnPrCost; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ProjectedSalesDataTable() { + this.TableName = "ProjectedSales"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal ProjectedSalesDataTable(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 ProjectedSalesDataTable(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 PrSalesIDColumn { + get { + return this.columnPrSalesID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn PrSoldColumn { + get { + return this.columnPrSold; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn PrSalePriceColumn { + get { + return this.columnPrSalePrice; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn PrProfitReturnColumn { + get { + return this.columnPrProfitReturn; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn PrTotalProfitReturnColumn { + get { + return this.columnPrTotalProfitReturn; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn PrTotalSalesColumn { + get { + return this.columnPrTotalSales; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_DateIDColumn { + get { + return this.columnFk_DateID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_AdItemIDColumn { + get { + return this.columnFk_AdItemID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn PrCostColumn { + get { + return this.columnPrCost; + } + } + + [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 ProjectedSalesRow this[int index] { + get { + return ((ProjectedSalesRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ProjectedSalesRowChangeEventHandler ProjectedSalesRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ProjectedSalesRowChangeEventHandler ProjectedSalesRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ProjectedSalesRowChangeEventHandler ProjectedSalesRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event ProjectedSalesRowChangeEventHandler ProjectedSalesRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddProjectedSalesRow(ProjectedSalesRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ProjectedSalesRow AddProjectedSalesRow(int PrSold, decimal PrSalePrice, decimal PrProfitReturn, decimal PrTotalProfitReturn, decimal PrTotalSales, int Fk_DateID, int Fk_AdItemID, decimal PrCost) { + ProjectedSalesRow rowProjectedSalesRow = ((ProjectedSalesRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + PrSold, + PrSalePrice, + PrProfitReturn, + PrTotalProfitReturn, + PrTotalSales, + Fk_DateID, + Fk_AdItemID, + PrCost}; + rowProjectedSalesRow.ItemArray = columnValuesArray; + this.Rows.Add(rowProjectedSalesRow); + return rowProjectedSalesRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ProjectedSalesRow FindByPrSalesID(int PrSalesID) { + return ((ProjectedSalesRow)(this.Rows.Find(new object[] { + PrSalesID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + ProjectedSalesDataTable cln = ((ProjectedSalesDataTable)(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 ProjectedSalesDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnPrSalesID = base.Columns["PrSalesID"]; + this.columnPrSold = base.Columns["PrSold"]; + this.columnPrSalePrice = base.Columns["PrSalePrice"]; + this.columnPrProfitReturn = base.Columns["PrProfitReturn"]; + this.columnPrTotalProfitReturn = base.Columns["PrTotalProfitReturn"]; + this.columnPrTotalSales = base.Columns["PrTotalSales"]; + this.columnFk_DateID = base.Columns["Fk_DateID"]; + this.columnFk_AdItemID = base.Columns["Fk_AdItemID"]; + this.columnPrCost = base.Columns["PrCost"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnPrSalesID = new global::System.Data.DataColumn("PrSalesID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrSalesID); + this.columnPrSold = new global::System.Data.DataColumn("PrSold", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrSold); + this.columnPrSalePrice = new global::System.Data.DataColumn("PrSalePrice", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrSalePrice); + this.columnPrProfitReturn = new global::System.Data.DataColumn("PrProfitReturn", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrProfitReturn); + this.columnPrTotalProfitReturn = new global::System.Data.DataColumn("PrTotalProfitReturn", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrTotalProfitReturn); + this.columnPrTotalSales = new global::System.Data.DataColumn("PrTotalSales", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrTotalSales); + this.columnFk_DateID = new global::System.Data.DataColumn("Fk_DateID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_DateID); + this.columnFk_AdItemID = new global::System.Data.DataColumn("Fk_AdItemID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_AdItemID); + this.columnPrCost = new global::System.Data.DataColumn("PrCost", typeof(decimal), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnPrCost); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnPrSalesID}, true)); + this.columnPrSalesID.AutoIncrement = true; + this.columnPrSalesID.AutoIncrementSeed = -1; + this.columnPrSalesID.AutoIncrementStep = -1; + this.columnPrSalesID.AllowDBNull = false; + this.columnPrSalesID.Unique = true; + this.columnPrSold.Caption = "Sold"; + this.columnPrSalePrice.Caption = "Sales Price"; + this.columnPrProfitReturn.Caption = "Profit Return"; + this.columnPrTotalProfitReturn.Caption = "Total Profit Return"; + this.columnPrTotalSales.Caption = "Total Sales"; + this.columnPrCost.Caption = "Cost"; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ProjectedSalesRow NewProjectedSalesRow() { + return ((ProjectedSalesRow)(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 ProjectedSalesRow(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(ProjectedSalesRow); + } + + [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.ProjectedSalesRowChanged != null)) { + this.ProjectedSalesRowChanged(this, new ProjectedSalesRowChangeEvent(((ProjectedSalesRow)(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.ProjectedSalesRowChanging != null)) { + this.ProjectedSalesRowChanging(this, new ProjectedSalesRowChangeEvent(((ProjectedSalesRow)(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.ProjectedSalesRowDeleted != null)) { + this.ProjectedSalesRowDeleted(this, new ProjectedSalesRowChangeEvent(((ProjectedSalesRow)(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.ProjectedSalesRowDeleting != null)) { + this.ProjectedSalesRowDeleting(this, new ProjectedSalesRowChangeEvent(((ProjectedSalesRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveProjectedSalesRow(ProjectedSalesRow 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(); + apcDatabase ds = new apcDatabase(); + 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 = "ProjectedSalesDataTable"; + 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 SupplierDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnSupplierID; + + private global::System.Data.DataColumn columnSupplierName; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SupplierDataTable() { + this.TableName = "Supplier"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal SupplierDataTable(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 SupplierDataTable(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 SupplierIDColumn { + get { + return this.columnSupplierID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn SupplierNameColumn { + get { + return this.columnSupplierName; + } + } + + [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 SupplierRow this[int index] { + get { + return ((SupplierRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SupplierRowChangeEventHandler SupplierRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SupplierRowChangeEventHandler SupplierRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SupplierRowChangeEventHandler SupplierRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event SupplierRowChangeEventHandler SupplierRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddSupplierRow(SupplierRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SupplierRow AddSupplierRow(string SupplierName) { + SupplierRow rowSupplierRow = ((SupplierRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + SupplierName}; + rowSupplierRow.ItemArray = columnValuesArray; + this.Rows.Add(rowSupplierRow); + return rowSupplierRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SupplierRow FindBySupplierID(int SupplierID) { + return ((SupplierRow)(this.Rows.Find(new object[] { + SupplierID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + SupplierDataTable cln = ((SupplierDataTable)(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 SupplierDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnSupplierID = base.Columns["SupplierID"]; + this.columnSupplierName = base.Columns["SupplierName"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnSupplierID = new global::System.Data.DataColumn("SupplierID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSupplierID); + this.columnSupplierName = new global::System.Data.DataColumn("SupplierName", typeof(string), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSupplierName); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnSupplierID}, true)); + this.columnSupplierID.AutoIncrement = true; + this.columnSupplierID.AutoIncrementSeed = -1; + this.columnSupplierID.AutoIncrementStep = -1; + this.columnSupplierID.AllowDBNull = false; + this.columnSupplierID.Unique = true; + this.columnSupplierName.MaxLength = 255; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SupplierRow NewSupplierRow() { + return ((SupplierRow)(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 SupplierRow(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(SupplierRow); + } + + [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.SupplierRowChanged != null)) { + this.SupplierRowChanged(this, new SupplierRowChangeEvent(((SupplierRow)(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.SupplierRowChanging != null)) { + this.SupplierRowChanging(this, new SupplierRowChangeEvent(((SupplierRow)(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.SupplierRowDeleted != null)) { + this.SupplierRowDeleted(this, new SupplierRowChangeEvent(((SupplierRow)(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.SupplierRowDeleting != null)) { + this.SupplierRowDeleting(this, new SupplierRowChangeEvent(((SupplierRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveSupplierRow(SupplierRow 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(); + apcDatabase ds = new apcDatabase(); + 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 = "SupplierDataTable"; + 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 WeekEndingDateDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnDateID; + + private global::System.Data.DataColumn columnEndOfWeekDate; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeekEndingDateDataTable() { + this.TableName = "WeekEndingDate"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal WeekEndingDateDataTable(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 WeekEndingDateDataTable(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 DateIDColumn { + get { + return this.columnDateID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn EndOfWeekDateColumn { + get { + return this.columnEndOfWeekDate; + } + } + + [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 WeekEndingDateRow this[int index] { + get { + return ((WeekEndingDateRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event WeekEndingDateRowChangeEventHandler WeekEndingDateRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event WeekEndingDateRowChangeEventHandler WeekEndingDateRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event WeekEndingDateRowChangeEventHandler WeekEndingDateRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event WeekEndingDateRowChangeEventHandler WeekEndingDateRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddWeekEndingDateRow(WeekEndingDateRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeekEndingDateRow AddWeekEndingDateRow(System.DateTime EndOfWeekDate) { + WeekEndingDateRow rowWeekEndingDateRow = ((WeekEndingDateRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + EndOfWeekDate}; + rowWeekEndingDateRow.ItemArray = columnValuesArray; + this.Rows.Add(rowWeekEndingDateRow); + return rowWeekEndingDateRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeekEndingDateRow FindByDateID(int DateID) { + return ((WeekEndingDateRow)(this.Rows.Find(new object[] { + DateID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + WeekEndingDateDataTable cln = ((WeekEndingDateDataTable)(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 WeekEndingDateDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnDateID = base.Columns["DateID"]; + this.columnEndOfWeekDate = base.Columns["EndOfWeekDate"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnDateID = new global::System.Data.DataColumn("DateID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnDateID); + this.columnEndOfWeekDate = new global::System.Data.DataColumn("EndOfWeekDate", typeof(global::System.DateTime), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnEndOfWeekDate); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnDateID}, true)); + this.columnDateID.AutoIncrement = true; + this.columnDateID.AutoIncrementSeed = -1; + this.columnDateID.AutoIncrementStep = -1; + this.columnDateID.AllowDBNull = false; + this.columnDateID.Unique = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeekEndingDateRow NewWeekEndingDateRow() { + return ((WeekEndingDateRow)(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 WeekEndingDateRow(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(WeekEndingDateRow); + } + + [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.WeekEndingDateRowChanged != null)) { + this.WeekEndingDateRowChanged(this, new WeekEndingDateRowChangeEvent(((WeekEndingDateRow)(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.WeekEndingDateRowChanging != null)) { + this.WeekEndingDateRowChanging(this, new WeekEndingDateRowChangeEvent(((WeekEndingDateRow)(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.WeekEndingDateRowDeleted != null)) { + this.WeekEndingDateRowDeleted(this, new WeekEndingDateRowChangeEvent(((WeekEndingDateRow)(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.WeekEndingDateRowDeleting != null)) { + this.WeekEndingDateRowDeleting(this, new WeekEndingDateRowChangeEvent(((WeekEndingDateRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveWeekEndingDateRow(WeekEndingDateRow 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(); + apcDatabase ds = new apcDatabase(); + 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 = "WeekEndingDateDataTable"; + 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 WeeklySalesDataTable : global::System.Data.DataTable, global::System.Collections.IEnumerable { + + private global::System.Data.DataColumn columnWeeklyID; + + private global::System.Data.DataColumn columnSunday; + + private global::System.Data.DataColumn columnMonday; + + private global::System.Data.DataColumn columnTuesday; + + private global::System.Data.DataColumn columnWednesday; + + private global::System.Data.DataColumn columnThursday; + + private global::System.Data.DataColumn columnFriday; + + private global::System.Data.DataColumn columnSaturday; + + private global::System.Data.DataColumn columnWeeklyTotalSales; + + private global::System.Data.DataColumn columnFk_DateID; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeeklySalesDataTable() { + this.TableName = "WeeklySales"; + this.BeginInit(); + this.InitClass(); + this.EndInit(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal WeeklySalesDataTable(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 WeeklySalesDataTable(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 WeeklyIDColumn { + get { + return this.columnWeeklyID; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn SundayColumn { + get { + return this.columnSunday; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn MondayColumn { + get { + return this.columnMonday; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn TuesdayColumn { + get { + return this.columnTuesday; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn WednesdayColumn { + get { + return this.columnWednesday; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn ThursdayColumn { + get { + return this.columnThursday; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn FridayColumn { + get { + return this.columnFriday; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn SaturdayColumn { + get { + return this.columnSaturday; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn WeeklyTotalSalesColumn { + get { + return this.columnWeeklyTotalSales; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public global::System.Data.DataColumn Fk_DateIDColumn { + get { + return this.columnFk_DateID; + } + } + + [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 WeeklySalesRow this[int index] { + get { + return ((WeeklySalesRow)(this.Rows[index])); + } + } + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event WeeklySalesRowChangeEventHandler WeeklySalesRowChanging; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event WeeklySalesRowChangeEventHandler WeeklySalesRowChanged; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event WeeklySalesRowChangeEventHandler WeeklySalesRowDeleting; + + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public event WeeklySalesRowChangeEventHandler WeeklySalesRowDeleted; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void AddWeeklySalesRow(WeeklySalesRow row) { + this.Rows.Add(row); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeeklySalesRow AddWeeklySalesRow(int Sunday, int Monday, int Tuesday, int Wednesday, int Thursday, int Friday, int Saturday, int WeeklyTotalSales, WeekEndingDateRow parentWeekEndingDateRowByWeekEndingDateWeeklySales) { + WeeklySalesRow rowWeeklySalesRow = ((WeeklySalesRow)(this.NewRow())); + object[] columnValuesArray = new object[] { + null, + Sunday, + Monday, + Tuesday, + Wednesday, + Thursday, + Friday, + Saturday, + WeeklyTotalSales, + null}; + if ((parentWeekEndingDateRowByWeekEndingDateWeeklySales != null)) { + columnValuesArray[9] = parentWeekEndingDateRowByWeekEndingDateWeeklySales[0]; + } + rowWeeklySalesRow.ItemArray = columnValuesArray; + this.Rows.Add(rowWeeklySalesRow); + return rowWeeklySalesRow; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeeklySalesRow FindByWeeklyID(int WeeklyID) { + return ((WeeklySalesRow)(this.Rows.Find(new object[] { + WeeklyID}))); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public virtual global::System.Collections.IEnumerator GetEnumerator() { + return this.Rows.GetEnumerator(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public override global::System.Data.DataTable Clone() { + WeeklySalesDataTable cln = ((WeeklySalesDataTable)(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 WeeklySalesDataTable(); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal void InitVars() { + this.columnWeeklyID = base.Columns["WeeklyID"]; + this.columnSunday = base.Columns["Sunday"]; + this.columnMonday = base.Columns["Monday"]; + this.columnTuesday = base.Columns["Tuesday"]; + this.columnWednesday = base.Columns["Wednesday"]; + this.columnThursday = base.Columns["Thursday"]; + this.columnFriday = base.Columns["Friday"]; + this.columnSaturday = base.Columns["Saturday"]; + this.columnWeeklyTotalSales = base.Columns["WeeklyTotalSales"]; + this.columnFk_DateID = base.Columns["Fk_DateID"]; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private void InitClass() { + this.columnWeeklyID = new global::System.Data.DataColumn("WeeklyID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnWeeklyID); + this.columnSunday = new global::System.Data.DataColumn("Sunday", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSunday); + this.columnMonday = new global::System.Data.DataColumn("Monday", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnMonday); + this.columnTuesday = new global::System.Data.DataColumn("Tuesday", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnTuesday); + this.columnWednesday = new global::System.Data.DataColumn("Wednesday", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnWednesday); + this.columnThursday = new global::System.Data.DataColumn("Thursday", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnThursday); + this.columnFriday = new global::System.Data.DataColumn("Friday", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFriday); + this.columnSaturday = new global::System.Data.DataColumn("Saturday", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnSaturday); + this.columnWeeklyTotalSales = new global::System.Data.DataColumn("WeeklyTotalSales", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnWeeklyTotalSales); + this.columnFk_DateID = new global::System.Data.DataColumn("Fk_DateID", typeof(int), null, global::System.Data.MappingType.Element); + base.Columns.Add(this.columnFk_DateID); + this.Constraints.Add(new global::System.Data.UniqueConstraint("Constraint1", new global::System.Data.DataColumn[] { + this.columnWeeklyID}, true)); + this.columnWeeklyID.AutoIncrement = true; + this.columnWeeklyID.AutoIncrementSeed = -1; + this.columnWeeklyID.AutoIncrementStep = -1; + this.columnWeeklyID.AllowDBNull = false; + this.columnWeeklyID.Unique = true; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeeklySalesRow NewWeeklySalesRow() { + return ((WeeklySalesRow)(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 WeeklySalesRow(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(WeeklySalesRow); + } + + [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.WeeklySalesRowChanged != null)) { + this.WeeklySalesRowChanged(this, new WeeklySalesRowChangeEvent(((WeeklySalesRow)(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.WeeklySalesRowChanging != null)) { + this.WeeklySalesRowChanging(this, new WeeklySalesRowChangeEvent(((WeeklySalesRow)(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.WeeklySalesRowDeleted != null)) { + this.WeeklySalesRowDeleted(this, new WeeklySalesRowChangeEvent(((WeeklySalesRow)(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.WeeklySalesRowDeleting != null)) { + this.WeeklySalesRowDeleting(this, new WeeklySalesRowChangeEvent(((WeeklySalesRow)(e.Row)), e.Action)); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void RemoveWeeklySalesRow(WeeklySalesRow 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(); + apcDatabase ds = new apcDatabase(); + 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 = "WeeklySalesDataTable"; + 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 ActualSalesRow : global::System.Data.DataRow { + + private ActualSalesDataTable tableActualSales; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal ActualSalesRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableActualSales = ((ActualSalesDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int AcID { + get { + return ((int)(this[this.tableActualSales.AcIDColumn])); + } + set { + this[this.tableActualSales.AcIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int AcSold { + get { + try { + return ((int)(this[this.tableActualSales.AcSoldColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'AcSold\' in table \'ActualSales\' is DBNull.", e); + } + } + set { + this[this.tableActualSales.AcSoldColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal AcSalePrice { + get { + try { + return ((decimal)(this[this.tableActualSales.AcSalePriceColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'AcSalePrice\' in table \'ActualSales\' is DBNull.", e); + } + } + set { + this[this.tableActualSales.AcSalePriceColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal AcTotalSales { + get { + try { + return ((decimal)(this[this.tableActualSales.AcTotalSalesColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'AcTotalSales\' in table \'ActualSales\' is DBNull.", e); + } + } + set { + this[this.tableActualSales.AcTotalSalesColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal AcCost { + get { + try { + return ((decimal)(this[this.tableActualSales.AcCostColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'AcCost\' in table \'ActualSales\' is DBNull.", e); + } + } + set { + this[this.tableActualSales.AcCostColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal AcProfitReturn { + get { + try { + return ((decimal)(this[this.tableActualSales.AcProfitReturnColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'AcProfitReturn\' in table \'ActualSales\' is DBNull.", e); + } + } + set { + this[this.tableActualSales.AcProfitReturnColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal AcTotalProfitReturn { + get { + try { + return ((decimal)(this[this.tableActualSales.AcTotalProfitReturnColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'AcTotalProfitReturn\' in table \'ActualSales\' is DBNull.", e); + } + } + set { + this[this.tableActualSales.AcTotalProfitReturnColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_DateID { + get { + try { + return ((int)(this[this.tableActualSales.Fk_DateIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_DateID\' in table \'ActualSales\' is DBNull.", e); + } + } + set { + this[this.tableActualSales.Fk_DateIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_AdItemID { + get { + try { + return ((int)(this[this.tableActualSales.Fk_AdItemIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_AdItemID\' in table \'ActualSales\' is DBNull.", e); + } + } + set { + this[this.tableActualSales.Fk_AdItemIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public AdItemRow AdItemRow { + get { + return ((AdItemRow)(this.GetParentRow(this.Table.ParentRelations["AdItemActualSales"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["AdItemActualSales"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeekEndingDateRow WeekEndingDateRow { + get { + return ((WeekEndingDateRow)(this.GetParentRow(this.Table.ParentRelations["WeekEndingDateActualSales"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["WeekEndingDateActualSales"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsAcSoldNull() { + return this.IsNull(this.tableActualSales.AcSoldColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetAcSoldNull() { + this[this.tableActualSales.AcSoldColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsAcSalePriceNull() { + return this.IsNull(this.tableActualSales.AcSalePriceColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetAcSalePriceNull() { + this[this.tableActualSales.AcSalePriceColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsAcTotalSalesNull() { + return this.IsNull(this.tableActualSales.AcTotalSalesColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetAcTotalSalesNull() { + this[this.tableActualSales.AcTotalSalesColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsAcCostNull() { + return this.IsNull(this.tableActualSales.AcCostColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetAcCostNull() { + this[this.tableActualSales.AcCostColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsAcProfitReturnNull() { + return this.IsNull(this.tableActualSales.AcProfitReturnColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetAcProfitReturnNull() { + this[this.tableActualSales.AcProfitReturnColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsAcTotalProfitReturnNull() { + return this.IsNull(this.tableActualSales.AcTotalProfitReturnColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetAcTotalProfitReturnNull() { + this[this.tableActualSales.AcTotalProfitReturnColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_DateIDNull() { + return this.IsNull(this.tableActualSales.Fk_DateIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_DateIDNull() { + this[this.tableActualSales.Fk_DateIDColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_AdItemIDNull() { + return this.IsNull(this.tableActualSales.Fk_AdItemIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_AdItemIDNull() { + this[this.tableActualSales.Fk_AdItemIDColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class AdItemRow : global::System.Data.DataRow { + + private AdItemDataTable tableAdItem; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal AdItemRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableAdItem = ((AdItemDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int AdItemID { + get { + return ((int)(this[this.tableAdItem.AdItemIDColumn])); + } + set { + this[this.tableAdItem.AdItemIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string AdItem { + get { + try { + return ((string)(this[this.tableAdItem.AdItemColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'AdItem\' in table \'AdItem\' is DBNull.", e); + } + } + set { + this[this.tableAdItem.AdItemColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsAdItemNull() { + return this.IsNull(this.tableAdItem.AdItemColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetAdItemNull() { + this[this.tableAdItem.AdItemColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ActualSalesRow[] GetActualSalesRows() { + if ((this.Table.ChildRelations["AdItemActualSales"] == null)) { + return new ActualSalesRow[0]; + } + else { + return ((ActualSalesRow[])(base.GetChildRows(this.Table.ChildRelations["AdItemActualSales"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class CommentRow : global::System.Data.DataRow { + + private CommentDataTable tableComment; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal CommentRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableComment = ((CommentDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int CommnetID { + get { + return ((int)(this[this.tableComment.CommnetIDColumn])); + } + set { + this[this.tableComment.CommnetIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string Comment { + get { + try { + return ((string)(this[this.tableComment.CommentColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Comment\' in table \'Comment\' is DBNull.", e); + } + } + set { + this[this.tableComment.CommentColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_DateID { + get { + try { + return ((int)(this[this.tableComment.Fk_DateIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_DateID\' in table \'Comment\' is DBNull.", e); + } + } + set { + this[this.tableComment.Fk_DateIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeekEndingDateRow WeekEndingDateRow { + get { + return ((WeekEndingDateRow)(this.GetParentRow(this.Table.ParentRelations["WeekEndingDateComment"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["WeekEndingDateComment"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsCommentNull() { + return this.IsNull(this.tableComment.CommentColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetCommentNull() { + this[this.tableComment.CommentColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_DateIDNull() { + return this.IsNull(this.tableComment.Fk_DateIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_DateIDNull() { + this[this.tableComment.Fk_DateIDColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class InventoryRow : global::System.Data.DataRow { + + private InventoryDataTable tableInventory; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal InventoryRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableInventory = ((InventoryDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int InvID { + get { + return ((int)(this[this.tableInventory.InvIDColumn])); + } + set { + this[this.tableInventory.InvIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int InvBeginingInventory { + get { + try { + return ((int)(this[this.tableInventory.InvBeginingInventoryColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvBeginingInventory\' in table \'Inventory\' is DBNull.", e); + } + } + set { + this[this.tableInventory.InvBeginingInventoryColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int InvRecieved { + get { + try { + return ((int)(this[this.tableInventory.InvRecievedColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvRecieved\' in table \'Inventory\' is DBNull.", e); + } + } + set { + this[this.tableInventory.InvRecievedColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int InvTotal { + get { + try { + return ((int)(this[this.tableInventory.InvTotalColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvTotal\' in table \'Inventory\' is DBNull.", e); + } + } + set { + this[this.tableInventory.InvTotalColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int InvEnding { + get { + try { + return ((int)(this[this.tableInventory.InvEndingColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvEnding\' in table \'Inventory\' is DBNull.", e); + } + } + set { + this[this.tableInventory.InvEndingColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_AdItemID { + get { + try { + return ((int)(this[this.tableInventory.Fk_AdItemIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_AdItemID\' in table \'Inventory\' is DBNull.", e); + } + } + set { + this[this.tableInventory.Fk_AdItemIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_DateID { + get { + try { + return ((int)(this[this.tableInventory.Fk_DateIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_DateID\' in table \'Inventory\' is DBNull.", e); + } + } + set { + this[this.tableInventory.Fk_DateIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string InvNote { + get { + try { + return ((string)(this[this.tableInventory.InvNoteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvNote\' in table \'Inventory\' is DBNull.", e); + } + } + set { + this[this.tableInventory.InvNoteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvBeginingInventoryNull() { + return this.IsNull(this.tableInventory.InvBeginingInventoryColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvBeginingInventoryNull() { + this[this.tableInventory.InvBeginingInventoryColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvRecievedNull() { + return this.IsNull(this.tableInventory.InvRecievedColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvRecievedNull() { + this[this.tableInventory.InvRecievedColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvTotalNull() { + return this.IsNull(this.tableInventory.InvTotalColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvTotalNull() { + this[this.tableInventory.InvTotalColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvEndingNull() { + return this.IsNull(this.tableInventory.InvEndingColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvEndingNull() { + this[this.tableInventory.InvEndingColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_AdItemIDNull() { + return this.IsNull(this.tableInventory.Fk_AdItemIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_AdItemIDNull() { + this[this.tableInventory.Fk_AdItemIDColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_DateIDNull() { + return this.IsNull(this.tableInventory.Fk_DateIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_DateIDNull() { + this[this.tableInventory.Fk_DateIDColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvNoteNull() { + return this.IsNull(this.tableInventory.InvNoteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvNoteNull() { + this[this.tableInventory.InvNoteColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class InvoiceRow : global::System.Data.DataRow { + + private InvoiceDataTable tableInvoice; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal InvoiceRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableInvoice = ((InvoiceDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int InvoiceID { + get { + return ((int)(this[this.tableInvoice.InvoiceIDColumn])); + } + set { + this[this.tableInvoice.InvoiceIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int InvoiceNetAmountAtCost { + get { + try { + return ((int)(this[this.tableInvoice.InvoiceNetAmountAtCostColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvoiceNetAmountAtCost\' in table \'Invoice\' is DBNull.", e); + } + } + set { + this[this.tableInvoice.InvoiceNetAmountAtCostColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int InvoiceAmountOf { + get { + try { + return ((int)(this[this.tableInvoice.InvoiceAmountOfColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvoiceAmountOf\' in table \'Invoice\' is DBNull.", e); + } + } + set { + this[this.tableInvoice.InvoiceAmountOfColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public System.DateTime InvoiceDate { + get { + try { + return ((global::System.DateTime)(this[this.tableInvoice.InvoiceDateColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvoiceDate\' in table \'Invoice\' is DBNull.", e); + } + } + set { + this[this.tableInvoice.InvoiceDateColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_DateID { + get { + try { + return ((int)(this[this.tableInvoice.Fk_DateIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_DateID\' in table \'Invoice\' is DBNull.", e); + } + } + set { + this[this.tableInvoice.Fk_DateIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_SupplierID { + get { + try { + return ((int)(this[this.tableInvoice.Fk_SupplierIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_SupplierID\' in table \'Invoice\' is DBNull.", e); + } + } + set { + this[this.tableInvoice.Fk_SupplierIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string InvoiceNumber { + get { + try { + return ((string)(this[this.tableInvoice.InvoiceNumberColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvoiceNumber\' in table \'Invoice\' is DBNull.", e); + } + } + set { + this[this.tableInvoice.InvoiceNumberColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string InvoiceNote { + get { + try { + return ((string)(this[this.tableInvoice.InvoiceNoteColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'InvoiceNote\' in table \'Invoice\' is DBNull.", e); + } + } + set { + this[this.tableInvoice.InvoiceNoteColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SupplierRow SupplierRow { + get { + return ((SupplierRow)(this.GetParentRow(this.Table.ParentRelations["SupplierInvoice"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["SupplierInvoice"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeekEndingDateRow WeekEndingDateRow { + get { + return ((WeekEndingDateRow)(this.GetParentRow(this.Table.ParentRelations["WeekEndingDateInvoice"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["WeekEndingDateInvoice"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvoiceNetAmountAtCostNull() { + return this.IsNull(this.tableInvoice.InvoiceNetAmountAtCostColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvoiceNetAmountAtCostNull() { + this[this.tableInvoice.InvoiceNetAmountAtCostColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvoiceAmountOfNull() { + return this.IsNull(this.tableInvoice.InvoiceAmountOfColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvoiceAmountOfNull() { + this[this.tableInvoice.InvoiceAmountOfColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvoiceDateNull() { + return this.IsNull(this.tableInvoice.InvoiceDateColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvoiceDateNull() { + this[this.tableInvoice.InvoiceDateColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_DateIDNull() { + return this.IsNull(this.tableInvoice.Fk_DateIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_DateIDNull() { + this[this.tableInvoice.Fk_DateIDColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_SupplierIDNull() { + return this.IsNull(this.tableInvoice.Fk_SupplierIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_SupplierIDNull() { + this[this.tableInvoice.Fk_SupplierIDColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvoiceNumberNull() { + return this.IsNull(this.tableInvoice.InvoiceNumberColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvoiceNumberNull() { + this[this.tableInvoice.InvoiceNumberColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsInvoiceNoteNull() { + return this.IsNull(this.tableInvoice.InvoiceNoteColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetInvoiceNoteNull() { + this[this.tableInvoice.InvoiceNoteColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class ProjectedSalesRow : global::System.Data.DataRow { + + private ProjectedSalesDataTable tableProjectedSales; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal ProjectedSalesRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableProjectedSales = ((ProjectedSalesDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int PrSalesID { + get { + return ((int)(this[this.tableProjectedSales.PrSalesIDColumn])); + } + set { + this[this.tableProjectedSales.PrSalesIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int PrSold { + get { + try { + return ((int)(this[this.tableProjectedSales.PrSoldColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrSold\' in table \'ProjectedSales\' is DBNull.", e); + } + } + set { + this[this.tableProjectedSales.PrSoldColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal PrSalePrice { + get { + try { + return ((decimal)(this[this.tableProjectedSales.PrSalePriceColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrSalePrice\' in table \'ProjectedSales\' is DBNull.", e); + } + } + set { + this[this.tableProjectedSales.PrSalePriceColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal PrProfitReturn { + get { + try { + return ((decimal)(this[this.tableProjectedSales.PrProfitReturnColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrProfitReturn\' in table \'ProjectedSales\' is DBNull.", e); + } + } + set { + this[this.tableProjectedSales.PrProfitReturnColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal PrTotalProfitReturn { + get { + try { + return ((decimal)(this[this.tableProjectedSales.PrTotalProfitReturnColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrTotalProfitReturn\' in table \'ProjectedSales\' is DBNull.", e); + } + } + set { + this[this.tableProjectedSales.PrTotalProfitReturnColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal PrTotalSales { + get { + try { + return ((decimal)(this[this.tableProjectedSales.PrTotalSalesColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrTotalSales\' in table \'ProjectedSales\' is DBNull.", e); + } + } + set { + this[this.tableProjectedSales.PrTotalSalesColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_DateID { + get { + try { + return ((int)(this[this.tableProjectedSales.Fk_DateIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_DateID\' in table \'ProjectedSales\' is DBNull.", e); + } + } + set { + this[this.tableProjectedSales.Fk_DateIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_AdItemID { + get { + try { + return ((int)(this[this.tableProjectedSales.Fk_AdItemIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_AdItemID\' in table \'ProjectedSales\' is DBNull.", e); + } + } + set { + this[this.tableProjectedSales.Fk_AdItemIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public decimal PrCost { + get { + try { + return ((decimal)(this[this.tableProjectedSales.PrCostColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'PrCost\' in table \'ProjectedSales\' is DBNull.", e); + } + } + set { + this[this.tableProjectedSales.PrCostColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsPrSoldNull() { + return this.IsNull(this.tableProjectedSales.PrSoldColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetPrSoldNull() { + this[this.tableProjectedSales.PrSoldColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsPrSalePriceNull() { + return this.IsNull(this.tableProjectedSales.PrSalePriceColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetPrSalePriceNull() { + this[this.tableProjectedSales.PrSalePriceColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsPrProfitReturnNull() { + return this.IsNull(this.tableProjectedSales.PrProfitReturnColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetPrProfitReturnNull() { + this[this.tableProjectedSales.PrProfitReturnColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsPrTotalProfitReturnNull() { + return this.IsNull(this.tableProjectedSales.PrTotalProfitReturnColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetPrTotalProfitReturnNull() { + this[this.tableProjectedSales.PrTotalProfitReturnColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsPrTotalSalesNull() { + return this.IsNull(this.tableProjectedSales.PrTotalSalesColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetPrTotalSalesNull() { + this[this.tableProjectedSales.PrTotalSalesColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_DateIDNull() { + return this.IsNull(this.tableProjectedSales.Fk_DateIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_DateIDNull() { + this[this.tableProjectedSales.Fk_DateIDColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_AdItemIDNull() { + return this.IsNull(this.tableProjectedSales.Fk_AdItemIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_AdItemIDNull() { + this[this.tableProjectedSales.Fk_AdItemIDColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsPrCostNull() { + return this.IsNull(this.tableProjectedSales.PrCostColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetPrCostNull() { + this[this.tableProjectedSales.PrCostColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class SupplierRow : global::System.Data.DataRow { + + private SupplierDataTable tableSupplier; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal SupplierRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableSupplier = ((SupplierDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int SupplierID { + get { + return ((int)(this[this.tableSupplier.SupplierIDColumn])); + } + set { + this[this.tableSupplier.SupplierIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public string SupplierName { + get { + try { + return ((string)(this[this.tableSupplier.SupplierNameColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'SupplierName\' in table \'Supplier\' is DBNull.", e); + } + } + set { + this[this.tableSupplier.SupplierNameColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsSupplierNameNull() { + return this.IsNull(this.tableSupplier.SupplierNameColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetSupplierNameNull() { + this[this.tableSupplier.SupplierNameColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InvoiceRow[] GetInvoiceRows() { + if ((this.Table.ChildRelations["SupplierInvoice"] == null)) { + return new InvoiceRow[0]; + } + else { + return ((InvoiceRow[])(base.GetChildRows(this.Table.ChildRelations["SupplierInvoice"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class WeekEndingDateRow : global::System.Data.DataRow { + + private WeekEndingDateDataTable tableWeekEndingDate; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal WeekEndingDateRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableWeekEndingDate = ((WeekEndingDateDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int DateID { + get { + return ((int)(this[this.tableWeekEndingDate.DateIDColumn])); + } + set { + this[this.tableWeekEndingDate.DateIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public System.DateTime EndOfWeekDate { + get { + try { + return ((global::System.DateTime)(this[this.tableWeekEndingDate.EndOfWeekDateColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'EndOfWeekDate\' in table \'WeekEndingDate\' is DBNull.", e); + } + } + set { + this[this.tableWeekEndingDate.EndOfWeekDateColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsEndOfWeekDateNull() { + return this.IsNull(this.tableWeekEndingDate.EndOfWeekDateColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetEndOfWeekDateNull() { + this[this.tableWeekEndingDate.EndOfWeekDateColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ActualSalesRow[] GetActualSalesRows() { + if ((this.Table.ChildRelations["WeekEndingDateActualSales"] == null)) { + return new ActualSalesRow[0]; + } + else { + return ((ActualSalesRow[])(base.GetChildRows(this.Table.ChildRelations["WeekEndingDateActualSales"]))); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public CommentRow[] GetCommentRows() { + if ((this.Table.ChildRelations["WeekEndingDateComment"] == null)) { + return new CommentRow[0]; + } + else { + return ((CommentRow[])(base.GetChildRows(this.Table.ChildRelations["WeekEndingDateComment"]))); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InvoiceRow[] GetInvoiceRows() { + if ((this.Table.ChildRelations["WeekEndingDateInvoice"] == null)) { + return new InvoiceRow[0]; + } + else { + return ((InvoiceRow[])(base.GetChildRows(this.Table.ChildRelations["WeekEndingDateInvoice"]))); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeeklySalesRow[] GetWeeklySalesRows() { + if ((this.Table.ChildRelations["WeekEndingDateWeeklySales"] == null)) { + return new WeeklySalesRow[0]; + } + else { + return ((WeeklySalesRow[])(base.GetChildRows(this.Table.ChildRelations["WeekEndingDateWeeklySales"]))); + } + } + } + + /// + ///Represents strongly named DataRow class. + /// + public partial class WeeklySalesRow : global::System.Data.DataRow { + + private WeeklySalesDataTable tableWeeklySales; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal WeeklySalesRow(global::System.Data.DataRowBuilder rb) : + base(rb) { + this.tableWeeklySales = ((WeeklySalesDataTable)(this.Table)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int WeeklyID { + get { + return ((int)(this[this.tableWeeklySales.WeeklyIDColumn])); + } + set { + this[this.tableWeeklySales.WeeklyIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Sunday { + get { + try { + return ((int)(this[this.tableWeeklySales.SundayColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Sunday\' in table \'WeeklySales\' is DBNull.", e); + } + } + set { + this[this.tableWeeklySales.SundayColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Monday { + get { + try { + return ((int)(this[this.tableWeeklySales.MondayColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Monday\' in table \'WeeklySales\' is DBNull.", e); + } + } + set { + this[this.tableWeeklySales.MondayColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Tuesday { + get { + try { + return ((int)(this[this.tableWeeklySales.TuesdayColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Tuesday\' in table \'WeeklySales\' is DBNull.", e); + } + } + set { + this[this.tableWeeklySales.TuesdayColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Wednesday { + get { + try { + return ((int)(this[this.tableWeeklySales.WednesdayColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Wednesday\' in table \'WeeklySales\' is DBNull.", e); + } + } + set { + this[this.tableWeeklySales.WednesdayColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Thursday { + get { + try { + return ((int)(this[this.tableWeeklySales.ThursdayColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Thursday\' in table \'WeeklySales\' is DBNull.", e); + } + } + set { + this[this.tableWeeklySales.ThursdayColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Friday { + get { + try { + return ((int)(this[this.tableWeeklySales.FridayColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Friday\' in table \'WeeklySales\' is DBNull.", e); + } + } + set { + this[this.tableWeeklySales.FridayColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Saturday { + get { + try { + return ((int)(this[this.tableWeeklySales.SaturdayColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Saturday\' in table \'WeeklySales\' is DBNull.", e); + } + } + set { + this[this.tableWeeklySales.SaturdayColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int WeeklyTotalSales { + get { + try { + return ((int)(this[this.tableWeeklySales.WeeklyTotalSalesColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'WeeklyTotalSales\' in table \'WeeklySales\' is DBNull.", e); + } + } + set { + this[this.tableWeeklySales.WeeklyTotalSalesColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Fk_DateID { + get { + try { + return ((int)(this[this.tableWeeklySales.Fk_DateIDColumn])); + } + catch (global::System.InvalidCastException e) { + throw new global::System.Data.StrongTypingException("The value for column \'Fk_DateID\' in table \'WeeklySales\' is DBNull.", e); + } + } + set { + this[this.tableWeeklySales.Fk_DateIDColumn] = value; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeekEndingDateRow WeekEndingDateRow { + get { + return ((WeekEndingDateRow)(this.GetParentRow(this.Table.ParentRelations["WeekEndingDateWeeklySales"]))); + } + set { + this.SetParentRow(value, this.Table.ParentRelations["WeekEndingDateWeeklySales"]); + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsSundayNull() { + return this.IsNull(this.tableWeeklySales.SundayColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetSundayNull() { + this[this.tableWeeklySales.SundayColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsMondayNull() { + return this.IsNull(this.tableWeeklySales.MondayColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetMondayNull() { + this[this.tableWeeklySales.MondayColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsTuesdayNull() { + return this.IsNull(this.tableWeeklySales.TuesdayColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetTuesdayNull() { + this[this.tableWeeklySales.TuesdayColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsWednesdayNull() { + return this.IsNull(this.tableWeeklySales.WednesdayColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetWednesdayNull() { + this[this.tableWeeklySales.WednesdayColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsThursdayNull() { + return this.IsNull(this.tableWeeklySales.ThursdayColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetThursdayNull() { + this[this.tableWeeklySales.ThursdayColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFridayNull() { + return this.IsNull(this.tableWeeklySales.FridayColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFridayNull() { + this[this.tableWeeklySales.FridayColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsSaturdayNull() { + return this.IsNull(this.tableWeeklySales.SaturdayColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetSaturdayNull() { + this[this.tableWeeklySales.SaturdayColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsWeeklyTotalSalesNull() { + return this.IsNull(this.tableWeeklySales.WeeklyTotalSalesColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetWeeklyTotalSalesNull() { + this[this.tableWeeklySales.WeeklyTotalSalesColumn] = global::System.Convert.DBNull; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public bool IsFk_DateIDNull() { + return this.IsNull(this.tableWeeklySales.Fk_DateIDColumn); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public void SetFk_DateIDNull() { + this[this.tableWeeklySales.Fk_DateIDColumn] = global::System.Convert.DBNull; + } + } + + /// + ///Row event argument class + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public class ActualSalesRowChangeEvent : global::System.EventArgs { + + private ActualSalesRow 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 ActualSalesRowChangeEvent(ActualSalesRow 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 ActualSalesRow 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 AdItemRowChangeEvent : global::System.EventArgs { + + private AdItemRow 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 AdItemRowChangeEvent(AdItemRow 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 AdItemRow 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 CommentRowChangeEvent : global::System.EventArgs { + + private CommentRow 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 CommentRowChangeEvent(CommentRow 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 CommentRow 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 InventoryRowChangeEvent : global::System.EventArgs { + + private InventoryRow 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 InventoryRowChangeEvent(InventoryRow 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 InventoryRow 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 InvoiceRowChangeEvent : global::System.EventArgs { + + private InvoiceRow 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 InvoiceRowChangeEvent(InvoiceRow 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 InvoiceRow 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 ProjectedSalesRowChangeEvent : global::System.EventArgs { + + private ProjectedSalesRow 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 ProjectedSalesRowChangeEvent(ProjectedSalesRow 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 ProjectedSalesRow 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 SupplierRowChangeEvent : global::System.EventArgs { + + private SupplierRow 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 SupplierRowChangeEvent(SupplierRow 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 SupplierRow 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 WeekEndingDateRowChangeEvent : global::System.EventArgs { + + private WeekEndingDateRow 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 WeekEndingDateRowChangeEvent(WeekEndingDateRow 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 WeekEndingDateRow 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 WeeklySalesRowChangeEvent : global::System.EventArgs { + + private WeeklySalesRow 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 WeeklySalesRowChangeEvent(WeeklySalesRow 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 WeeklySalesRow 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 AdvertsingProfitControl.apcDatabaseTableAdapters { + + + /// + ///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 ActualSalesTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.OleDb.OleDbDataAdapter _adapter; + + private global::System.Data.OleDb.OleDbConnection _connection; + + private global::System.Data.OleDb.OleDbTransaction _transaction; + + private global::System.Data.OleDb.OleDbCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ActualSalesTableAdapter() { + 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.OleDb.OleDbDataAdapter 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.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(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.OleDb.OleDbTransaction 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.OleDb.OleDbCommand[] 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.OleDb.OleDbDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "ActualSales"; + tableMapping.ColumnMappings.Add("AcID", "AcID"); + tableMapping.ColumnMappings.Add("AcSold", "AcSold"); + tableMapping.ColumnMappings.Add("AcSalePrice", "AcSalePrice"); + tableMapping.ColumnMappings.Add("AcTotalSales", "AcTotalSales"); + tableMapping.ColumnMappings.Add("AcCost", "AcCost"); + tableMapping.ColumnMappings.Add("AcProfitReturn", "AcProfitReturn"); + tableMapping.ColumnMappings.Add("AcTotalProfitReturn", "AcTotalProfitReturn"); + tableMapping.ColumnMappings.Add("Fk_DateID", "Fk_DateID"); + tableMapping.ColumnMappings.Add("Fk_AdItemID", "Fk_AdItemID"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM `ActualSales` WHERE ((`AcID` = ?) AND ((? = 1 AND `AcSold` IS NULL) OR (`AcSold` = ?)) AND ((? = 1 AND `AcSalePrice` IS NULL) OR (`AcSalePrice` = ?)) AND ((? = 1 AND `AcTotalSales` IS NULL) OR (`AcTotalSales` = ?)) AND ((? = 1 AND `AcCost` IS NULL) OR (`AcCost` = ?)) AND ((? = 1 AND `AcProfitReturn` IS NULL) OR (`AcProfitReturn` = ?)) AND ((? = 1 AND `AcTotalProfitReturn` IS NULL) OR (`AcTotalProfitReturn` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSold", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSold", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcSalePrice", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSalePrice", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcSalePrice", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSalePrice", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalSales", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcTotalSales", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalSales", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcCost", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcCost", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcCost", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcCost", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcProfitReturn", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcProfitReturn", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcProfitReturn", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcTotalProfitReturn", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalProfitReturn", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcTotalProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalProfitReturn", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.InsertCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO `ActualSales` (`AcSold`, `AcSalePrice`, `AcTotalSales`, `AcCost`, `Ac" + + "ProfitReturn`, `AcTotalProfitReturn`, `Fk_DateID`, `Fk_AdItemID`) VALUES (?, ?, " + + "?, ?, ?, ?, ?, ?)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSold", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcSalePrice", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSalePrice", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcTotalSales", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalSales", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcCost", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcCost", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcProfitReturn", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcTotalProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalProfitReturn", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE `ActualSales` SET `AcSold` = ?, `AcSalePrice` = ?, `AcTotalSales` = ?, `AcCost` = ?, `AcProfitReturn` = ?, `AcTotalProfitReturn` = ?, `Fk_DateID` = ?, `Fk_AdItemID` = ? WHERE ((`AcID` = ?) AND ((? = 1 AND `AcSold` IS NULL) OR (`AcSold` = ?)) AND ((? = 1 AND `AcSalePrice` IS NULL) OR (`AcSalePrice` = ?)) AND ((? = 1 AND `AcTotalSales` IS NULL) OR (`AcTotalSales` = ?)) AND ((? = 1 AND `AcCost` IS NULL) OR (`AcCost` = ?)) AND ((? = 1 AND `AcProfitReturn` IS NULL) OR (`AcProfitReturn` = ?)) AND ((? = 1 AND `AcTotalProfitReturn` IS NULL) OR (`AcTotalProfitReturn` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?)))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSold", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcSalePrice", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSalePrice", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcTotalSales", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalSales", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcCost", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcCost", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcProfitReturn", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AcTotalProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalProfitReturn", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSold", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSold", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcSalePrice", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSalePrice", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcSalePrice", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcSalePrice", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalSales", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcTotalSales", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalSales", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcCost", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcCost", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcCost", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcCost", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcProfitReturn", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcProfitReturn", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcProfitReturn", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AcTotalProfitReturn", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalProfitReturn", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AcTotalProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AcTotalProfitReturn", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", 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.OleDb.OleDbConnection(); + this._connection.ConnectionString = global::AdvertsingProfitControl.Properties.Settings.Default.apc___CopyConnectionString2; + } + + [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.OleDb.OleDbCommand[4]; + this._commandCollection[0] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT AcID, AcSold, AcSalePrice, AcTotalSales, AcCost, AcProfitReturn, AcTotalPr" + + "ofitReturn, Fk_DateID, Fk_AdItemID FROM ActualSales"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "SELECT AcSold, AcSalePrice, AcTotalSales, AcCost, AcProfitReturn, AcTotalP" + + "rofitReturn, Fk_AdItemID\r\nFROM ActualSales\r\nWHERE (Fk_DateID =" + + " ?)"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._commandCollection[2] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = @"SELECT AdItem.AdItem, Inventory.InvBeginingInventory, Inventory.InvRecieved, Inventory.InvTotal, Inventory.InvEnding, ActualSales.AcSold, ActualSales.AcSalePrice, + ActualSales.AcTotalSales, ActualSales.AcCost, ActualSales.AcProfitReturn, ActualSales.AcTotalProfitReturn +FROM ((AdItem INNER JOIN + Inventory ON AdItem.AdItemID = Inventory.Fk_AdItemID) INNER JOIN + ActualSales ON Inventory.Fk_AdItemID = ActualSales.Fk_AdItemID) +WHERE (Inventory.Fk_DateID = ?)"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[2].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._commandCollection[3] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = @"SELECT AdItem.AdItem, ActualSales.AcSold, ActualSales.AcSalePrice, ActualSales.AcTotalSales, ActualSales.AcCost, ActualSales.AcProfitReturn, + ActualSales.AcTotalProfitReturn +FROM (AdItem INNER JOIN + ActualSales ON AdItem.AdItemID = ActualSales.Fk_AdItemID) +WHERE (ActualSales.Fk_DateID = ?)"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[3].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + } + + [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(apcDatabase.ActualSalesDataTable 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 apcDatabase.ActualSalesDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + apcDatabase.ActualSalesDataTable dataTable = new apcDatabase.ActualSalesDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.ActualSalesDataTable GetDataByDateID(string Fk_DateID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((Fk_DateID == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Fk_DateID)); + } + apcDatabase.ActualSalesDataTable dataTable = new apcDatabase.ActualSalesDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.ActualSalesDataTable ReturnInventoryAndActualSales(string Fk_DateID) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((Fk_DateID == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Fk_DateID)); + } + apcDatabase.ActualSalesDataTable dataTable = new apcDatabase.ActualSalesDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.ActualSalesDataTable ReturnSalesByDateID(string Fk_DateID) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((Fk_DateID == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Fk_DateID)); + } + apcDatabase.ActualSalesDataTable dataTable = new apcDatabase.ActualSalesDataTable(); + 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(apcDatabase.ActualSalesDataTable 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(apcDatabase dataSet) { + return this.Adapter.Update(dataSet, "ActualSales"); + } + + [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_AcID, global::System.Nullable Original_AcSold, global::System.Nullable Original_AcSalePrice, global::System.Nullable Original_AcTotalSales, global::System.Nullable Original_AcCost, global::System.Nullable Original_AcProfitReturn, global::System.Nullable Original_AcTotalProfitReturn, global::System.Nullable Original_Fk_DateID, global::System.Nullable Original_Fk_AdItemID) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_AcID)); + if ((Original_AcSold.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_AcSold.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Original_AcSalePrice.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((decimal)(Original_AcSalePrice.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Original_AcTotalSales.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((decimal)(Original_AcTotalSales.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_AcCost.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((decimal)(Original_AcCost.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + if ((Original_AcProfitReturn.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((decimal)(Original_AcProfitReturn.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + if ((Original_AcTotalProfitReturn.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((decimal)(Original_AcTotalProfitReturn.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[14].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; + } + if ((Original_Fk_AdItemID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[16].Value = ((int)(Original_Fk_AdItemID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(global::System.Nullable AcSold, global::System.Nullable AcSalePrice, global::System.Nullable AcTotalSales, global::System.Nullable AcCost, global::System.Nullable AcProfitReturn, global::System.Nullable AcTotalProfitReturn, global::System.Nullable Fk_DateID, global::System.Nullable Fk_AdItemID) { + if ((AcSold.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(AcSold.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((AcSalePrice.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[1].Value = ((decimal)(AcSalePrice.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((AcTotalSales.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(AcTotalSales.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((AcCost.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(AcCost.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((AcProfitReturn.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(AcProfitReturn.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((AcTotalProfitReturn.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((decimal)(AcTotalProfitReturn.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[6].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Fk_AdItemID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[7].Value = ((int)(Fk_AdItemID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + global::System.Nullable AcSold, + global::System.Nullable AcSalePrice, + global::System.Nullable AcTotalSales, + global::System.Nullable AcCost, + global::System.Nullable AcProfitReturn, + global::System.Nullable AcTotalProfitReturn, + global::System.Nullable Fk_DateID, + global::System.Nullable Fk_AdItemID, + int Original_AcID, + global::System.Nullable Original_AcSold, + global::System.Nullable Original_AcSalePrice, + global::System.Nullable Original_AcTotalSales, + global::System.Nullable Original_AcCost, + global::System.Nullable Original_AcProfitReturn, + global::System.Nullable Original_AcTotalProfitReturn, + global::System.Nullable Original_Fk_DateID, + global::System.Nullable Original_Fk_AdItemID) { + if ((AcSold.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(AcSold.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((AcSalePrice.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[1].Value = ((decimal)(AcSalePrice.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((AcTotalSales.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(AcTotalSales.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((AcCost.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(AcCost.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((AcProfitReturn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(AcProfitReturn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((AcTotalProfitReturn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((decimal)(AcTotalProfitReturn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Fk_AdItemID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Fk_AdItemID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Original_AcID)); + if ((Original_AcSold.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[10].Value = ((int)(Original_AcSold.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[10].Value = global::System.DBNull.Value; + } + if ((Original_AcSalePrice.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[12].Value = ((decimal)(Original_AcSalePrice.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[12].Value = global::System.DBNull.Value; + } + if ((Original_AcTotalSales.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[14].Value = ((decimal)(Original_AcTotalSales.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[14].Value = global::System.DBNull.Value; + } + if ((Original_AcCost.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[16].Value = ((decimal)(Original_AcCost.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[16].Value = global::System.DBNull.Value; + } + if ((Original_AcProfitReturn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[18].Value = ((decimal)(Original_AcProfitReturn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[18].Value = global::System.DBNull.Value; + } + if ((Original_AcTotalProfitReturn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[20].Value = ((decimal)(Original_AcTotalProfitReturn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[19].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[20].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[22].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[21].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[22].Value = global::System.DBNull.Value; + } + if ((Original_Fk_AdItemID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[24].Value = ((int)(Original_Fk_AdItemID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[23].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[24].Value = global::System.DBNull.Value; + } + 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(); + } + } + } + } + + /// + ///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 AdItemTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.OleDb.OleDbDataAdapter _adapter; + + private global::System.Data.OleDb.OleDbConnection _connection; + + private global::System.Data.OleDb.OleDbTransaction _transaction; + + private global::System.Data.OleDb.OleDbCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public AdItemTableAdapter() { + 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.OleDb.OleDbDataAdapter 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.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(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.OleDb.OleDbTransaction 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.OleDb.OleDbCommand[] 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.OleDb.OleDbDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "AdItem"; + tableMapping.ColumnMappings.Add("AdItemID", "AdItemID"); + tableMapping.ColumnMappings.Add("AdItem", "AdItem"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM `AdItem` WHERE ((`AdItemID` = ?) AND ((? = 1 AND `AdItem` IS NULL) OR" + + " (`AdItem` = ?)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AdItemID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AdItem", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AdItem", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AdItem", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AdItem", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.InsertCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO `AdItem` (`AdItem`) VALUES (?)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AdItem", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AdItem", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = "UPDATE `AdItem` SET `AdItem` = ? WHERE ((`AdItemID` = ?) AND ((? = 1 AND `AdItem`" + + " IS NULL) OR (`AdItem` = ?)))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AdItem", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AdItem", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AdItemID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_AdItem", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AdItem", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_AdItem", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AdItem", 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.OleDb.OleDbConnection(); + this._connection.ConnectionString = global::AdvertsingProfitControl.Properties.Settings.Default.apc___CopyConnectionString2; + } + + [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.OleDb.OleDbCommand[3]; + this._commandCollection[0] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT AdItemID, AdItem FROM AdItem"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "SELECT AdItemID\r\nFROM AdItem\r\nWHERE (AdItem = ?)"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("AdItem", global::System.Data.OleDb.OleDbType.WChar, 255, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "AdItem", global::System.Data.DataRowVersion.Current, false, null)); + this._commandCollection[2] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = @"SELECT AdItem.AdItem +FROM ((AdItem INNER JOIN + ProjectedSales ON AdItem.AdItemID = ProjectedSales.Fk_AdItemID) INNER JOIN + WeekEndingDate ON ProjectedSales.Fk_DateID = WeekEndingDate.DateID) +WHERE (WeekEndingDate.DateID = ?)"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[2].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "DateID", global::System.Data.DataRowVersion.Current, false, null)); + } + + [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(apcDatabase.AdItemDataTable 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 apcDatabase.AdItemDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + apcDatabase.AdItemDataTable dataTable = new apcDatabase.AdItemDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.AdItemDataTable ReturnAddItemIDByItemString(string AdItem) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((AdItem == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(AdItem)); + } + apcDatabase.AdItemDataTable dataTable = new apcDatabase.AdItemDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.AdItemDataTable ReturnAdItemsByDate(string DateID) { + this.Adapter.SelectCommand = this.CommandCollection[2]; + if ((DateID == null)) { + throw new global::System.ArgumentNullException("DateID"); + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(DateID)); + } + apcDatabase.AdItemDataTable dataTable = new apcDatabase.AdItemDataTable(); + 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(apcDatabase.AdItemDataTable 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(apcDatabase dataSet) { + return this.Adapter.Update(dataSet, "AdItem"); + } + + [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_AdItemID, string Original_AdItem) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_AdItemID)); + if ((Original_AdItem == 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_AdItem)); + } + 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 AdItem) { + if ((AdItem == null)) { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(AdItem)); + } + 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 AdItem, int Original_AdItemID, string Original_AdItem) { + if ((AdItem == null)) { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(AdItem)); + } + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_AdItemID)); + if ((Original_AdItem == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_AdItem)); + } + 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(); + } + } + } + } + + /// + ///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 CommentTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.OleDb.OleDbDataAdapter _adapter; + + private global::System.Data.OleDb.OleDbConnection _connection; + + private global::System.Data.OleDb.OleDbTransaction _transaction; + + private global::System.Data.OleDb.OleDbCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public CommentTableAdapter() { + 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.OleDb.OleDbDataAdapter 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.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(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.OleDb.OleDbTransaction 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.OleDb.OleDbCommand[] 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.OleDb.OleDbDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "Comment"; + tableMapping.ColumnMappings.Add("CommnetID", "CommnetID"); + tableMapping.ColumnMappings.Add("Comment", "Comment"); + tableMapping.ColumnMappings.Add("Fk_DateID", "Fk_DateID"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM `Comment` WHERE ((`CommnetID` = ?) AND ((? = 1 AND `Fk_DateID` IS NUL" + + "L) OR (`Fk_DateID` = ?)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_CommnetID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "CommnetID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.InsertCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO `Comment` (`Comment`, `Fk_DateID`) VALUES (?, ?)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Comment", global::System.Data.OleDb.OleDbType.LongVarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Comment", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = "UPDATE `Comment` SET `Comment` = ?, `Fk_DateID` = ? WHERE ((`CommnetID` = ?) AND " + + "((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Comment", global::System.Data.OleDb.OleDbType.LongVarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Comment", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_CommnetID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "CommnetID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", 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.OleDb.OleDbConnection(); + this._connection.ConnectionString = global::AdvertsingProfitControl.Properties.Settings.Default.apc___CopyConnectionString2; + } + + [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.OleDb.OleDbCommand[2]; + this._commandCollection[0] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT CommnetID, Comment, Fk_DateID FROM Comment"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "SELECT Comment\r\nFROM Comment\r\nWHERE Fk_DateID = ?"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + } + + [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(apcDatabase.CommentDataTable 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 apcDatabase.CommentDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + apcDatabase.CommentDataTable dataTable = new apcDatabase.CommentDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.CommentDataTable GetDataByDateID(string Fk_DateID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((Fk_DateID == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Fk_DateID)); + } + apcDatabase.CommentDataTable dataTable = new apcDatabase.CommentDataTable(); + 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(apcDatabase.CommentDataTable 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(apcDatabase dataSet) { + return this.Adapter.Update(dataSet, "Comment"); + } + + [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_CommnetID, global::System.Nullable Original_Fk_DateID) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_CommnetID)); + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(string Comment, global::System.Nullable Fk_DateID) { + if ((Comment == null)) { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(Comment)); + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(string Comment, global::System.Nullable Fk_DateID, int Original_CommnetID, global::System.Nullable Original_Fk_DateID) { + if ((Comment == null)) { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(Comment)); + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Original_CommnetID)); + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + 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(); + } + } + } + } + + /// + ///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 InventoryTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.OleDb.OleDbDataAdapter _adapter; + + private global::System.Data.OleDb.OleDbConnection _connection; + + private global::System.Data.OleDb.OleDbTransaction _transaction; + + private global::System.Data.OleDb.OleDbCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InventoryTableAdapter() { + 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.OleDb.OleDbDataAdapter 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.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(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.OleDb.OleDbTransaction 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.OleDb.OleDbCommand[] 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.OleDb.OleDbDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "Inventory"; + tableMapping.ColumnMappings.Add("InvID", "InvID"); + tableMapping.ColumnMappings.Add("InvBeginingInventory", "InvBeginingInventory"); + tableMapping.ColumnMappings.Add("InvRecieved", "InvRecieved"); + tableMapping.ColumnMappings.Add("InvTotal", "InvTotal"); + tableMapping.ColumnMappings.Add("InvEnding", "InvEnding"); + tableMapping.ColumnMappings.Add("Fk_AdItemID", "Fk_AdItemID"); + tableMapping.ColumnMappings.Add("Fk_DateID", "Fk_DateID"); + tableMapping.ColumnMappings.Add("InvNote", "InvNote"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM `Inventory` WHERE ((`InvID` = ?) AND ((? = 1 AND `InvBeginingInventory` IS NULL) OR (`InvBeginingInventory` = ?)) AND ((? = 1 AND `InvRecieved` IS NULL) OR (`InvRecieved` = ?)) AND ((? = 1 AND `InvTotal` IS NULL) OR (`InvTotal` = ?)) AND ((? = 1 AND `InvEnding` IS NULL) OR (`InvEnding` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `InvNote` IS NULL) OR (`InvNote` = ?)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvBeginingInventory", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvBeginingInventory", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvBeginingInventory", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvBeginingInventory", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvRecieved", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvRecieved", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvRecieved", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvRecieved", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvTotal", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvTotal", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvTotal", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvTotal", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvEnding", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvEnding", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvEnding", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvEnding", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvNote", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvNote", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvNote", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvNote", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.InsertCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO `Inventory` (`InvBeginingInventory`, `InvRecieved`, `InvTotal`, `InvE" + + "nding`, `Fk_AdItemID`, `Fk_DateID`, `InvNote`) VALUES (?, ?, ?, ?, ?, ?, ?)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvBeginingInventory", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvBeginingInventory", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvRecieved", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvRecieved", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvTotal", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvTotal", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvEnding", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvEnding", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvNote", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvNote", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE `Inventory` SET `InvBeginingInventory` = ?, `InvRecieved` = ?, `InvTotal` = ?, `InvEnding` = ?, `Fk_AdItemID` = ?, `Fk_DateID` = ?, `InvNote` = ? WHERE ((`InvID` = ?) AND ((? = 1 AND `InvBeginingInventory` IS NULL) OR (`InvBeginingInventory` = ?)) AND ((? = 1 AND `InvRecieved` IS NULL) OR (`InvRecieved` = ?)) AND ((? = 1 AND `InvTotal` IS NULL) OR (`InvTotal` = ?)) AND ((? = 1 AND `InvEnding` IS NULL) OR (`InvEnding` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `InvNote` IS NULL) OR (`InvNote` = ?)))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvBeginingInventory", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvBeginingInventory", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvRecieved", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvRecieved", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvTotal", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvTotal", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvEnding", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvEnding", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvNote", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvNote", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvBeginingInventory", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvBeginingInventory", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvBeginingInventory", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvBeginingInventory", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvRecieved", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvRecieved", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvRecieved", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvRecieved", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvTotal", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvTotal", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvTotal", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvTotal", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvEnding", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvEnding", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvEnding", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvEnding", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvNote", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvNote", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvNote", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvNote", 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.OleDb.OleDbConnection(); + this._connection.ConnectionString = global::AdvertsingProfitControl.Properties.Settings.Default.apc___CopyConnectionString2; + } + + [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.OleDb.OleDbCommand[2]; + this._commandCollection[0] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT InvID, InvBeginingInventory, InvRecieved, InvTotal, InvEnding, Fk_AdItemID" + + ", Fk_DateID, InvNote FROM Inventory"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = @"SELECT AdItem.AdItem, Inventory.InvBeginingInventory, Inventory.InvRecieved, Inventory.InvTotal, Inventory.InvEnding +FROM (Inventory INNER JOIN + AdItem ON Inventory.Fk_AdItemID = AdItem.AdItemID) +WHERE (Inventory.Fk_DateID = ?)"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + } + + [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(apcDatabase.InventoryDataTable 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 apcDatabase.InventoryDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + apcDatabase.InventoryDataTable dataTable = new apcDatabase.InventoryDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.InventoryDataTable GetInventoryByDateID(string Fk_DateID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((Fk_DateID == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Fk_DateID)); + } + apcDatabase.InventoryDataTable dataTable = new apcDatabase.InventoryDataTable(); + 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(apcDatabase.InventoryDataTable 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(apcDatabase dataSet) { + return this.Adapter.Update(dataSet, "Inventory"); + } + + [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_InvID, global::System.Nullable Original_InvBeginingInventory, global::System.Nullable Original_InvRecieved, global::System.Nullable Original_InvTotal, global::System.Nullable Original_InvEnding, global::System.Nullable Original_Fk_AdItemID, global::System.Nullable Original_Fk_DateID, string Original_InvNote) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_InvID)); + if ((Original_InvBeginingInventory.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_InvBeginingInventory.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Original_InvRecieved.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_InvRecieved.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Original_InvTotal.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_InvTotal.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_InvEnding.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_InvEnding.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + if ((Original_Fk_AdItemID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_Fk_AdItemID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + if ((Original_InvNote == null)) { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_InvNote)); + } + 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 InvBeginingInventory, global::System.Nullable InvRecieved, global::System.Nullable InvTotal, global::System.Nullable InvEnding, global::System.Nullable Fk_AdItemID, global::System.Nullable Fk_DateID, string InvNote) { + if ((InvBeginingInventory.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(InvBeginingInventory.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((InvRecieved.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(InvRecieved.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((InvTotal.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((int)(InvTotal.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((InvEnding.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[3].Value = ((int)(InvEnding.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((Fk_AdItemID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Fk_AdItemID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((InvNote == null)) { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(InvNote)); + } + 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 InvBeginingInventory, global::System.Nullable InvRecieved, global::System.Nullable InvTotal, global::System.Nullable InvEnding, global::System.Nullable Fk_AdItemID, global::System.Nullable Fk_DateID, string InvNote, int Original_InvID, global::System.Nullable Original_InvBeginingInventory, global::System.Nullable Original_InvRecieved, global::System.Nullable Original_InvTotal, global::System.Nullable Original_InvEnding, global::System.Nullable Original_Fk_AdItemID, global::System.Nullable Original_Fk_DateID, string Original_InvNote) { + if ((InvBeginingInventory.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(InvBeginingInventory.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((InvRecieved.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(InvRecieved.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((InvTotal.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(InvTotal.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((InvEnding.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(InvEnding.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((Fk_AdItemID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Fk_AdItemID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((InvNote == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(InvNote)); + } + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_InvID)); + if ((Original_InvBeginingInventory.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_InvBeginingInventory.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; + } + if ((Original_InvRecieved.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_InvRecieved.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + } + if ((Original_InvTotal.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Original_InvTotal.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((Original_InvEnding.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_InvEnding.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; + } + if ((Original_Fk_AdItemID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_Fk_AdItemID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; + } + if ((Original_InvNote == null)) { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_InvNote)); + } + 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(); + } + } + } + } + + /// + ///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 InvoiceTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.OleDb.OleDbDataAdapter _adapter; + + private global::System.Data.OleDb.OleDbConnection _connection; + + private global::System.Data.OleDb.OleDbTransaction _transaction; + + private global::System.Data.OleDb.OleDbCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public InvoiceTableAdapter() { + 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.OleDb.OleDbDataAdapter 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.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(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.OleDb.OleDbTransaction 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.OleDb.OleDbCommand[] 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.OleDb.OleDbDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "Invoice"; + tableMapping.ColumnMappings.Add("InvoiceID", "InvoiceID"); + tableMapping.ColumnMappings.Add("InvoiceNetAmountAtCost", "InvoiceNetAmountAtCost"); + tableMapping.ColumnMappings.Add("InvoiceAmountOf", "InvoiceAmountOf"); + tableMapping.ColumnMappings.Add("InvoiceDate", "InvoiceDate"); + tableMapping.ColumnMappings.Add("Fk_DateID", "Fk_DateID"); + tableMapping.ColumnMappings.Add("Fk_SupplierID", "Fk_SupplierID"); + tableMapping.ColumnMappings.Add("InvoiceNumber", "InvoiceNumber"); + tableMapping.ColumnMappings.Add("InvoiceNote", "InvoiceNote"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM `Invoice` WHERE ((`InvoiceID` = ?) AND ((? = 1 AND `InvoiceNetAmountAtCost` IS NULL) OR (`InvoiceNetAmountAtCost` = ?)) AND ((? = 1 AND `InvoiceAmountOf` IS NULL) OR (`InvoiceAmountOf` = ?)) AND ((? = 1 AND `InvoiceDate` IS NULL) OR (`InvoiceDate` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_SupplierID` IS NULL) OR (`Fk_SupplierID` = ?)) AND ((? = 1 AND `InvoiceNumber` IS NULL) OR (`InvoiceNumber` = ?)) AND ((? = 1 AND `InvoiceNote` IS NULL) OR (`InvoiceNote` = ?)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceNetAmountAtCost", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNetAmountAtCost", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceNetAmountAtCost", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNetAmountAtCost", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceAmountOf", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceAmountOf", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceAmountOf", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceAmountOf", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceDate", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceDate", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceDate", global::System.Data.OleDb.OleDbType.Date, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceDate", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_SupplierID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_SupplierID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_SupplierID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_SupplierID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceNumber", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNumber", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceNumber", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNumber", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceNote", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNote", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceNote", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNote", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.InsertCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO `Invoice` (`InvoiceNetAmountAtCost`, `InvoiceAmountOf`, `InvoiceDate`" + + ", `Fk_DateID`, `Fk_SupplierID`, `InvoiceNumber`, `InvoiceNote`) VALUES (?, ?, ?," + + " ?, ?, ?, ?)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceNetAmountAtCost", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNetAmountAtCost", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceAmountOf", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceAmountOf", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceDate", global::System.Data.OleDb.OleDbType.Date, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceDate", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_SupplierID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_SupplierID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceNumber", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNumber", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceNote", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNote", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE `Invoice` SET `InvoiceNetAmountAtCost` = ?, `InvoiceAmountOf` = ?, `InvoiceDate` = ?, `Fk_DateID` = ?, `Fk_SupplierID` = ?, `InvoiceNumber` = ?, `InvoiceNote` = ? WHERE ((`InvoiceID` = ?) AND ((? = 1 AND `InvoiceNetAmountAtCost` IS NULL) OR (`InvoiceNetAmountAtCost` = ?)) AND ((? = 1 AND `InvoiceAmountOf` IS NULL) OR (`InvoiceAmountOf` = ?)) AND ((? = 1 AND `InvoiceDate` IS NULL) OR (`InvoiceDate` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_SupplierID` IS NULL) OR (`Fk_SupplierID` = ?)) AND ((? = 1 AND `InvoiceNumber` IS NULL) OR (`InvoiceNumber` = ?)) AND ((? = 1 AND `InvoiceNote` IS NULL) OR (`InvoiceNote` = ?)))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceNetAmountAtCost", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNetAmountAtCost", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceAmountOf", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceAmountOf", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceDate", global::System.Data.OleDb.OleDbType.Date, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceDate", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_SupplierID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_SupplierID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceNumber", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNumber", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("InvoiceNote", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNote", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceNetAmountAtCost", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNetAmountAtCost", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceNetAmountAtCost", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNetAmountAtCost", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceAmountOf", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceAmountOf", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceAmountOf", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceAmountOf", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceDate", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceDate", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceDate", global::System.Data.OleDb.OleDbType.Date, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceDate", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_SupplierID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_SupplierID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_SupplierID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_SupplierID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceNumber", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNumber", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceNumber", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNumber", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_InvoiceNote", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNote", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_InvoiceNote", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "InvoiceNote", 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.OleDb.OleDbConnection(); + this._connection.ConnectionString = global::AdvertsingProfitControl.Properties.Settings.Default.apc___CopyConnectionString2; + } + + [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.OleDb.OleDbCommand[2]; + this._commandCollection[0] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT InvoiceID, InvoiceNetAmountAtCost, InvoiceAmountOf, InvoiceDate, Fk_DateID" + + ", Fk_SupplierID, InvoiceNumber, InvoiceNote FROM Invoice"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "SELECT InvoiceNetAmountAtCost, InvoiceAmountOf, InvoiceDate, InvoiceNumber" + + ", Fk_SupplierID\r\nFROM Invoice\r\nWHERE (Fk_DateID = ?)"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + } + + [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(apcDatabase.InvoiceDataTable 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 apcDatabase.InvoiceDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + apcDatabase.InvoiceDataTable dataTable = new apcDatabase.InvoiceDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.InvoiceDataTable GetDataByDateID(string Fk_DateID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((Fk_DateID == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Fk_DateID)); + } + apcDatabase.InvoiceDataTable dataTable = new apcDatabase.InvoiceDataTable(); + 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(apcDatabase.InvoiceDataTable 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(apcDatabase dataSet) { + return this.Adapter.Update(dataSet, "Invoice"); + } + + [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_InvoiceID, global::System.Nullable Original_InvoiceNetAmountAtCost, global::System.Nullable Original_InvoiceAmountOf, global::System.Nullable Original_InvoiceDate, global::System.Nullable Original_Fk_DateID, global::System.Nullable Original_Fk_SupplierID, string Original_InvoiceNumber, string Original_InvoiceNote) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_InvoiceID)); + if ((Original_InvoiceNetAmountAtCost.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_InvoiceNetAmountAtCost.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Original_InvoiceAmountOf.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_InvoiceAmountOf.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Original_InvoiceDate.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((System.DateTime)(Original_InvoiceDate.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + if ((Original_Fk_SupplierID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_Fk_SupplierID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + if ((Original_InvoiceNumber == null)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((string)(Original_InvoiceNumber)); + } + if ((Original_InvoiceNote == null)) { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; + } + else { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[14].Value = ((string)(Original_InvoiceNote)); + } + 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 InvoiceNetAmountAtCost, global::System.Nullable InvoiceAmountOf, global::System.Nullable InvoiceDate, global::System.Nullable Fk_DateID, global::System.Nullable Fk_SupplierID, string InvoiceNumber, string InvoiceNote) { + if ((InvoiceNetAmountAtCost.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(InvoiceNetAmountAtCost.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((InvoiceAmountOf.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(InvoiceAmountOf.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((InvoiceDate.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((System.DateTime)(InvoiceDate.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[3].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((Fk_SupplierID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Fk_SupplierID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((InvoiceNumber == null)) { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = ((string)(InvoiceNumber)); + } + if ((InvoiceNote == null)) { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = ((string)(InvoiceNote)); + } + 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 InvoiceNetAmountAtCost, global::System.Nullable InvoiceAmountOf, global::System.Nullable InvoiceDate, global::System.Nullable Fk_DateID, global::System.Nullable Fk_SupplierID, string InvoiceNumber, string InvoiceNote, int Original_InvoiceID, global::System.Nullable Original_InvoiceNetAmountAtCost, global::System.Nullable Original_InvoiceAmountOf, global::System.Nullable Original_InvoiceDate, global::System.Nullable Original_Fk_DateID, global::System.Nullable Original_Fk_SupplierID, string Original_InvoiceNumber, string Original_InvoiceNote) { + if ((InvoiceNetAmountAtCost.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(InvoiceNetAmountAtCost.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((InvoiceAmountOf.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(InvoiceAmountOf.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((InvoiceDate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((System.DateTime)(InvoiceDate.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((Fk_SupplierID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Fk_SupplierID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((InvoiceNumber == null)) { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = ((string)(InvoiceNumber)); + } + if ((InvoiceNote == null)) { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = ((string)(InvoiceNote)); + } + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_InvoiceID)); + if ((Original_InvoiceNetAmountAtCost.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_InvoiceNetAmountAtCost.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; + } + if ((Original_InvoiceAmountOf.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_InvoiceAmountOf.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + } + if ((Original_InvoiceDate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((System.DateTime)(Original_InvoiceDate.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; + } + if ((Original_Fk_SupplierID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_Fk_SupplierID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; + } + if ((Original_InvoiceNumber == null)) { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((string)(Original_InvoiceNumber)); + } + if ((Original_InvoiceNote == null)) { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[21].Value = ((string)(Original_InvoiceNote)); + } + 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(); + } + } + } + } + + /// + ///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 ProjectedSalesTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.OleDb.OleDbDataAdapter _adapter; + + private global::System.Data.OleDb.OleDbConnection _connection; + + private global::System.Data.OleDb.OleDbTransaction _transaction; + + private global::System.Data.OleDb.OleDbCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public ProjectedSalesTableAdapter() { + 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.OleDb.OleDbDataAdapter 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.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(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.OleDb.OleDbTransaction 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.OleDb.OleDbCommand[] 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.OleDb.OleDbDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "ProjectedSales"; + tableMapping.ColumnMappings.Add("PrSalesID", "PrSalesID"); + tableMapping.ColumnMappings.Add("PrSold", "PrSold"); + tableMapping.ColumnMappings.Add("PrSalePrice", "PrSalePrice"); + tableMapping.ColumnMappings.Add("PrProfitReturn", "PrProfitReturn"); + tableMapping.ColumnMappings.Add("PrTotalProfitReturn", "PrTotalProfitReturn"); + tableMapping.ColumnMappings.Add("PrTotalSales", "PrTotalSales"); + tableMapping.ColumnMappings.Add("Fk_DateID", "Fk_DateID"); + tableMapping.ColumnMappings.Add("Fk_AdItemID", "Fk_AdItemID"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM `ProjectedSales` WHERE ((`PrSalesID` = ?) AND ((? = 1 AND `PrSold` IS NULL) OR (`PrSold` = ?)) AND ((? = 1 AND `PrSalePrice` IS NULL) OR (`PrSalePrice` = ?)) AND ((? = 1 AND `PrProfitReturn` IS NULL) OR (`PrProfitReturn` = ?)) AND ((? = 1 AND `PrTotalProfitReturn` IS NULL) OR (`PrTotalProfitReturn` = ?)) AND ((? = 1 AND `PrTotalSales` IS NULL) OR (`PrTotalSales` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrSalesID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSalesID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSold", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSold", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrSalePrice", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSalePrice", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrSalePrice", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSalePrice", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrProfitReturn", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrProfitReturn", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrProfitReturn", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrTotalProfitReturn", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalProfitReturn", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrTotalProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalProfitReturn", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalSales", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrTotalSales", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalSales", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.InsertCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO `ProjectedSales` (`PrSold`, `PrSalePrice`, `PrProfitReturn`, `PrTotal" + + "ProfitReturn`, `PrTotalSales`, `Fk_DateID`, `Fk_AdItemID`) VALUES (?, ?, ?, ?, ?" + + ", ?, ?)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSold", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrSalePrice", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSalePrice", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrProfitReturn", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrTotalProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalProfitReturn", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrTotalSales", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalSales", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE `ProjectedSales` SET `PrSold` = ?, `PrSalePrice` = ?, `PrProfitReturn` = ?, `PrTotalProfitReturn` = ?, `PrTotalSales` = ?, `Fk_DateID` = ?, `Fk_AdItemID` = ? WHERE ((`PrSalesID` = ?) AND ((? = 1 AND `PrSold` IS NULL) OR (`PrSold` = ?)) AND ((? = 1 AND `PrSalePrice` IS NULL) OR (`PrSalePrice` = ?)) AND ((? = 1 AND `PrProfitReturn` IS NULL) OR (`PrProfitReturn` = ?)) AND ((? = 1 AND `PrTotalProfitReturn` IS NULL) OR (`PrTotalProfitReturn` = ?)) AND ((? = 1 AND `PrTotalSales` IS NULL) OR (`PrTotalSales` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?)))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSold", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrSalePrice", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSalePrice", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrProfitReturn", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrTotalProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalProfitReturn", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("PrTotalSales", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalSales", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrSalesID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSalesID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSold", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrSold", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSold", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrSalePrice", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSalePrice", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrSalePrice", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrSalePrice", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrProfitReturn", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrProfitReturn", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrProfitReturn", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrTotalProfitReturn", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalProfitReturn", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrTotalProfitReturn", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalProfitReturn", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_PrTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalSales", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_PrTotalSales", global::System.Data.OleDb.OleDbType.Currency, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "PrTotalSales", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_AdItemID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_AdItemID", 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.OleDb.OleDbConnection(); + this._connection.ConnectionString = global::AdvertsingProfitControl.Properties.Settings.Default.apc___CopyConnectionString2; + } + + [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.OleDb.OleDbCommand[2]; + this._commandCollection[0] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT PrSalesID, PrSold, PrSalePrice, PrProfitReturn, PrTotalProfitReturn, PrTot" + + "alSales, Fk_DateID, Fk_AdItemID FROM ProjectedSales"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = @"SELECT AdItem.AdItem, ProjectedSales.PrSold, ProjectedSales.PrSalePrice, ProjectedSales.PrTotalSales, ProjectedSales.PrCost, ProjectedSales.PrProfitReturn, + ProjectedSales.PrTotalProfitReturn +FROM (AdItem INNER JOIN + ProjectedSales ON AdItem.AdItemID = ProjectedSales.Fk_AdItemID) +WHERE (ProjectedSales.Fk_DateID = ?)"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + } + + [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(apcDatabase.ProjectedSalesDataTable 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 apcDatabase.ProjectedSalesDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + apcDatabase.ProjectedSalesDataTable dataTable = new apcDatabase.ProjectedSalesDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] + public virtual int FillByProjections(apcDatabase.ProjectedSalesDataTable dataTable, string Fk_DateID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((Fk_DateID == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Fk_DateID)); + } + 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, false)] + public virtual apcDatabase.ProjectedSalesDataTable GetDataByProjections(string Fk_DateID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((Fk_DateID == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Fk_DateID)); + } + apcDatabase.ProjectedSalesDataTable dataTable = new apcDatabase.ProjectedSalesDataTable(); + 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(apcDatabase.ProjectedSalesDataTable 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(apcDatabase dataSet) { + return this.Adapter.Update(dataSet, "ProjectedSales"); + } + + [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_PrSalesID, global::System.Nullable Original_PrSold, global::System.Nullable Original_PrSalePrice, global::System.Nullable Original_PrProfitReturn, global::System.Nullable Original_PrTotalProfitReturn, global::System.Nullable Original_PrTotalSales, global::System.Nullable Original_Fk_DateID, global::System.Nullable Original_Fk_AdItemID) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_PrSalesID)); + if ((Original_PrSold.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_PrSold.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Original_PrSalePrice.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((decimal)(Original_PrSalePrice.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Original_PrProfitReturn.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((decimal)(Original_PrProfitReturn.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_PrTotalProfitReturn.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((decimal)(Original_PrTotalProfitReturn.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + if ((Original_PrTotalSales.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((decimal)(Original_PrTotalSales.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + if ((Original_Fk_AdItemID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[14].Value = ((int)(Original_Fk_AdItemID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(global::System.Nullable PrSold, global::System.Nullable PrSalePrice, global::System.Nullable PrProfitReturn, global::System.Nullable PrTotalProfitReturn, global::System.Nullable PrTotalSales, global::System.Nullable Fk_DateID, global::System.Nullable Fk_AdItemID) { + if ((PrSold.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(PrSold.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((PrSalePrice.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[1].Value = ((decimal)(PrSalePrice.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((PrProfitReturn.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((decimal)(PrProfitReturn.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((PrTotalProfitReturn.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[3].Value = ((decimal)(PrTotalProfitReturn.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((PrTotalSales.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((decimal)(PrTotalSales.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((Fk_AdItemID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[6].Value = ((int)(Fk_AdItemID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(global::System.Nullable PrSold, global::System.Nullable PrSalePrice, global::System.Nullable PrProfitReturn, global::System.Nullable PrTotalProfitReturn, global::System.Nullable PrTotalSales, global::System.Nullable Fk_DateID, global::System.Nullable Fk_AdItemID, int Original_PrSalesID, global::System.Nullable Original_PrSold, global::System.Nullable Original_PrSalePrice, global::System.Nullable Original_PrProfitReturn, global::System.Nullable Original_PrTotalProfitReturn, global::System.Nullable Original_PrTotalSales, global::System.Nullable Original_Fk_DateID, global::System.Nullable Original_Fk_AdItemID) { + if ((PrSold.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(PrSold.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((PrSalePrice.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[1].Value = ((decimal)(PrSalePrice.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((PrProfitReturn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((decimal)(PrProfitReturn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((PrTotalProfitReturn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((decimal)(PrTotalProfitReturn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((PrTotalSales.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((decimal)(PrTotalSales.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((Fk_AdItemID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Fk_AdItemID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(Original_PrSalesID)); + if ((Original_PrSold.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_PrSold.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[9].Value = global::System.DBNull.Value; + } + if ((Original_PrSalePrice.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((decimal)(Original_PrSalePrice.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + } + if ((Original_PrProfitReturn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((decimal)(Original_PrProfitReturn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((Original_PrTotalProfitReturn.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((decimal)(Original_PrTotalProfitReturn.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; + } + if ((Original_PrTotalSales.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((decimal)(Original_PrTotalSales.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; + } + if ((Original_Fk_AdItemID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(Original_Fk_AdItemID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; + } + 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(); + } + } + } + } + + /// + ///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 SupplierTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.OleDb.OleDbDataAdapter _adapter; + + private global::System.Data.OleDb.OleDbConnection _connection; + + private global::System.Data.OleDb.OleDbTransaction _transaction; + + private global::System.Data.OleDb.OleDbCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public SupplierTableAdapter() { + 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.OleDb.OleDbDataAdapter 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.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(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.OleDb.OleDbTransaction 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.OleDb.OleDbCommand[] 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.OleDb.OleDbDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "Supplier"; + tableMapping.ColumnMappings.Add("SupplierID", "SupplierID"); + tableMapping.ColumnMappings.Add("SupplierName", "SupplierName"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM `Supplier` WHERE ((`SupplierID` = ?) AND ((? = 1 AND `SupplierName` I" + + "S NULL) OR (`SupplierName` = ?)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_SupplierID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SupplierID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_SupplierName", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SupplierName", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_SupplierName", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SupplierName", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.InsertCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO `Supplier` (`SupplierName`) VALUES (?)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("SupplierName", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SupplierName", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = "UPDATE `Supplier` SET `SupplierName` = ? WHERE ((`SupplierID` = ?) AND ((? = 1 AN" + + "D `SupplierName` IS NULL) OR (`SupplierName` = ?)))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("SupplierName", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SupplierName", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_SupplierID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SupplierID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_SupplierName", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SupplierName", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_SupplierName", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "SupplierName", 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.OleDb.OleDbConnection(); + this._connection.ConnectionString = global::AdvertsingProfitControl.Properties.Settings.Default.apc___CopyConnectionString2; + } + + [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.OleDb.OleDbCommand[1]; + this._commandCollection[0] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT SupplierID, SupplierName FROM Supplier"; + 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(apcDatabase.SupplierDataTable 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 apcDatabase.SupplierDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + apcDatabase.SupplierDataTable dataTable = new apcDatabase.SupplierDataTable(); + 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(apcDatabase.SupplierDataTable 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(apcDatabase dataSet) { + return this.Adapter.Update(dataSet, "Supplier"); + } + + [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_SupplierID, string Original_SupplierName) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_SupplierID)); + if ((Original_SupplierName == 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_SupplierName)); + } + 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 SupplierName) { + if ((SupplierName == null)) { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = ((string)(SupplierName)); + } + 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 SupplierName, int Original_SupplierID, string Original_SupplierName) { + if ((SupplierName == null)) { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = ((string)(SupplierName)); + } + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_SupplierID)); + if ((Original_SupplierName == null)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((string)(Original_SupplierName)); + } + 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(); + } + } + } + } + + /// + ///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 WeekEndingDateTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.OleDb.OleDbDataAdapter _adapter; + + private global::System.Data.OleDb.OleDbConnection _connection; + + private global::System.Data.OleDb.OleDbTransaction _transaction; + + private global::System.Data.OleDb.OleDbCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeekEndingDateTableAdapter() { + 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.OleDb.OleDbDataAdapter 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.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(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.OleDb.OleDbTransaction 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.OleDb.OleDbCommand[] 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.OleDb.OleDbDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "WeekEndingDate"; + tableMapping.ColumnMappings.Add("DateID", "DateID"); + tableMapping.ColumnMappings.Add("EndOfWeekDate", "EndOfWeekDate"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = "DELETE FROM `WeekEndingDate` WHERE ((`DateID` = ?) AND ((? = 1 AND `EndOfWeekDate" + + "` IS NULL) OR (`EndOfWeekDate` = ?)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_EndOfWeekDate", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "EndOfWeekDate", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_EndOfWeekDate", global::System.Data.OleDb.OleDbType.Date, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "EndOfWeekDate", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.InsertCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO `WeekEndingDate` (`EndOfWeekDate`) VALUES (?)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("EndOfWeekDate", global::System.Data.OleDb.OleDbType.Date, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "EndOfWeekDate", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = "UPDATE `WeekEndingDate` SET `EndOfWeekDate` = ? WHERE ((`DateID` = ?) AND ((? = 1" + + " AND `EndOfWeekDate` IS NULL) OR (`EndOfWeekDate` = ?)))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("EndOfWeekDate", global::System.Data.OleDb.OleDbType.Date, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "EndOfWeekDate", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_EndOfWeekDate", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "EndOfWeekDate", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_EndOfWeekDate", global::System.Data.OleDb.OleDbType.Date, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "EndOfWeekDate", 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.OleDb.OleDbConnection(); + this._connection.ConnectionString = global::AdvertsingProfitControl.Properties.Settings.Default.apc___CopyConnectionString2; + } + + [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.OleDb.OleDbCommand[5]; + this._commandCollection[0] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT DateID, EndOfWeekDate FROM WeekEndingDate"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = @"SELECT WeekEndingDate.EndOfWeekDate, Invoice.InvoiceNetAmountAtCost, Invoice.InvoiceAmountOf, Invoice.InvoiceDate, Invoice.InvoiceNumber, Supplier.SupplierName, + WeeklySales.Sunday, WeeklySales.Monday, WeeklySales.Tuesday, WeeklySales.Wednesday, WeeklySales.Thursday, WeeklySales.Friday, + WeeklySales.Saturday, WeeklySales.WeeklyTotalSales +FROM (((WeekEndingDate INNER JOIN + Invoice ON WeekEndingDate.DateID = Invoice.Fk_DateID) INNER JOIN + WeeklySales ON WeekEndingDate.DateID = WeeklySales.Fk_DateID) INNER JOIN + Supplier ON Invoice.Fk_SupplierID = Supplier.SupplierID) +WHERE (WeekEndingDate.DateID = ?)"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._commandCollection[2] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[2].Connection = this.Connection; + this._commandCollection[2].CommandText = "SELECT DateID\r\nFROM WeekEndingDate\r\nWHERE (EndOfWeekDate" + + " =\r\n (SELECT MAX(EndOfWeekDate) AS Expr1\r\n " + + " FROM WeekEndingDate WeekEndingDate_1))"; + this._commandCollection[2].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[3] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[3].Connection = this.Connection; + this._commandCollection[3].CommandText = "SELECT EndOfWeekDate\r\nFROM WeekEndingDate\r\nWHERE (DateID" + + " = ?)"; + this._commandCollection[3].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[3].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._commandCollection[4] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[4].Connection = this.Connection; + this._commandCollection[4].CommandText = "SELECT DateID, EndOfWeekDate\r\nFROM WeekEndingDate\r\nWHERE " + + " (EndOfWeekDate = ?)"; + this._commandCollection[4].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[4].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("EndOfWeekDate", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "EndOfWeekDate", global::System.Data.DataRowVersion.Current, false, null)); + } + + [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(apcDatabase.WeekEndingDateDataTable 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 apcDatabase.WeekEndingDateDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + apcDatabase.WeekEndingDateDataTable dataTable = new apcDatabase.WeekEndingDateDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Fill, false)] + public virtual int FillWithWICTable(apcDatabase.WeekEndingDateDataTable dataTable, string DateID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((DateID == null)) { + throw new global::System.ArgumentNullException("DateID"); + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(DateID)); + } + 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, false)] + public virtual apcDatabase.WeekEndingDateDataTable ReturnWICTable(string DateID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((DateID == null)) { + throw new global::System.ArgumentNullException("DateID"); + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(DateID)); + } + apcDatabase.WeekEndingDateDataTable dataTable = new apcDatabase.WeekEndingDateDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.WeekEndingDateDataTable ReturnDate(string DateID) { + this.Adapter.SelectCommand = this.CommandCollection[3]; + if ((DateID == null)) { + throw new global::System.ArgumentNullException("DateID"); + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(DateID)); + } + apcDatabase.WeekEndingDateDataTable dataTable = new apcDatabase.WeekEndingDateDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.WeekEndingDateDataTable ReturnDateIDByDateString(string EndOfWeekDate) { + this.Adapter.SelectCommand = this.CommandCollection[4]; + if ((EndOfWeekDate == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(EndOfWeekDate)); + } + apcDatabase.WeekEndingDateDataTable dataTable = new apcDatabase.WeekEndingDateDataTable(); + 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(apcDatabase.WeekEndingDateDataTable 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(apcDatabase dataSet) { + return this.Adapter.Update(dataSet, "WeekEndingDate"); + } + + [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_DateID, global::System.Nullable Original_EndOfWeekDate) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_DateID)); + if ((Original_EndOfWeekDate.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((System.DateTime)(Original_EndOfWeekDate.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(global::System.Nullable EndOfWeekDate) { + if ((EndOfWeekDate.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[0].Value = ((System.DateTime)(EndOfWeekDate.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update(global::System.Nullable EndOfWeekDate, int Original_DateID, global::System.Nullable Original_EndOfWeekDate) { + if ((EndOfWeekDate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((System.DateTime)(EndOfWeekDate.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Original_DateID)); + if ((Original_EndOfWeekDate.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[3].Value = ((System.DateTime)(Original_EndOfWeekDate.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + 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")] + public virtual global::System.Nullable GetMostRecentDate() { + global::System.Data.OleDb.OleDbCommand command = this.CommandCollection[2]; + global::System.Data.ConnectionState previousConnectionState = command.Connection.State; + if (((command.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + command.Connection.Open(); + } + object returnValue; + try { + returnValue = command.ExecuteScalar(); + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + command.Connection.Close(); + } + } + if (((returnValue == null) + || (returnValue.GetType() == typeof(global::System.DBNull)))) { + return new global::System.Nullable(); + } + else { + return new global::System.Nullable(((int)(returnValue))); + } + } + } + + /// + ///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 WeeklySalesTableAdapter : global::System.ComponentModel.Component { + + private global::System.Data.OleDb.OleDbDataAdapter _adapter; + + private global::System.Data.OleDb.OleDbConnection _connection; + + private global::System.Data.OleDb.OleDbTransaction _transaction; + + private global::System.Data.OleDb.OleDbCommand[] _commandCollection; + + private bool _clearBeforeFill; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public WeeklySalesTableAdapter() { + 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.OleDb.OleDbDataAdapter 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.OleDb.OleDbConnection 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.OleDb.OleDbCommand)(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.OleDb.OleDbTransaction 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.OleDb.OleDbCommand[] 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.OleDb.OleDbDataAdapter(); + global::System.Data.Common.DataTableMapping tableMapping = new global::System.Data.Common.DataTableMapping(); + tableMapping.SourceTable = "Table"; + tableMapping.DataSetTable = "WeeklySales"; + tableMapping.ColumnMappings.Add("WeeklyID", "WeeklyID"); + tableMapping.ColumnMappings.Add("Sunday", "Sunday"); + tableMapping.ColumnMappings.Add("Monday", "Monday"); + tableMapping.ColumnMappings.Add("Tuesday", "Tuesday"); + tableMapping.ColumnMappings.Add("Wednesday", "Wednesday"); + tableMapping.ColumnMappings.Add("Thursday", "Thursday"); + tableMapping.ColumnMappings.Add("Friday", "Friday"); + tableMapping.ColumnMappings.Add("Saturday", "Saturday"); + tableMapping.ColumnMappings.Add("WeeklyTotalSales", "WeeklyTotalSales"); + tableMapping.ColumnMappings.Add("Fk_DateID", "Fk_DateID"); + this._adapter.TableMappings.Add(tableMapping); + this._adapter.DeleteCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.DeleteCommand.Connection = this.Connection; + this._adapter.DeleteCommand.CommandText = @"DELETE FROM `WeeklySales` WHERE ((`WeeklyID` = ?) AND ((? = 1 AND `Sunday` IS NULL) OR (`Sunday` = ?)) AND ((? = 1 AND `Monday` IS NULL) OR (`Monday` = ?)) AND ((? = 1 AND `Tuesday` IS NULL) OR (`Tuesday` = ?)) AND ((? = 1 AND `Wednesday` IS NULL) OR (`Wednesday` = ?)) AND ((? = 1 AND `Thursday` IS NULL) OR (`Thursday` = ?)) AND ((? = 1 AND `Friday` IS NULL) OR (`Friday` = ?)) AND ((? = 1 AND `Saturday` IS NULL) OR (`Saturday` = ?)) AND ((? = 1 AND `WeeklyTotalSales` IS NULL) OR (`WeeklyTotalSales` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)))"; + this._adapter.DeleteCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_WeeklyID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "WeeklyID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Sunday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Sunday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Sunday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Sunday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Monday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Monday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Monday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Monday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Tuesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Tuesday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Tuesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Tuesday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Wednesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wednesday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Wednesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wednesday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Thursday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Thursday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Thursday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Thursday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Friday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Friday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Friday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Friday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Saturday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Saturday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Saturday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Saturday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_WeeklyTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "WeeklyTotalSales", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_WeeklyTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "WeeklyTotalSales", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.DeleteCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.InsertCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.InsertCommand.Connection = this.Connection; + this._adapter.InsertCommand.CommandText = "INSERT INTO `WeeklySales` (`Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`" + + ", `Friday`, `Saturday`, `WeeklyTotalSales`, `Fk_DateID`) VALUES (?, ?, ?, ?, ?, " + + "?, ?, ?, ?)"; + this._adapter.InsertCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Sunday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Sunday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Monday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Monday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Tuesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Tuesday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Wednesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wednesday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Thursday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Thursday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Friday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Friday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Saturday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Saturday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("WeeklyTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "WeeklyTotalSales", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.InsertCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand = new global::System.Data.OleDb.OleDbCommand(); + this._adapter.UpdateCommand.Connection = this.Connection; + this._adapter.UpdateCommand.CommandText = @"UPDATE `WeeklySales` SET `Sunday` = ?, `Monday` = ?, `Tuesday` = ?, `Wednesday` = ?, `Thursday` = ?, `Friday` = ?, `Saturday` = ?, `WeeklyTotalSales` = ?, `Fk_DateID` = ? WHERE ((`WeeklyID` = ?) AND ((? = 1 AND `Sunday` IS NULL) OR (`Sunday` = ?)) AND ((? = 1 AND `Monday` IS NULL) OR (`Monday` = ?)) AND ((? = 1 AND `Tuesday` IS NULL) OR (`Tuesday` = ?)) AND ((? = 1 AND `Wednesday` IS NULL) OR (`Wednesday` = ?)) AND ((? = 1 AND `Thursday` IS NULL) OR (`Thursday` = ?)) AND ((? = 1 AND `Friday` IS NULL) OR (`Friday` = ?)) AND ((? = 1 AND `Saturday` IS NULL) OR (`Saturday` = ?)) AND ((? = 1 AND `WeeklyTotalSales` IS NULL) OR (`WeeklyTotalSales` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)))"; + this._adapter.UpdateCommand.CommandType = global::System.Data.CommandType.Text; + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Sunday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Sunday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Monday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Monday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Tuesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Tuesday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Wednesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wednesday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Thursday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Thursday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Friday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Friday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Saturday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Saturday", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("WeeklyTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "WeeklyTotalSales", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_WeeklyID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "WeeklyID", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Sunday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Sunday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Sunday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Sunday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Monday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Monday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Monday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Monday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Tuesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Tuesday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Tuesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Tuesday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Wednesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wednesday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Wednesday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Wednesday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Thursday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Thursday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Thursday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Thursday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Friday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Friday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Friday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Friday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Saturday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Saturday", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Saturday", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Saturday", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_WeeklyTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "WeeklyTotalSales", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_WeeklyTotalSales", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "WeeklyTotalSales", global::System.Data.DataRowVersion.Original, false, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("IsNull_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Original, true, null)); + this._adapter.UpdateCommand.Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Original_Fk_DateID", global::System.Data.OleDb.OleDbType.Integer, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", 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.OleDb.OleDbConnection(); + this._connection.ConnectionString = global::AdvertsingProfitControl.Properties.Settings.Default.apc___CopyConnectionString2; + } + + [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.OleDb.OleDbCommand[2]; + this._commandCollection[0] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[0].Connection = this.Connection; + this._commandCollection[0].CommandText = "SELECT WeeklyID, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, " + + "WeeklyTotalSales, Fk_DateID FROM WeeklySales"; + this._commandCollection[0].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1] = new global::System.Data.OleDb.OleDbCommand(); + this._commandCollection[1].Connection = this.Connection; + this._commandCollection[1].CommandText = "SELECT Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, WeeklyTota" + + "lSales\r\nFROM WeeklySales\r\nWHERE Fk_DateID = ?"; + this._commandCollection[1].CommandType = global::System.Data.CommandType.Text; + this._commandCollection[1].Parameters.Add(new global::System.Data.OleDb.OleDbParameter("Fk_DateID", global::System.Data.OleDb.OleDbType.VarWChar, 0, global::System.Data.ParameterDirection.Input, ((byte)(0)), ((byte)(0)), "Fk_DateID", global::System.Data.DataRowVersion.Current, false, null)); + } + + [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(apcDatabase.WeeklySalesDataTable 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 apcDatabase.WeeklySalesDataTable GetData() { + this.Adapter.SelectCommand = this.CommandCollection[0]; + apcDatabase.WeeklySalesDataTable dataTable = new apcDatabase.WeeklySalesDataTable(); + 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")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Select, false)] + public virtual apcDatabase.WeeklySalesDataTable GetDataByDateID(string Fk_DateID) { + this.Adapter.SelectCommand = this.CommandCollection[1]; + if ((Fk_DateID == null)) { + this.Adapter.SelectCommand.Parameters[0].Value = global::System.DBNull.Value; + } + else { + this.Adapter.SelectCommand.Parameters[0].Value = ((string)(Fk_DateID)); + } + apcDatabase.WeeklySalesDataTable dataTable = new apcDatabase.WeeklySalesDataTable(); + 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(apcDatabase.WeeklySalesDataTable 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(apcDatabase dataSet) { + return this.Adapter.Update(dataSet, "WeeklySales"); + } + + [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_WeeklyID, global::System.Nullable Original_Sunday, global::System.Nullable Original_Monday, global::System.Nullable Original_Tuesday, global::System.Nullable Original_Wednesday, global::System.Nullable Original_Thursday, global::System.Nullable Original_Friday, global::System.Nullable Original_Saturday, global::System.Nullable Original_WeeklyTotalSales, global::System.Nullable Original_Fk_DateID) { + this.Adapter.DeleteCommand.Parameters[0].Value = ((int)(Original_WeeklyID)); + if ((Original_Sunday.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[2].Value = ((int)(Original_Sunday.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[1].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Original_Monday.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[4].Value = ((int)(Original_Monday.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[3].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Original_Tuesday.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[6].Value = ((int)(Original_Tuesday.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[5].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((Original_Wednesday.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[8].Value = ((int)(Original_Wednesday.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[7].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[8].Value = global::System.DBNull.Value; + } + if ((Original_Thursday.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[10].Value = ((int)(Original_Thursday.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[9].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[10].Value = global::System.DBNull.Value; + } + if ((Original_Friday.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[12].Value = ((int)(Original_Friday.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[11].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[12].Value = global::System.DBNull.Value; + } + if ((Original_Saturday.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[14].Value = ((int)(Original_Saturday.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[13].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[14].Value = global::System.DBNull.Value; + } + if ((Original_WeeklyTotalSales.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[16].Value = ((int)(Original_WeeklyTotalSales.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[15].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[16].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(0)); + this.Adapter.DeleteCommand.Parameters[18].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.DeleteCommand.Parameters[17].Value = ((object)(1)); + this.Adapter.DeleteCommand.Parameters[18].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.DeleteCommand.Connection.State; + if (((this.Adapter.DeleteCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.DeleteCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.DeleteCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.DeleteCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Insert, true)] + public virtual int Insert(global::System.Nullable Sunday, global::System.Nullable Monday, global::System.Nullable Tuesday, global::System.Nullable Wednesday, global::System.Nullable Thursday, global::System.Nullable Friday, global::System.Nullable Saturday, global::System.Nullable WeeklyTotalSales, global::System.Nullable Fk_DateID) { + if ((Sunday.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[0].Value = ((int)(Sunday.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((Monday.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[1].Value = ((int)(Monday.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((Tuesday.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[2].Value = ((int)(Tuesday.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Wednesday.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[3].Value = ((int)(Wednesday.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((Thursday.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[4].Value = ((int)(Thursday.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Friday.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[5].Value = ((int)(Friday.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((Saturday.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[6].Value = ((int)(Saturday.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((WeeklyTotalSales.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[7].Value = ((int)(WeeklyTotalSales.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[7].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.InsertCommand.Parameters[8].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.InsertCommand.Parameters[8].Value = global::System.DBNull.Value; + } + global::System.Data.ConnectionState previousConnectionState = this.Adapter.InsertCommand.Connection.State; + if (((this.Adapter.InsertCommand.Connection.State & global::System.Data.ConnectionState.Open) + != global::System.Data.ConnectionState.Open)) { + this.Adapter.InsertCommand.Connection.Open(); + } + try { + int returnValue = this.Adapter.InsertCommand.ExecuteNonQuery(); + return returnValue; + } + finally { + if ((previousConnectionState == global::System.Data.ConnectionState.Closed)) { + this.Adapter.InsertCommand.Connection.Close(); + } + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + [global::System.ComponentModel.Design.HelpKeywordAttribute("vs.data.TableAdapter")] + [global::System.ComponentModel.DataObjectMethodAttribute(global::System.ComponentModel.DataObjectMethodType.Update, true)] + public virtual int Update( + global::System.Nullable Sunday, + global::System.Nullable Monday, + global::System.Nullable Tuesday, + global::System.Nullable Wednesday, + global::System.Nullable Thursday, + global::System.Nullable Friday, + global::System.Nullable Saturday, + global::System.Nullable WeeklyTotalSales, + global::System.Nullable Fk_DateID, + int Original_WeeklyID, + global::System.Nullable Original_Sunday, + global::System.Nullable Original_Monday, + global::System.Nullable Original_Tuesday, + global::System.Nullable Original_Wednesday, + global::System.Nullable Original_Thursday, + global::System.Nullable Original_Friday, + global::System.Nullable Original_Saturday, + global::System.Nullable Original_WeeklyTotalSales, + global::System.Nullable Original_Fk_DateID) { + if ((Sunday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[0].Value = ((int)(Sunday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[0].Value = global::System.DBNull.Value; + } + if ((Monday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[1].Value = ((int)(Monday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[1].Value = global::System.DBNull.Value; + } + if ((Tuesday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[2].Value = ((int)(Tuesday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[2].Value = global::System.DBNull.Value; + } + if ((Wednesday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[3].Value = ((int)(Wednesday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[3].Value = global::System.DBNull.Value; + } + if ((Thursday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[4].Value = ((int)(Thursday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[4].Value = global::System.DBNull.Value; + } + if ((Friday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[5].Value = ((int)(Friday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[5].Value = global::System.DBNull.Value; + } + if ((Saturday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[6].Value = ((int)(Saturday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[6].Value = global::System.DBNull.Value; + } + if ((WeeklyTotalSales.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[7].Value = ((int)(WeeklyTotalSales.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[7].Value = global::System.DBNull.Value; + } + if ((Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[8].Value = ((int)(Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[8].Value = global::System.DBNull.Value; + } + this.Adapter.UpdateCommand.Parameters[9].Value = ((int)(Original_WeeklyID)); + if ((Original_Sunday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[11].Value = ((int)(Original_Sunday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[10].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[11].Value = global::System.DBNull.Value; + } + if ((Original_Monday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[13].Value = ((int)(Original_Monday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[12].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[13].Value = global::System.DBNull.Value; + } + if ((Original_Tuesday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[15].Value = ((int)(Original_Tuesday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[14].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[15].Value = global::System.DBNull.Value; + } + if ((Original_Wednesday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[17].Value = ((int)(Original_Wednesday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[16].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[17].Value = global::System.DBNull.Value; + } + if ((Original_Thursday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[19].Value = ((int)(Original_Thursday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[18].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[19].Value = global::System.DBNull.Value; + } + if ((Original_Friday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[21].Value = ((int)(Original_Friday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[20].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[21].Value = global::System.DBNull.Value; + } + if ((Original_Saturday.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[23].Value = ((int)(Original_Saturday.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[22].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[23].Value = global::System.DBNull.Value; + } + if ((Original_WeeklyTotalSales.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[25].Value = ((int)(Original_WeeklyTotalSales.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[24].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[25].Value = global::System.DBNull.Value; + } + if ((Original_Fk_DateID.HasValue == true)) { + this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(0)); + this.Adapter.UpdateCommand.Parameters[27].Value = ((int)(Original_Fk_DateID.Value)); + } + else { + this.Adapter.UpdateCommand.Parameters[26].Value = ((object)(1)); + this.Adapter.UpdateCommand.Parameters[27].Value = global::System.DBNull.Value; + } + 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(); + } + } + } + } + + /// + ///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 ActualSalesTableAdapter _actualSalesTableAdapter; + + private AdItemTableAdapter _adItemTableAdapter; + + private CommentTableAdapter _commentTableAdapter; + + private InventoryTableAdapter _inventoryTableAdapter; + + private InvoiceTableAdapter _invoiceTableAdapter; + + private ProjectedSalesTableAdapter _projectedSalesTableAdapter; + + private SupplierTableAdapter _supplierTableAdapter; + + private WeekEndingDateTableAdapter _weekEndingDateTableAdapter; + + private WeeklySalesTableAdapter _weeklySalesTableAdapter; + + 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 ActualSalesTableAdapter ActualSalesTableAdapter { + get { + return this._actualSalesTableAdapter; + } + set { + this._actualSalesTableAdapter = 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 AdItemTableAdapter AdItemTableAdapter { + get { + return this._adItemTableAdapter; + } + set { + this._adItemTableAdapter = 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 CommentTableAdapter CommentTableAdapter { + get { + return this._commentTableAdapter; + } + set { + this._commentTableAdapter = 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 InventoryTableAdapter InventoryTableAdapter { + get { + return this._inventoryTableAdapter; + } + set { + this._inventoryTableAdapter = 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 InvoiceTableAdapter InvoiceTableAdapter { + get { + return this._invoiceTableAdapter; + } + set { + this._invoiceTableAdapter = 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 ProjectedSalesTableAdapter ProjectedSalesTableAdapter { + get { + return this._projectedSalesTableAdapter; + } + set { + this._projectedSalesTableAdapter = 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 SupplierTableAdapter SupplierTableAdapter { + get { + return this._supplierTableAdapter; + } + set { + this._supplierTableAdapter = 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 WeekEndingDateTableAdapter WeekEndingDateTableAdapter { + get { + return this._weekEndingDateTableAdapter; + } + set { + this._weekEndingDateTableAdapter = 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 WeeklySalesTableAdapter WeeklySalesTableAdapter { + get { + return this._weeklySalesTableAdapter; + } + set { + this._weeklySalesTableAdapter = 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._actualSalesTableAdapter != null) + && (this._actualSalesTableAdapter.Connection != null))) { + return this._actualSalesTableAdapter.Connection; + } + if (((this._adItemTableAdapter != null) + && (this._adItemTableAdapter.Connection != null))) { + return this._adItemTableAdapter.Connection; + } + if (((this._commentTableAdapter != null) + && (this._commentTableAdapter.Connection != null))) { + return this._commentTableAdapter.Connection; + } + if (((this._inventoryTableAdapter != null) + && (this._inventoryTableAdapter.Connection != null))) { + return this._inventoryTableAdapter.Connection; + } + if (((this._invoiceTableAdapter != null) + && (this._invoiceTableAdapter.Connection != null))) { + return this._invoiceTableAdapter.Connection; + } + if (((this._projectedSalesTableAdapter != null) + && (this._projectedSalesTableAdapter.Connection != null))) { + return this._projectedSalesTableAdapter.Connection; + } + if (((this._supplierTableAdapter != null) + && (this._supplierTableAdapter.Connection != null))) { + return this._supplierTableAdapter.Connection; + } + if (((this._weekEndingDateTableAdapter != null) + && (this._weekEndingDateTableAdapter.Connection != null))) { + return this._weekEndingDateTableAdapter.Connection; + } + if (((this._weeklySalesTableAdapter != null) + && (this._weeklySalesTableAdapter.Connection != null))) { + return this._weeklySalesTableAdapter.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._actualSalesTableAdapter != null)) { + count = (count + 1); + } + if ((this._adItemTableAdapter != null)) { + count = (count + 1); + } + if ((this._commentTableAdapter != null)) { + count = (count + 1); + } + if ((this._inventoryTableAdapter != null)) { + count = (count + 1); + } + if ((this._invoiceTableAdapter != null)) { + count = (count + 1); + } + if ((this._projectedSalesTableAdapter != null)) { + count = (count + 1); + } + if ((this._supplierTableAdapter != null)) { + count = (count + 1); + } + if ((this._weekEndingDateTableAdapter != null)) { + count = (count + 1); + } + if ((this._weeklySalesTableAdapter != 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(apcDatabase dataSet, global::System.Collections.Generic.List allChangedRows, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._adItemTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.AdItem.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._adItemTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._supplierTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Supplier.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._supplierTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._weekEndingDateTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.WeekEndingDate.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._weekEndingDateTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._actualSalesTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ActualSales.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._actualSalesTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._commentTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Comment.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._commentTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._inventoryTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Inventory.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._inventoryTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._invoiceTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.Invoice.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._invoiceTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._projectedSalesTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.ProjectedSales.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._projectedSalesTableAdapter.Update(updatedRows)); + allChangedRows.AddRange(updatedRows); + } + } + if ((this._weeklySalesTableAdapter != null)) { + global::System.Data.DataRow[] updatedRows = dataSet.WeeklySales.Select(null, null, global::System.Data.DataViewRowState.ModifiedCurrent); + updatedRows = this.GetRealUpdatedRows(updatedRows, allAddedRows); + if (((updatedRows != null) + && (0 < updatedRows.Length))) { + result = (result + this._weeklySalesTableAdapter.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(apcDatabase dataSet, global::System.Collections.Generic.List allAddedRows) { + int result = 0; + if ((this._adItemTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.AdItem.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._adItemTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._supplierTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Supplier.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._supplierTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._weekEndingDateTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.WeekEndingDate.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._weekEndingDateTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._actualSalesTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ActualSales.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._actualSalesTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._commentTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Comment.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._commentTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._inventoryTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Inventory.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._inventoryTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._invoiceTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.Invoice.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._invoiceTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._projectedSalesTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.ProjectedSales.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._projectedSalesTableAdapter.Update(addedRows)); + allAddedRows.AddRange(addedRows); + } + } + if ((this._weeklySalesTableAdapter != null)) { + global::System.Data.DataRow[] addedRows = dataSet.WeeklySales.Select(null, null, global::System.Data.DataViewRowState.Added); + if (((addedRows != null) + && (0 < addedRows.Length))) { + result = (result + this._weeklySalesTableAdapter.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(apcDatabase dataSet, global::System.Collections.Generic.List allChangedRows) { + int result = 0; + if ((this._weeklySalesTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.WeeklySales.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._weeklySalesTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._projectedSalesTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ProjectedSales.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._projectedSalesTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._invoiceTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Invoice.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._invoiceTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._inventoryTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Inventory.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._inventoryTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._commentTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Comment.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._commentTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._actualSalesTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.ActualSales.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._actualSalesTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._weekEndingDateTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.WeekEndingDate.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._weekEndingDateTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._supplierTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.Supplier.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._supplierTableAdapter.Update(deletedRows)); + allChangedRows.AddRange(deletedRows); + } + } + if ((this._adItemTableAdapter != null)) { + global::System.Data.DataRow[] deletedRows = dataSet.AdItem.Select(null, null, global::System.Data.DataViewRowState.Deleted); + if (((deletedRows != null) + && (0 < deletedRows.Length))) { + result = (result + this._adItemTableAdapter.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(apcDatabase dataSet) { + if ((dataSet == null)) { + throw new global::System.ArgumentNullException("dataSet"); + } + if ((dataSet.HasChanges() == false)) { + return 0; + } + if (((this._actualSalesTableAdapter != null) + && (this.MatchTableAdapterConnection(this._actualSalesTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._adItemTableAdapter != null) + && (this.MatchTableAdapterConnection(this._adItemTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._commentTableAdapter != null) + && (this.MatchTableAdapterConnection(this._commentTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._inventoryTableAdapter != null) + && (this.MatchTableAdapterConnection(this._inventoryTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._invoiceTableAdapter != null) + && (this.MatchTableAdapterConnection(this._invoiceTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._projectedSalesTableAdapter != null) + && (this.MatchTableAdapterConnection(this._projectedSalesTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._supplierTableAdapter != null) + && (this.MatchTableAdapterConnection(this._supplierTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._weekEndingDateTableAdapter != null) + && (this.MatchTableAdapterConnection(this._weekEndingDateTableAdapter.Connection) == false))) { + throw new global::System.ArgumentException("All TableAdapters managed by a TableAdapterManager must use the same connection s" + + "tring."); + } + if (((this._weeklySalesTableAdapter != null) + && (this.MatchTableAdapterConnection(this._weeklySalesTableAdapter.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 revertConnections = new global::System.Collections.Generic.Dictionary(); + int result = 0; + global::System.Data.DataSet backupDataSet = null; + if (this.BackupDataSetBeforeUpdate) { + backupDataSet = new global::System.Data.DataSet(); + backupDataSet.Merge(dataSet); + } + try { + // ---- Prepare for update ----------- + // + if ((this._actualSalesTableAdapter != null)) { + revertConnections.Add(this._actualSalesTableAdapter, this._actualSalesTableAdapter.Connection); + this._actualSalesTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(workConnection)); + this._actualSalesTableAdapter.Transaction = ((global::System.Data.OleDb.OleDbTransaction)(workTransaction)); + if (this._actualSalesTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._actualSalesTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._actualSalesTableAdapter.Adapter); + } + } + if ((this._adItemTableAdapter != null)) { + revertConnections.Add(this._adItemTableAdapter, this._adItemTableAdapter.Connection); + this._adItemTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(workConnection)); + this._adItemTableAdapter.Transaction = ((global::System.Data.OleDb.OleDbTransaction)(workTransaction)); + if (this._adItemTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._adItemTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._adItemTableAdapter.Adapter); + } + } + if ((this._commentTableAdapter != null)) { + revertConnections.Add(this._commentTableAdapter, this._commentTableAdapter.Connection); + this._commentTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(workConnection)); + this._commentTableAdapter.Transaction = ((global::System.Data.OleDb.OleDbTransaction)(workTransaction)); + if (this._commentTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._commentTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._commentTableAdapter.Adapter); + } + } + if ((this._inventoryTableAdapter != null)) { + revertConnections.Add(this._inventoryTableAdapter, this._inventoryTableAdapter.Connection); + this._inventoryTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(workConnection)); + this._inventoryTableAdapter.Transaction = ((global::System.Data.OleDb.OleDbTransaction)(workTransaction)); + if (this._inventoryTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._inventoryTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._inventoryTableAdapter.Adapter); + } + } + if ((this._invoiceTableAdapter != null)) { + revertConnections.Add(this._invoiceTableAdapter, this._invoiceTableAdapter.Connection); + this._invoiceTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(workConnection)); + this._invoiceTableAdapter.Transaction = ((global::System.Data.OleDb.OleDbTransaction)(workTransaction)); + if (this._invoiceTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._invoiceTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._invoiceTableAdapter.Adapter); + } + } + if ((this._projectedSalesTableAdapter != null)) { + revertConnections.Add(this._projectedSalesTableAdapter, this._projectedSalesTableAdapter.Connection); + this._projectedSalesTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(workConnection)); + this._projectedSalesTableAdapter.Transaction = ((global::System.Data.OleDb.OleDbTransaction)(workTransaction)); + if (this._projectedSalesTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._projectedSalesTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._projectedSalesTableAdapter.Adapter); + } + } + if ((this._supplierTableAdapter != null)) { + revertConnections.Add(this._supplierTableAdapter, this._supplierTableAdapter.Connection); + this._supplierTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(workConnection)); + this._supplierTableAdapter.Transaction = ((global::System.Data.OleDb.OleDbTransaction)(workTransaction)); + if (this._supplierTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._supplierTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._supplierTableAdapter.Adapter); + } + } + if ((this._weekEndingDateTableAdapter != null)) { + revertConnections.Add(this._weekEndingDateTableAdapter, this._weekEndingDateTableAdapter.Connection); + this._weekEndingDateTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(workConnection)); + this._weekEndingDateTableAdapter.Transaction = ((global::System.Data.OleDb.OleDbTransaction)(workTransaction)); + if (this._weekEndingDateTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._weekEndingDateTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._weekEndingDateTableAdapter.Adapter); + } + } + if ((this._weeklySalesTableAdapter != null)) { + revertConnections.Add(this._weeklySalesTableAdapter, this._weeklySalesTableAdapter.Connection); + this._weeklySalesTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(workConnection)); + this._weeklySalesTableAdapter.Transaction = ((global::System.Data.OleDb.OleDbTransaction)(workTransaction)); + if (this._weeklySalesTableAdapter.Adapter.AcceptChangesDuringUpdate) { + this._weeklySalesTableAdapter.Adapter.AcceptChangesDuringUpdate = false; + adaptersWithAcceptChangesDuringUpdate.Add(this._weeklySalesTableAdapter.Adapter); + } + } + // + //---- Perform updates ----------- + // + if ((this.UpdateOrder == UpdateOrderOption.UpdateInsertDelete)) { + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + } + else { + result = (result + this.UpdateInsertedRows(dataSet, allAddedRows)); + result = (result + this.UpdateUpdatedRows(dataSet, allChangedRows, allAddedRows)); + } + result = (result + this.UpdateDeletedRows(dataSet, allChangedRows)); + // + //---- Commit updates ----------- + // + workTransaction.Commit(); + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + if ((0 < allChangedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allChangedRows.Count]; + allChangedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + } + } + } + catch (global::System.Exception ex) { + workTransaction.Rollback(); + // ---- Restore the dataset ----------- + if (this.BackupDataSetBeforeUpdate) { + global::System.Diagnostics.Debug.Assert((backupDataSet != null)); + dataSet.Clear(); + dataSet.Merge(backupDataSet); + } + else { + if ((0 < allAddedRows.Count)) { + global::System.Data.DataRow[] rows = new System.Data.DataRow[allAddedRows.Count]; + allAddedRows.CopyTo(rows); + for (int i = 0; (i < rows.Length); i = (i + 1)) { + global::System.Data.DataRow row = rows[i]; + row.AcceptChanges(); + row.SetAdded(); + } + } + } + throw ex; + } + finally { + if (workConnOpened) { + workConnection.Close(); + } + if ((this._actualSalesTableAdapter != null)) { + this._actualSalesTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(revertConnections[this._actualSalesTableAdapter])); + this._actualSalesTableAdapter.Transaction = null; + } + if ((this._adItemTableAdapter != null)) { + this._adItemTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(revertConnections[this._adItemTableAdapter])); + this._adItemTableAdapter.Transaction = null; + } + if ((this._commentTableAdapter != null)) { + this._commentTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(revertConnections[this._commentTableAdapter])); + this._commentTableAdapter.Transaction = null; + } + if ((this._inventoryTableAdapter != null)) { + this._inventoryTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(revertConnections[this._inventoryTableAdapter])); + this._inventoryTableAdapter.Transaction = null; + } + if ((this._invoiceTableAdapter != null)) { + this._invoiceTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(revertConnections[this._invoiceTableAdapter])); + this._invoiceTableAdapter.Transaction = null; + } + if ((this._projectedSalesTableAdapter != null)) { + this._projectedSalesTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(revertConnections[this._projectedSalesTableAdapter])); + this._projectedSalesTableAdapter.Transaction = null; + } + if ((this._supplierTableAdapter != null)) { + this._supplierTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(revertConnections[this._supplierTableAdapter])); + this._supplierTableAdapter.Transaction = null; + } + if ((this._weekEndingDateTableAdapter != null)) { + this._weekEndingDateTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(revertConnections[this._weekEndingDateTableAdapter])); + this._weekEndingDateTableAdapter.Transaction = null; + } + if ((this._weeklySalesTableAdapter != null)) { + this._weeklySalesTableAdapter.Connection = ((global::System.Data.OleDb.OleDbConnection)(revertConnections[this._weeklySalesTableAdapter])); + this._weeklySalesTableAdapter.Transaction = null; + } + if ((0 < adaptersWithAcceptChangesDuringUpdate.Count)) { + global::System.Data.Common.DataAdapter[] adapters = new System.Data.Common.DataAdapter[adaptersWithAcceptChangesDuringUpdate.Count]; + adaptersWithAcceptChangesDuringUpdate.CopyTo(adapters); + for (int i = 0; (i < adapters.Length); i = (i + 1)) { + global::System.Data.Common.DataAdapter adapter = adapters[i]; + adapter.AcceptChangesDuringUpdate = true; + } + } + } + return result; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected virtual void SortSelfReferenceRows(global::System.Data.DataRow[] rows, global::System.Data.DataRelation relation, bool childFirst) { + global::System.Array.Sort(rows, new SelfReferenceComparer(relation, childFirst)); + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + protected virtual bool MatchTableAdapterConnection(global::System.Data.IDbConnection inputConnection) { + if ((this._connection != null)) { + return true; + } + if (((this.Connection == null) + || (inputConnection == null))) { + return true; + } + if (string.Equals(this.Connection.ConnectionString, inputConnection.ConnectionString, global::System.StringComparison.Ordinal)) { + return true; + } + return false; + } + + /// + ///Update Order Option + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public enum UpdateOrderOption { + + InsertUpdateDelete = 0, + + UpdateInsertDelete = 1, + } + + /// + ///Used to sort self-referenced table's rows + /// + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private class SelfReferenceComparer : object, global::System.Collections.Generic.IComparer { + + private global::System.Data.DataRelation _relation; + + private int _childFirst; + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + internal SelfReferenceComparer(global::System.Data.DataRelation relation, bool childFirst) { + this._relation = relation; + if (childFirst) { + this._childFirst = -1; + } + else { + this._childFirst = 1; + } + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + private global::System.Data.DataRow GetRoot(global::System.Data.DataRow row, out int distance) { + global::System.Diagnostics.Debug.Assert((row != null)); + global::System.Data.DataRow root = row; + distance = 0; + + global::System.Collections.Generic.IDictionary traversedRows = new global::System.Collections.Generic.Dictionary(); + traversedRows[row] = row; + + global::System.Data.DataRow parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + for ( + ; ((parent != null) + && (traversedRows.ContainsKey(parent) == false)); + ) { + distance = (distance + 1); + root = parent; + traversedRows[parent] = parent; + parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Default); + } + + if ((distance == 0)) { + traversedRows.Clear(); + traversedRows[row] = row; + parent = row.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); + for ( + ; ((parent != null) + && (traversedRows.ContainsKey(parent) == false)); + ) { + distance = (distance + 1); + root = parent; + traversedRows[parent] = parent; + parent = parent.GetParentRow(this._relation, global::System.Data.DataRowVersion.Original); + } + } + + return root; + } + + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Data.Design.TypedDataSetGenerator", "4.0.0.0")] + public int Compare(global::System.Data.DataRow row1, global::System.Data.DataRow row2) { + if (object.ReferenceEquals(row1, row2)) { + return 0; + } + if ((row1 == null)) { + return -1; + } + if ((row2 == null)) { + return 1; + } + + int distance1 = 0; + global::System.Data.DataRow root1 = this.GetRoot(row1, out distance1); + + int distance2 = 0; + global::System.Data.DataRow root2 = this.GetRoot(row2, out distance2); + + if (object.ReferenceEquals(root1, root2)) { + return (this._childFirst * distance1.CompareTo(distance2)); + } + else { + global::System.Diagnostics.Debug.Assert(((root1.Table != null) + && (root2.Table != null))); + if ((root1.Table.Rows.IndexOf(root1) < root2.Table.Rows.IndexOf(root2))) { + return -1; + } + else { + return 1; + } + } + } + } + } +} + +#pragma warning restore 1591 \ No newline at end of file diff --git a/AdvertsingProfitControl/apcDatabase.accdb b/AdvertsingProfitControl/apcDatabase.accdb new file mode 100644 index 0000000..745e1a0 Binary files /dev/null and b/AdvertsingProfitControl/apcDatabase.accdb differ diff --git a/AdvertsingProfitControl/apcDatabase.cs b/AdvertsingProfitControl/apcDatabase.cs new file mode 100644 index 0000000..16f2e1c --- /dev/null +++ b/AdvertsingProfitControl/apcDatabase.cs @@ -0,0 +1,6 @@ +namespace AdvertsingProfitControl { + + + public partial class apcDatabase { + } +} diff --git a/AdvertsingProfitControl/apcDatabase.xsc b/AdvertsingProfitControl/apcDatabase.xsc new file mode 100644 index 0000000..551fc56 --- /dev/null +++ b/AdvertsingProfitControl/apcDatabase.xsc @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/AdvertsingProfitControl/apcDatabase.xsd b/AdvertsingProfitControl/apcDatabase.xsd new file mode 100644 index 0000000..4c6e393 --- /dev/null +++ b/AdvertsingProfitControl/apcDatabase.xsd @@ -0,0 +1,1037 @@ + + + + + + + + + + + + + + + DELETE FROM `ActualSales` WHERE ((`AcID` = ?) AND ((? = 1 AND `AcSold` IS NULL) OR (`AcSold` = ?)) AND ((? = 1 AND `AcSalePrice` IS NULL) OR (`AcSalePrice` = ?)) AND ((? = 1 AND `AcTotalSales` IS NULL) OR (`AcTotalSales` = ?)) AND ((? = 1 AND `AcCost` IS NULL) OR (`AcCost` = ?)) AND ((? = 1 AND `AcProfitReturn` IS NULL) OR (`AcProfitReturn` = ?)) AND ((? = 1 AND `AcTotalProfitReturn` IS NULL) OR (`AcTotalProfitReturn` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?))) + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO `ActualSales` (`AcSold`, `AcSalePrice`, `AcTotalSales`, `AcCost`, `AcProfitReturn`, `AcTotalProfitReturn`, `Fk_DateID`, `Fk_AdItemID`) VALUES (?, ?, ?, ?, ?, ?, ?, ?) + + + + + + + + + + + + + + + SELECT AcID, AcSold, AcSalePrice, AcTotalSales, AcCost, AcProfitReturn, AcTotalProfitReturn, Fk_DateID, Fk_AdItemID FROM ActualSales + + + + + + UPDATE `ActualSales` SET `AcSold` = ?, `AcSalePrice` = ?, `AcTotalSales` = ?, `AcCost` = ?, `AcProfitReturn` = ?, `AcTotalProfitReturn` = ?, `Fk_DateID` = ?, `Fk_AdItemID` = ? WHERE ((`AcID` = ?) AND ((? = 1 AND `AcSold` IS NULL) OR (`AcSold` = ?)) AND ((? = 1 AND `AcSalePrice` IS NULL) OR (`AcSalePrice` = ?)) AND ((? = 1 AND `AcTotalSales` IS NULL) OR (`AcTotalSales` = ?)) AND ((? = 1 AND `AcCost` IS NULL) OR (`AcCost` = ?)) AND ((? = 1 AND `AcProfitReturn` IS NULL) OR (`AcProfitReturn` = ?)) AND ((? = 1 AND `AcTotalProfitReturn` IS NULL) OR (`AcTotalProfitReturn` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?))) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT AcSold, AcSalePrice, AcTotalSales, AcCost, AcProfitReturn, AcTotalProfitReturn, Fk_AdItemID +FROM ActualSales +WHERE (Fk_DateID = ?) + + + + + + + + + + SELECT AdItem.AdItem, Inventory.InvBeginingInventory, Inventory.InvRecieved, Inventory.InvTotal, Inventory.InvEnding, ActualSales.AcSold, ActualSales.AcSalePrice, + ActualSales.AcTotalSales, ActualSales.AcCost, ActualSales.AcProfitReturn, ActualSales.AcTotalProfitReturn +FROM ((AdItem INNER JOIN + Inventory ON AdItem.AdItemID = Inventory.Fk_AdItemID) INNER JOIN + ActualSales ON Inventory.Fk_AdItemID = ActualSales.Fk_AdItemID) +WHERE (Inventory.Fk_DateID = ?) + + + + + + + + + + SELECT AdItem.AdItem, ActualSales.AcSold, ActualSales.AcSalePrice, ActualSales.AcTotalSales, ActualSales.AcCost, ActualSales.AcProfitReturn, + ActualSales.AcTotalProfitReturn +FROM (AdItem INNER JOIN + ActualSales ON AdItem.AdItemID = ActualSales.Fk_AdItemID) +WHERE (ActualSales.Fk_DateID = ?) + + + + + + + + + + + + + + DELETE FROM `AdItem` WHERE ((`AdItemID` = ?) AND ((? = 1 AND `AdItem` IS NULL) OR (`AdItem` = ?))) + + + + + + + + + + INSERT INTO `AdItem` (`AdItem`) VALUES (?) + + + + + + + + SELECT AdItemID, AdItem FROM AdItem + + + + + + UPDATE `AdItem` SET `AdItem` = ? WHERE ((`AdItemID` = ?) AND ((? = 1 AND `AdItem` IS NULL) OR (`AdItem` = ?))) + + + + + + + + + + + + + + + + + + + SELECT AdItem.AdItem +FROM ((AdItem INNER JOIN + ProjectedSales ON AdItem.AdItemID = ProjectedSales.Fk_AdItemID) INNER JOIN + WeekEndingDate ON ProjectedSales.Fk_DateID = WeekEndingDate.DateID) +WHERE (WeekEndingDate.DateID = ?) + + + + + + + + + + + + + + DELETE FROM `Comment` WHERE ((`CommnetID` = ?) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?))) + + + + + + + + + + INSERT INTO `Comment` (`Comment`, `Fk_DateID`) VALUES (?, ?) + + + + + + + + + SELECT CommnetID, Comment, Fk_DateID FROM Comment + + + + + + UPDATE `Comment` SET `Comment` = ?, `Fk_DateID` = ? WHERE ((`CommnetID` = ?) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?))) + + + + + + + + + + + + + + + + + + + + + SELECT Comment +FROM Comment +WHERE Fk_DateID = ? + + + + + + + + + + + + + + DELETE FROM `Inventory` WHERE ((`InvID` = ?) AND ((? = 1 AND `InvBeginingInventory` IS NULL) OR (`InvBeginingInventory` = ?)) AND ((? = 1 AND `InvRecieved` IS NULL) OR (`InvRecieved` = ?)) AND ((? = 1 AND `InvTotal` IS NULL) OR (`InvTotal` = ?)) AND ((? = 1 AND `InvEnding` IS NULL) OR (`InvEnding` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `InvNote` IS NULL) OR (`InvNote` = ?))) + + + + + + + + + + + + + + + + + + + + + + INSERT INTO `Inventory` (`InvBeginingInventory`, `InvRecieved`, `InvTotal`, `InvEnding`, `Fk_AdItemID`, `Fk_DateID`, `InvNote`) VALUES (?, ?, ?, ?, ?, ?, ?) + + + + + + + + + + + + + + SELECT InvID, InvBeginingInventory, InvRecieved, InvTotal, InvEnding, Fk_AdItemID, Fk_DateID, InvNote FROM Inventory + + + + + + UPDATE `Inventory` SET `InvBeginingInventory` = ?, `InvRecieved` = ?, `InvTotal` = ?, `InvEnding` = ?, `Fk_AdItemID` = ?, `Fk_DateID` = ?, `InvNote` = ? WHERE ((`InvID` = ?) AND ((? = 1 AND `InvBeginingInventory` IS NULL) OR (`InvBeginingInventory` = ?)) AND ((? = 1 AND `InvRecieved` IS NULL) OR (`InvRecieved` = ?)) AND ((? = 1 AND `InvTotal` IS NULL) OR (`InvTotal` = ?)) AND ((? = 1 AND `InvEnding` IS NULL) OR (`InvEnding` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `InvNote` IS NULL) OR (`InvNote` = ?))) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT AdItem.AdItem, Inventory.InvBeginingInventory, Inventory.InvRecieved, Inventory.InvTotal, Inventory.InvEnding +FROM (Inventory INNER JOIN + AdItem ON Inventory.Fk_AdItemID = AdItem.AdItemID) +WHERE (Inventory.Fk_DateID = ?) + + + + + + + + + + + + + + DELETE FROM `Invoice` WHERE ((`InvoiceID` = ?) AND ((? = 1 AND `InvoiceNetAmountAtCost` IS NULL) OR (`InvoiceNetAmountAtCost` = ?)) AND ((? = 1 AND `InvoiceAmountOf` IS NULL) OR (`InvoiceAmountOf` = ?)) AND ((? = 1 AND `InvoiceDate` IS NULL) OR (`InvoiceDate` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_SupplierID` IS NULL) OR (`Fk_SupplierID` = ?)) AND ((? = 1 AND `InvoiceNumber` IS NULL) OR (`InvoiceNumber` = ?)) AND ((? = 1 AND `InvoiceNote` IS NULL) OR (`InvoiceNote` = ?))) + + + + + + + + + + + + + + + + + + + + + + INSERT INTO `Invoice` (`InvoiceNetAmountAtCost`, `InvoiceAmountOf`, `InvoiceDate`, `Fk_DateID`, `Fk_SupplierID`, `InvoiceNumber`, `InvoiceNote`) VALUES (?, ?, ?, ?, ?, ?, ?) + + + + + + + + + + + + + + SELECT InvoiceID, InvoiceNetAmountAtCost, InvoiceAmountOf, InvoiceDate, Fk_DateID, Fk_SupplierID, InvoiceNumber, InvoiceNote FROM Invoice + + + + + + UPDATE `Invoice` SET `InvoiceNetAmountAtCost` = ?, `InvoiceAmountOf` = ?, `InvoiceDate` = ?, `Fk_DateID` = ?, `Fk_SupplierID` = ?, `InvoiceNumber` = ?, `InvoiceNote` = ? WHERE ((`InvoiceID` = ?) AND ((? = 1 AND `InvoiceNetAmountAtCost` IS NULL) OR (`InvoiceNetAmountAtCost` = ?)) AND ((? = 1 AND `InvoiceAmountOf` IS NULL) OR (`InvoiceAmountOf` = ?)) AND ((? = 1 AND `InvoiceDate` IS NULL) OR (`InvoiceDate` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_SupplierID` IS NULL) OR (`Fk_SupplierID` = ?)) AND ((? = 1 AND `InvoiceNumber` IS NULL) OR (`InvoiceNumber` = ?)) AND ((? = 1 AND `InvoiceNote` IS NULL) OR (`InvoiceNote` = ?))) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT InvoiceNetAmountAtCost, InvoiceAmountOf, InvoiceDate, InvoiceNumber, Fk_SupplierID +FROM Invoice +WHERE (Fk_DateID = ?) + + + + + + + + + + + + + + DELETE FROM `ProjectedSales` WHERE ((`PrSalesID` = ?) AND ((? = 1 AND `PrSold` IS NULL) OR (`PrSold` = ?)) AND ((? = 1 AND `PrSalePrice` IS NULL) OR (`PrSalePrice` = ?)) AND ((? = 1 AND `PrProfitReturn` IS NULL) OR (`PrProfitReturn` = ?)) AND ((? = 1 AND `PrTotalProfitReturn` IS NULL) OR (`PrTotalProfitReturn` = ?)) AND ((? = 1 AND `PrTotalSales` IS NULL) OR (`PrTotalSales` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?))) + + + + + + + + + + + + + + + + + + + + + + INSERT INTO `ProjectedSales` (`PrSold`, `PrSalePrice`, `PrProfitReturn`, `PrTotalProfitReturn`, `PrTotalSales`, `Fk_DateID`, `Fk_AdItemID`) VALUES (?, ?, ?, ?, ?, ?, ?) + + + + + + + + + + + + + + SELECT PrSalesID, PrSold, PrSalePrice, PrProfitReturn, PrTotalProfitReturn, PrTotalSales, Fk_DateID, Fk_AdItemID FROM ProjectedSales + + + + + + UPDATE `ProjectedSales` SET `PrSold` = ?, `PrSalePrice` = ?, `PrProfitReturn` = ?, `PrTotalProfitReturn` = ?, `PrTotalSales` = ?, `Fk_DateID` = ?, `Fk_AdItemID` = ? WHERE ((`PrSalesID` = ?) AND ((? = 1 AND `PrSold` IS NULL) OR (`PrSold` = ?)) AND ((? = 1 AND `PrSalePrice` IS NULL) OR (`PrSalePrice` = ?)) AND ((? = 1 AND `PrProfitReturn` IS NULL) OR (`PrProfitReturn` = ?)) AND ((? = 1 AND `PrTotalProfitReturn` IS NULL) OR (`PrTotalProfitReturn` = ?)) AND ((? = 1 AND `PrTotalSales` IS NULL) OR (`PrTotalSales` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?)) AND ((? = 1 AND `Fk_AdItemID` IS NULL) OR (`Fk_AdItemID` = ?))) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT AdItem.AdItem, ProjectedSales.PrSold, ProjectedSales.PrSalePrice, ProjectedSales.PrTotalSales, ProjectedSales.PrCost, ProjectedSales.PrProfitReturn, + ProjectedSales.PrTotalProfitReturn +FROM (AdItem INNER JOIN + ProjectedSales ON AdItem.AdItemID = ProjectedSales.Fk_AdItemID) +WHERE (ProjectedSales.Fk_DateID = ?) + + + + + + + + + + + + + + DELETE FROM `Supplier` WHERE ((`SupplierID` = ?) AND ((? = 1 AND `SupplierName` IS NULL) OR (`SupplierName` = ?))) + + + + + + + + + + INSERT INTO `Supplier` (`SupplierName`) VALUES (?) + + + + + + + + SELECT SupplierID, SupplierName FROM Supplier + + + + + + UPDATE `Supplier` SET `SupplierName` = ? WHERE ((`SupplierID` = ?) AND ((? = 1 AND `SupplierName` IS NULL) OR (`SupplierName` = ?))) + + + + + + + + + + + + + + + + + + + + + + DELETE FROM `WeekEndingDate` WHERE ((`DateID` = ?) AND ((? = 1 AND `EndOfWeekDate` IS NULL) OR (`EndOfWeekDate` = ?))) + + + + + + + + + + INSERT INTO `WeekEndingDate` (`EndOfWeekDate`) VALUES (?) + + + + + + + + SELECT DateID, EndOfWeekDate FROM WeekEndingDate + + + + + + UPDATE `WeekEndingDate` SET `EndOfWeekDate` = ? WHERE ((`DateID` = ?) AND ((? = 1 AND `EndOfWeekDate` IS NULL) OR (`EndOfWeekDate` = ?))) + + + + + + + + + + + + + + + + + + + SELECT WeekEndingDate.EndOfWeekDate, Invoice.InvoiceNetAmountAtCost, Invoice.InvoiceAmountOf, Invoice.InvoiceDate, Invoice.InvoiceNumber, Supplier.SupplierName, + WeeklySales.Sunday, WeeklySales.Monday, WeeklySales.Tuesday, WeeklySales.Wednesday, WeeklySales.Thursday, WeeklySales.Friday, + WeeklySales.Saturday, WeeklySales.WeeklyTotalSales +FROM (((WeekEndingDate INNER JOIN + Invoice ON WeekEndingDate.DateID = Invoice.Fk_DateID) INNER JOIN + WeeklySales ON WeekEndingDate.DateID = WeeklySales.Fk_DateID) INNER JOIN + Supplier ON Invoice.Fk_SupplierID = Supplier.SupplierID) +WHERE (WeekEndingDate.DateID = ?) + + + + + + + + + + SELECT DateID +FROM WeekEndingDate +WHERE (EndOfWeekDate = + (SELECT MAX(EndOfWeekDate) AS Expr1 + FROM WeekEndingDate WeekEndingDate_1)) + + + + + + + + SELECT EndOfWeekDate +FROM WeekEndingDate +WHERE (DateID = ?) + + + + + + + + + + SELECT DateID, EndOfWeekDate +FROM WeekEndingDate +WHERE (EndOfWeekDate = ?) + + + + + + + + + + + + + + DELETE FROM `WeeklySales` WHERE ((`WeeklyID` = ?) AND ((? = 1 AND `Sunday` IS NULL) OR (`Sunday` = ?)) AND ((? = 1 AND `Monday` IS NULL) OR (`Monday` = ?)) AND ((? = 1 AND `Tuesday` IS NULL) OR (`Tuesday` = ?)) AND ((? = 1 AND `Wednesday` IS NULL) OR (`Wednesday` = ?)) AND ((? = 1 AND `Thursday` IS NULL) OR (`Thursday` = ?)) AND ((? = 1 AND `Friday` IS NULL) OR (`Friday` = ?)) AND ((? = 1 AND `Saturday` IS NULL) OR (`Saturday` = ?)) AND ((? = 1 AND `WeeklyTotalSales` IS NULL) OR (`WeeklyTotalSales` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?))) + + + + + + + + + + + + + + + + + + + + + + + + + + INSERT INTO `WeeklySales` (`Sunday`, `Monday`, `Tuesday`, `Wednesday`, `Thursday`, `Friday`, `Saturday`, `WeeklyTotalSales`, `Fk_DateID`) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) + + + + + + + + + + + + + + + + SELECT WeeklyID, Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, WeeklyTotalSales, Fk_DateID FROM WeeklySales + + + + + + UPDATE `WeeklySales` SET `Sunday` = ?, `Monday` = ?, `Tuesday` = ?, `Wednesday` = ?, `Thursday` = ?, `Friday` = ?, `Saturday` = ?, `WeeklyTotalSales` = ?, `Fk_DateID` = ? WHERE ((`WeeklyID` = ?) AND ((? = 1 AND `Sunday` IS NULL) OR (`Sunday` = ?)) AND ((? = 1 AND `Monday` IS NULL) OR (`Monday` = ?)) AND ((? = 1 AND `Tuesday` IS NULL) OR (`Tuesday` = ?)) AND ((? = 1 AND `Wednesday` IS NULL) OR (`Wednesday` = ?)) AND ((? = 1 AND `Thursday` IS NULL) OR (`Thursday` = ?)) AND ((? = 1 AND `Friday` IS NULL) OR (`Friday` = ?)) AND ((? = 1 AND `Saturday` IS NULL) OR (`Saturday` = ?)) AND ((? = 1 AND `WeeklyTotalSales` IS NULL) OR (`WeeklyTotalSales` = ?)) AND ((? = 1 AND `Fk_DateID` IS NULL) OR (`Fk_DateID` = ?))) + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + SELECT Sunday, Monday, Tuesday, Wednesday, Thursday, Friday, Saturday, WeeklyTotalSales +FROM WeeklySales +WHERE Fk_DateID = ? + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/AdvertsingProfitControl/apcDatabase.xss b/AdvertsingProfitControl/apcDatabase.xss new file mode 100644 index 0000000..b81adca --- /dev/null +++ b/AdvertsingProfitControl/apcDatabase.xss @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + 783 + 181 + + + 660 + 181 + + + + + + + 310 + 122 + + + 385 + 122 + + + + + + + 227 + 207 + + + 227 + 1003 + + + 385 + 1003 + + + + + + + 641 + 1247 + + + 571 + 1247 + + + + + + + 219 + 207 + + + 219 + 1207 + + + 385 + 1207 + + + + + + + 211 + 207 + + + 211 + 1506 + + + 385 + 1506 + + + + + \ No newline at end of file diff --git a/AdvertsingProfitControl/app.config b/AdvertsingProfitControl/app.config new file mode 100644 index 0000000..b2fd77b --- /dev/null +++ b/AdvertsingProfitControl/app.config @@ -0,0 +1,19 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/AdvertsingProfitControl/frmAddRecord.Designer.cs b/AdvertsingProfitControl/frmAddRecord.Designer.cs new file mode 100644 index 0000000..2e2d11a --- /dev/null +++ b/AdvertsingProfitControl/frmAddRecord.Designer.cs @@ -0,0 +1,210 @@ +namespace AdvertsingProfitControl +{ + partial class frmAddRecord + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.addRecordMainTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.addRecordMainTabControl = new System.Windows.Forms.TabControl(); + this.APCTabPage = new System.Windows.Forms.TabPage(); + this.addRecordAPCMainDataGridView = new System.Windows.Forms.DataGridView(); + this.WICTabPage = new System.Windows.Forms.TabPage(); + this.addRecordWICMainDataGridView = new System.Windows.Forms.DataGridView(); + this.addRecordMainMenu = new System.Windows.Forms.MenuStrip(); + this.fileToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.editAddRecordMainMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.addRecEditAddRecordMainMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.textBoxMenu = new System.Windows.Forms.ToolStripTextBox(); + this.dateMaskedTextBox = new System.Windows.Forms.MaskedTextBox(); + this.addRecordMainTableLayoutPanel.SuspendLayout(); + this.addRecordMainTabControl.SuspendLayout(); + this.APCTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.addRecordAPCMainDataGridView)).BeginInit(); + this.WICTabPage.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.addRecordWICMainDataGridView)).BeginInit(); + this.addRecordMainMenu.SuspendLayout(); + this.SuspendLayout(); + // + // addRecordMainTableLayoutPanel + // + this.addRecordMainTableLayoutPanel.ColumnCount = 1; + this.addRecordMainTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.addRecordMainTableLayoutPanel.Controls.Add(this.addRecordMainTabControl, 0, 2); + this.addRecordMainTableLayoutPanel.Controls.Add(this.addRecordMainMenu, 0, 0); + this.addRecordMainTableLayoutPanel.Controls.Add(this.dateMaskedTextBox, 0, 1); + this.addRecordMainTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.addRecordMainTableLayoutPanel.Location = new System.Drawing.Point(0, 0); + this.addRecordMainTableLayoutPanel.Name = "addRecordMainTableLayoutPanel"; + this.addRecordMainTableLayoutPanel.RowCount = 3; + this.addRecordMainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.addRecordMainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.addRecordMainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.addRecordMainTableLayoutPanel.Size = new System.Drawing.Size(1084, 478); + this.addRecordMainTableLayoutPanel.TabIndex = 0; + // + // addRecordMainTabControl + // + this.addRecordMainTabControl.Controls.Add(this.APCTabPage); + this.addRecordMainTabControl.Controls.Add(this.WICTabPage); + this.addRecordMainTabControl.Dock = System.Windows.Forms.DockStyle.Fill; + this.addRecordMainTabControl.Location = new System.Drawing.Point(3, 53); + this.addRecordMainTabControl.Name = "addRecordMainTabControl"; + this.addRecordMainTabControl.SelectedIndex = 0; + this.addRecordMainTabControl.Size = new System.Drawing.Size(1078, 422); + this.addRecordMainTabControl.TabIndex = 1; + // + // APCTabPage + // + this.APCTabPage.Controls.Add(this.addRecordAPCMainDataGridView); + this.APCTabPage.Location = new System.Drawing.Point(4, 22); + this.APCTabPage.Name = "APCTabPage"; + this.APCTabPage.Padding = new System.Windows.Forms.Padding(3); + this.APCTabPage.Size = new System.Drawing.Size(1070, 396); + this.APCTabPage.TabIndex = 0; + this.APCTabPage.Text = "Advertising Profit Control"; + this.APCTabPage.UseVisualStyleBackColor = true; + // + // addRecordAPCMainDataGridView + // + this.addRecordAPCMainDataGridView.AllowUserToResizeRows = false; + this.addRecordAPCMainDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.addRecordAPCMainDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.addRecordAPCMainDataGridView.Location = new System.Drawing.Point(3, 3); + this.addRecordAPCMainDataGridView.Name = "addRecordAPCMainDataGridView"; + this.addRecordAPCMainDataGridView.Size = new System.Drawing.Size(1064, 390); + this.addRecordAPCMainDataGridView.TabIndex = 1; + // + // WICTabPage + // + this.WICTabPage.Controls.Add(this.addRecordWICMainDataGridView); + this.WICTabPage.Location = new System.Drawing.Point(4, 22); + this.WICTabPage.Name = "WICTabPage"; + this.WICTabPage.Padding = new System.Windows.Forms.Padding(3); + this.WICTabPage.Size = new System.Drawing.Size(1070, 396); + this.WICTabPage.TabIndex = 1; + this.WICTabPage.Text = "Weekly Inventory Control"; + this.WICTabPage.UseVisualStyleBackColor = true; + // + // addRecordWICMainDataGridView + // + this.addRecordWICMainDataGridView.AllowUserToResizeRows = false; + this.addRecordWICMainDataGridView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.addRecordWICMainDataGridView.Dock = System.Windows.Forms.DockStyle.Fill; + this.addRecordWICMainDataGridView.Location = new System.Drawing.Point(3, 3); + this.addRecordWICMainDataGridView.Name = "addRecordWICMainDataGridView"; + this.addRecordWICMainDataGridView.Size = new System.Drawing.Size(1064, 390); + this.addRecordWICMainDataGridView.TabIndex = 2; + // + // addRecordMainMenu + // + this.addRecordMainMenu.Dock = System.Windows.Forms.DockStyle.Fill; + this.addRecordMainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileToolStripMenuItem, + this.editAddRecordMainMenu, + this.textBoxMenu}); + this.addRecordMainMenu.Location = new System.Drawing.Point(0, 0); + this.addRecordMainMenu.Name = "addRecordMainMenu"; + this.addRecordMainMenu.Size = new System.Drawing.Size(1084, 25); + this.addRecordMainMenu.TabIndex = 0; + this.addRecordMainMenu.Text = "menuStrip1"; + // + // fileToolStripMenuItem + // + this.fileToolStripMenuItem.Name = "fileToolStripMenuItem"; + this.fileToolStripMenuItem.Size = new System.Drawing.Size(37, 21); + this.fileToolStripMenuItem.Text = "&File"; + // + // editAddRecordMainMenu + // + this.editAddRecordMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addRecEditAddRecordMainMenu}); + this.editAddRecordMainMenu.Name = "editAddRecordMainMenu"; + this.editAddRecordMainMenu.Size = new System.Drawing.Size(39, 21); + this.editAddRecordMainMenu.Text = "&Edit"; + // + // addRecEditAddRecordMainMenu + // + this.addRecEditAddRecordMainMenu.Name = "addRecEditAddRecordMainMenu"; + this.addRecEditAddRecordMainMenu.Size = new System.Drawing.Size(136, 22); + this.addRecEditAddRecordMainMenu.Text = "&Add Record"; + this.addRecEditAddRecordMainMenu.Click += new System.EventHandler(this.addRecEditAddRecordMainMenu_Click); + // + // textBoxMenu + // + this.textBoxMenu.Name = "textBoxMenu"; + this.textBoxMenu.Size = new System.Drawing.Size(100, 21); + // + // dateMaskedTextBox + // + this.dateMaskedTextBox.Location = new System.Drawing.Point(3, 28); + this.dateMaskedTextBox.Mask = "00/00/0000"; + this.dateMaskedTextBox.Name = "dateMaskedTextBox"; + this.dateMaskedTextBox.Size = new System.Drawing.Size(64, 20); + this.dateMaskedTextBox.TabIndex = 1; + this.dateMaskedTextBox.ValidatingType = typeof(System.DateTime); + // + // frmAddRecord + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(1084, 478); + this.Controls.Add(this.addRecordMainTableLayoutPanel); + this.MainMenuStrip = this.addRecordMainMenu; + this.Name = "frmAddRecord"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Add Record Form"; + this.Load += new System.EventHandler(this.frmAddRecord_Load); + this.addRecordMainTableLayoutPanel.ResumeLayout(false); + this.addRecordMainTableLayoutPanel.PerformLayout(); + this.addRecordMainTabControl.ResumeLayout(false); + this.APCTabPage.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.addRecordAPCMainDataGridView)).EndInit(); + this.WICTabPage.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.addRecordWICMainDataGridView)).EndInit(); + this.addRecordMainMenu.ResumeLayout(false); + this.addRecordMainMenu.PerformLayout(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel addRecordMainTableLayoutPanel; + private System.Windows.Forms.MenuStrip addRecordMainMenu; + private System.Windows.Forms.ToolStripMenuItem fileToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem editAddRecordMainMenu; + private System.Windows.Forms.ToolStripMenuItem addRecEditAddRecordMainMenu; + private System.Windows.Forms.TabControl addRecordMainTabControl; + private System.Windows.Forms.TabPage APCTabPage; + private System.Windows.Forms.DataGridView addRecordAPCMainDataGridView; + private System.Windows.Forms.TabPage WICTabPage; + private System.Windows.Forms.DataGridView addRecordWICMainDataGridView; + private System.Windows.Forms.MaskedTextBox dateMaskedTextBox; + private System.Windows.Forms.ToolStripTextBox textBoxMenu; + } +} \ No newline at end of file diff --git a/AdvertsingProfitControl/frmAddRecord.cs b/AdvertsingProfitControl/frmAddRecord.cs new file mode 100644 index 0000000..118f919 --- /dev/null +++ b/AdvertsingProfitControl/frmAddRecord.cs @@ -0,0 +1,223 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Windows.Forms; +using System.Data.OleDb; + +namespace AdvertsingProfitControl +{ + public partial class frmAddRecord : Form + { + public frmAddRecord() + { + InitializeComponent(); + } + + private void frmAddRecord_Load(object sender, EventArgs e) + { + ConstructForm(); + //addRecordAPCMainDataGridView.UserAddedRow += CheckForGroupedItems; + addRecordAPCMainDataGridView.RowLeave += CheckForGroupedItems; + //addRecordAPCMainDataGridView.UserDeletedRow += CheckForGroupedItems; + } + + void addRecordAPCMainDataGridView_CellEndEdit(object sender, DataGridViewCellEventArgs e) + { + bool isGroupMember = false; + textBoxMenu.Text = e.RowIndex.ToString() + ", " + e.ColumnIndex.ToString(); + + foreach (DataGridViewCell cell in addRecordAPCMainDataGridView.Rows[e.RowIndex].Cells) + { + if (cell.ColumnIndex > 0 && cell.Value != null || cell.ColumnIndex > 0 && cell.EditedFormattedValue != null) + { + isGroupMember = false; + break; + } + else if (cell.ColumnIndex == 0 && cell.Value != null || cell.ColumnIndex > 0 && cell.EditedFormattedValue != null) + { + isGroupMember = true; + } + else + { + isGroupMember = true; + } + } + + if (isGroupMember) + { + if (addRecordAPCMainDataGridView.Rows[e.RowIndex - 1].DefaultCellStyle.BackColor != Color.LightBlue) + { + addRecordAPCMainDataGridView.Rows[e.RowIndex - 1].DefaultCellStyle.BackColor = Color.LightBlue; + addRecordAPCMainDataGridView.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.LightBlue; + } + else + { + addRecordAPCMainDataGridView.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.LightBlue; + } + } + else + { + addRecordAPCMainDataGridView.Rows[e.RowIndex].DefaultCellStyle.BackColor = Color.White; + } + + } + + private void CheckForGroupedItems(object sender, DataGridViewCellEventArgs e) + { + + } + + private void RowsRemovedEvent(object sender, DataGridViewRowsRemovedEventArgs e) + { + + } + + private void RowAddedEvent(object sender, DataGridViewRowsAddedEventArgs e) + { + + } + + private void ConstructForm() + { + string[] columnNames = { "AdItem", "PrSold", "PrSalePrice", "PrTotalSales", "PrCost", "PrProfitReturn", "PrTotalProfitReturn", "InvBeginingInventory", "InvReceived", "InvTotal", "InvEndingInventory", "AcSold", "AcSalePrice", "AcTotalSales", "AcCost", "AcProfitReturn", "AcTotalProfitReturn"}; + string[] columnHeaderText = { "Ad Item", "Sold", "Sale Price", "Total Sales", "Cost", "Profit Return", "Total Profit Returned", "Beginning Inventory", "Received", "Total", "Ending Inventory", "Sold", "Sale Price", "Total Sales", "Cost", "Profit Return", "Total Profit Return" }; + int i = 0; + + foreach (string columnName in columnNames) + { + DataGridViewColumn column = new DataGridViewTextBoxColumn(); + column.Name = columnName; + column.HeaderText = columnHeaderText[i]; + addRecordAPCMainDataGridView.Columns.Add(column); + i++; + } + } + + private void addRecEditAddRecordMainMenu_Click(object sender, EventArgs e) + { + + if (dateMaskedTextBox.MaskCompleted) + { + AddRecordToDatabase(); + } + else + { + MessageBox.Show("Please enter a date."); + } + } + + private void AddRecordToDatabase() + { + RetrieveTables tableData = new RetrieveTables(); + List projectedTableData = new List(); + List actualTableData = new List(); + List inventoryTableData = new List(); + List comments = new List(); + string adItemID = ""; + int columnIndex = 0; + int rowIndex = 0; + string dateID = tableData.DateID(dateMaskedTextBox.Text); + + foreach (DataGridViewRow row in addRecordAPCMainDataGridView.Rows) + { + columnIndex = 0; + foreach (DataGridViewColumn column in addRecordAPCMainDataGridView.Columns) + { + if (column.Name == "AdItem") + { + try + { + adItemID = tableData.GetAdItemID(addRecordAPCMainDataGridView[columnIndex, rowIndex].Value.ToString()); + } + catch { MessageBox.Show("Please specify an ad item in row " + rowIndex.ToString() + ".", "No Ad Item"); return; } + } + else if (column.Name.StartsWith("Pr")) + { + try + { + projectedTableData.Add(addRecordAPCMainDataGridView[columnIndex, rowIndex].Value.ToString()); + } + catch { projectedTableData.Add("0"); } + } + else if (column.Name.StartsWith("Inv")) + { + try + { + inventoryTableData.Add(addRecordAPCMainDataGridView[columnIndex, rowIndex].Value.ToString()); + } + catch { inventoryTableData.Add("0"); } + } + else if (column.Name.StartsWith("Ac")) + { + try + { + actualTableData.Add(addRecordAPCMainDataGridView[columnIndex, rowIndex].Value.ToString()); + } + catch { actualTableData.Add("0"); } + } + else if (column.Name == "comments") + { + try + { + comments.Add(addRecordAPCMainDataGridView[columnIndex, rowIndex].Value.ToString()); + } + catch { comments.Add(""); } + } + columnIndex++; + } + AddToDataBase(projectedTableData, dateID, adItemID, "ProjectedSales"); + AddToDataBase(actualTableData, dateID, adItemID, "ActualSales"); + AddToDataBase(inventoryTableData, dateID, adItemID, "Inventory"); + AddToDataBase(comments, dateID, adItemID, "Comment"); + rowIndex++; + } + } + + private void AddToDataBase(List values, string dateID, string adItemID, string table) + { + int i = 0; + int length = values.Count; + AddRecord addRecord = new AddRecord(); + string insertValues = "("; + foreach (string parameter in values) + { + if (length == 1 || length == 0) + { + if (length == 0) + { + return; + } + else + { + insertValues += "'" + parameter + "')"; + } + } + else + { + if (i < length && i == 0) + { + insertValues += "'" + parameter + "'"; + } + else if (i == length - 1) + { + insertValues += ", '" + parameter + "', '" + adItemID + "', '" + dateID + "')"; + } + else if (i < length && i != 0) + { + insertValues += ", '" + parameter + "'"; + } + } + i++; + } + + MessageBox.Show(insertValues); + + insertValues = @"INSERT INTO " + table + " VALUES " + insertValues; + + addRecord.ExecuteQuery(insertValues); + } + } +} diff --git a/AdvertsingProfitControl/frmAddRecord.resx b/AdvertsingProfitControl/frmAddRecord.resx new file mode 100644 index 0000000..a005b47 --- /dev/null +++ b/AdvertsingProfitControl/frmAddRecord.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/AdvertsingProfitControl/frmMain.Designer.cs b/AdvertsingProfitControl/frmMain.Designer.cs new file mode 100644 index 0000000..7ab901e --- /dev/null +++ b/AdvertsingProfitControl/frmMain.Designer.cs @@ -0,0 +1,344 @@ +namespace AdvertsingProfitControl +{ + partial class frmMain + { + /// + /// Required designer variable. + /// + private System.ComponentModel.IContainer components = null; + + /// + /// Clean up any resources being used. + /// + /// true if managed resources should be disposed; otherwise, false. + protected override void Dispose(bool disposing) + { + if (disposing && (components != null)) + { + components.Dispose(); + } + base.Dispose(disposing); + } + + #region Windows Form Designer generated code + + /// + /// Required method for Designer support - do not modify + /// the contents of this method with the code editor. + /// + private void InitializeComponent() + { + this.mainTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.mainMenu = new System.Windows.Forms.MenuStrip(); + this.fileMainMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.exitFileMainMenu = new System.Windows.Forms.ToolStripMenuItem(); + this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.addRecordToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); + this.commentMainTableLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.commentMainGroupBox = new System.Windows.Forms.GroupBox(); + this.commentsMainLabel = new System.Windows.Forms.Label(); + this.profitAnalysisMainGroupBox = new System.Windows.Forms.GroupBox(); + this.costOfSalesMainGroupBox = new System.Windows.Forms.GroupBox(); + this.mainViewTabControl = new System.Windows.Forms.TabControl(); + this.projectionTab = new System.Windows.Forms.TabPage(); + this.projectedSalesMainDataGrid = new System.Windows.Forms.DataGridView(); + this.actualSalesInvTab = new System.Windows.Forms.TabPage(); + this.actualSalesMainLayoutPanel = new System.Windows.Forms.TableLayoutPanel(); + this.actualSalesInvMainDataGidView = new System.Windows.Forms.DataGridView(); + this.weeklyInventoryControlTab = new System.Windows.Forms.TabPage(); + this.weeklyInventoryMainDataGrid = new System.Windows.Forms.DataGridView(); + this.mainTableLayoutPanel.SuspendLayout(); + this.mainMenu.SuspendLayout(); + this.commentMainTableLayoutPanel.SuspendLayout(); + this.commentMainGroupBox.SuspendLayout(); + this.mainViewTabControl.SuspendLayout(); + this.projectionTab.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.projectedSalesMainDataGrid)).BeginInit(); + this.actualSalesInvTab.SuspendLayout(); + this.actualSalesMainLayoutPanel.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.actualSalesInvMainDataGidView)).BeginInit(); + this.weeklyInventoryControlTab.SuspendLayout(); + ((System.ComponentModel.ISupportInitialize)(this.weeklyInventoryMainDataGrid)).BeginInit(); + this.SuspendLayout(); + // + // mainTableLayoutPanel + // + this.mainTableLayoutPanel.ColumnCount = 1; + this.mainTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.mainTableLayoutPanel.Controls.Add(this.mainMenu, 0, 0); + this.mainTableLayoutPanel.Controls.Add(this.commentMainTableLayoutPanel, 0, 2); + this.mainTableLayoutPanel.Controls.Add(this.mainViewTabControl, 0, 1); + this.mainTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.mainTableLayoutPanel.Location = new System.Drawing.Point(0, 0); + this.mainTableLayoutPanel.Name = "mainTableLayoutPanel"; + this.mainTableLayoutPanel.RowCount = 3; + this.mainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 25F)); + this.mainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 65F)); + this.mainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 35F)); + this.mainTableLayoutPanel.Size = new System.Drawing.Size(934, 512); + this.mainTableLayoutPanel.TabIndex = 0; + // + // mainMenu + // + this.mainMenu.Dock = System.Windows.Forms.DockStyle.Fill; + this.mainMenu.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.fileMainMenu, + this.editToolStripMenuItem}); + this.mainMenu.Location = new System.Drawing.Point(0, 0); + this.mainMenu.Name = "mainMenu"; + this.mainMenu.Size = new System.Drawing.Size(934, 25); + this.mainMenu.TabIndex = 1; + this.mainMenu.Text = "menuStrip1"; + // + // fileMainMenu + // + this.fileMainMenu.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.exitFileMainMenu}); + this.fileMainMenu.Name = "fileMainMenu"; + this.fileMainMenu.Size = new System.Drawing.Size(37, 21); + this.fileMainMenu.Text = "&File"; + // + // exitFileMainMenu + // + this.exitFileMainMenu.Name = "exitFileMainMenu"; + this.exitFileMainMenu.Size = new System.Drawing.Size(152, 22); + this.exitFileMainMenu.Text = "E&xit"; + // + // editToolStripMenuItem + // + this.editToolStripMenuItem.DropDownItems.AddRange(new System.Windows.Forms.ToolStripItem[] { + this.addRecordToolStripMenuItem}); + this.editToolStripMenuItem.Name = "editToolStripMenuItem"; + this.editToolStripMenuItem.Size = new System.Drawing.Size(39, 21); + this.editToolStripMenuItem.Text = "E&dit"; + // + // addRecordToolStripMenuItem + // + this.addRecordToolStripMenuItem.Name = "addRecordToolStripMenuItem"; + this.addRecordToolStripMenuItem.Size = new System.Drawing.Size(136, 22); + this.addRecordToolStripMenuItem.Text = "Add &Record"; + this.addRecordToolStripMenuItem.Click += new System.EventHandler(this.addRecordToolStripMenuItem_Click); + // + // commentMainTableLayoutPanel + // + this.commentMainTableLayoutPanel.ColumnCount = 3; + this.commentMainTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 25F)); + this.commentMainTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.5F)); + this.commentMainTableLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 37.5F)); + this.commentMainTableLayoutPanel.Controls.Add(this.commentMainGroupBox, 0, 0); + this.commentMainTableLayoutPanel.Controls.Add(this.profitAnalysisMainGroupBox, 1, 0); + this.commentMainTableLayoutPanel.Controls.Add(this.costOfSalesMainGroupBox, 2, 0); + this.commentMainTableLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.commentMainTableLayoutPanel.Location = new System.Drawing.Point(3, 344); + this.commentMainTableLayoutPanel.Name = "commentMainTableLayoutPanel"; + this.commentMainTableLayoutPanel.RowCount = 1; + this.commentMainTableLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.commentMainTableLayoutPanel.Size = new System.Drawing.Size(928, 165); + this.commentMainTableLayoutPanel.TabIndex = 2; + // + // commentMainGroupBox + // + this.commentMainGroupBox.Controls.Add(this.commentsMainLabel); + this.commentMainGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.commentMainGroupBox.Location = new System.Drawing.Point(3, 3); + this.commentMainGroupBox.Name = "commentMainGroupBox"; + this.commentMainGroupBox.Size = new System.Drawing.Size(226, 159); + this.commentMainGroupBox.TabIndex = 0; + this.commentMainGroupBox.TabStop = false; + this.commentMainGroupBox.Text = "Comments"; + // + // commentsMainLabel + // + this.commentsMainLabel.AutoEllipsis = true; + this.commentsMainLabel.AutoSize = true; + this.commentsMainLabel.Dock = System.Windows.Forms.DockStyle.Fill; + this.commentsMainLabel.Location = new System.Drawing.Point(3, 16); + this.commentsMainLabel.MaximumSize = new System.Drawing.Size(220, 0); + this.commentsMainLabel.Name = "commentsMainLabel"; + this.commentsMainLabel.Size = new System.Drawing.Size(0, 13); + this.commentsMainLabel.TabIndex = 0; + // + // profitAnalysisMainGroupBox + // + this.profitAnalysisMainGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.profitAnalysisMainGroupBox.Location = new System.Drawing.Point(235, 3); + this.profitAnalysisMainGroupBox.Name = "profitAnalysisMainGroupBox"; + this.profitAnalysisMainGroupBox.Size = new System.Drawing.Size(342, 159); + this.profitAnalysisMainGroupBox.TabIndex = 1; + this.profitAnalysisMainGroupBox.TabStop = false; + this.profitAnalysisMainGroupBox.Text = "Profit Analysis"; + // + // costOfSalesMainGroupBox + // + this.costOfSalesMainGroupBox.Dock = System.Windows.Forms.DockStyle.Fill; + this.costOfSalesMainGroupBox.Location = new System.Drawing.Point(583, 3); + this.costOfSalesMainGroupBox.Name = "costOfSalesMainGroupBox"; + this.costOfSalesMainGroupBox.Size = new System.Drawing.Size(342, 159); + this.costOfSalesMainGroupBox.TabIndex = 2; + this.costOfSalesMainGroupBox.TabStop = false; + this.costOfSalesMainGroupBox.Text = "Cost of Sales"; + // + // mainViewTabControl + // + this.mainViewTabControl.Controls.Add(this.projectionTab); + this.mainViewTabControl.Controls.Add(this.actualSalesInvTab); + this.mainViewTabControl.Controls.Add(this.weeklyInventoryControlTab); + this.mainViewTabControl.Dock = System.Windows.Forms.DockStyle.Fill; + this.mainViewTabControl.Location = new System.Drawing.Point(3, 28); + this.mainViewTabControl.Name = "mainViewTabControl"; + this.mainViewTabControl.SelectedIndex = 0; + this.mainViewTabControl.Size = new System.Drawing.Size(928, 310); + this.mainViewTabControl.TabIndex = 3; + // + // projectionTab + // + this.projectionTab.Controls.Add(this.projectedSalesMainDataGrid); + this.projectionTab.Location = new System.Drawing.Point(4, 22); + this.projectionTab.Name = "projectionTab"; + this.projectionTab.Padding = new System.Windows.Forms.Padding(3); + this.projectionTab.Size = new System.Drawing.Size(920, 284); + this.projectionTab.TabIndex = 0; + this.projectionTab.Text = "Projection"; + this.projectionTab.UseVisualStyleBackColor = true; + // + // projectedSalesMainDataGrid + // + this.projectedSalesMainDataGrid.AllowUserToAddRows = false; + this.projectedSalesMainDataGrid.AllowUserToDeleteRows = false; + this.projectedSalesMainDataGrid.AllowUserToResizeRows = false; + this.projectedSalesMainDataGrid.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.projectedSalesMainDataGrid.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; + this.projectedSalesMainDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.projectedSalesMainDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.projectedSalesMainDataGrid.Location = new System.Drawing.Point(3, 3); + this.projectedSalesMainDataGrid.Name = "projectedSalesMainDataGrid"; + this.projectedSalesMainDataGrid.ReadOnly = true; + this.projectedSalesMainDataGrid.RowHeadersVisible = false; + this.projectedSalesMainDataGrid.ShowCellErrors = false; + this.projectedSalesMainDataGrid.ShowRowErrors = false; + this.projectedSalesMainDataGrid.Size = new System.Drawing.Size(914, 278); + this.projectedSalesMainDataGrid.TabIndex = 0; + // + // actualSalesInvTab + // + this.actualSalesInvTab.Controls.Add(this.actualSalesMainLayoutPanel); + this.actualSalesInvTab.Location = new System.Drawing.Point(4, 22); + this.actualSalesInvTab.Name = "actualSalesInvTab"; + this.actualSalesInvTab.Size = new System.Drawing.Size(920, 284); + this.actualSalesInvTab.TabIndex = 2; + this.actualSalesInvTab.Text = "Actual Sales / Inventory"; + this.actualSalesInvTab.UseVisualStyleBackColor = true; + // + // actualSalesMainLayoutPanel + // + this.actualSalesMainLayoutPanel.ColumnCount = 1; + this.actualSalesMainLayoutPanel.ColumnStyles.Add(new System.Windows.Forms.ColumnStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.actualSalesMainLayoutPanel.Controls.Add(this.actualSalesInvMainDataGidView, 0, 0); + this.actualSalesMainLayoutPanel.Dock = System.Windows.Forms.DockStyle.Fill; + this.actualSalesMainLayoutPanel.Location = new System.Drawing.Point(0, 0); + this.actualSalesMainLayoutPanel.Name = "actualSalesMainLayoutPanel"; + this.actualSalesMainLayoutPanel.RowCount = 1; + this.actualSalesMainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Percent, 100F)); + this.actualSalesMainLayoutPanel.RowStyles.Add(new System.Windows.Forms.RowStyle(System.Windows.Forms.SizeType.Absolute, 284F)); + this.actualSalesMainLayoutPanel.Size = new System.Drawing.Size(920, 284); + this.actualSalesMainLayoutPanel.TabIndex = 0; + // + // actualSalesInvMainDataGidView + // + this.actualSalesInvMainDataGidView.AllowUserToAddRows = false; + this.actualSalesInvMainDataGidView.AllowUserToDeleteRows = false; + this.actualSalesInvMainDataGidView.AllowUserToResizeRows = false; + this.actualSalesInvMainDataGidView.AutoSizeColumnsMode = System.Windows.Forms.DataGridViewAutoSizeColumnsMode.Fill; + this.actualSalesInvMainDataGidView.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells; + this.actualSalesInvMainDataGidView.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.actualSalesInvMainDataGidView.Dock = System.Windows.Forms.DockStyle.Fill; + this.actualSalesInvMainDataGidView.Location = new System.Drawing.Point(3, 3); + this.actualSalesInvMainDataGidView.Name = "actualSalesInvMainDataGidView"; + this.actualSalesInvMainDataGidView.ReadOnly = true; + this.actualSalesInvMainDataGidView.RowHeadersVisible = false; + this.actualSalesInvMainDataGidView.ShowCellErrors = false; + this.actualSalesInvMainDataGidView.ShowRowErrors = false; + this.actualSalesInvMainDataGidView.Size = new System.Drawing.Size(914, 278); + this.actualSalesInvMainDataGidView.TabIndex = 1; + // + // weeklyInventoryControlTab + // + this.weeklyInventoryControlTab.Controls.Add(this.weeklyInventoryMainDataGrid); + this.weeklyInventoryControlTab.Location = new System.Drawing.Point(4, 22); + this.weeklyInventoryControlTab.Name = "weeklyInventoryControlTab"; + this.weeklyInventoryControlTab.Padding = new System.Windows.Forms.Padding(3); + this.weeklyInventoryControlTab.Size = new System.Drawing.Size(920, 284); + this.weeklyInventoryControlTab.TabIndex = 1; + this.weeklyInventoryControlTab.Text = "Weekly Inventory Control"; + this.weeklyInventoryControlTab.UseVisualStyleBackColor = true; + // + // weeklyInventoryMainDataGrid + // + this.weeklyInventoryMainDataGrid.AllowUserToAddRows = false; + this.weeklyInventoryMainDataGrid.AllowUserToDeleteRows = false; + this.weeklyInventoryMainDataGrid.AllowUserToResizeRows = false; + this.weeklyInventoryMainDataGrid.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize; + this.weeklyInventoryMainDataGrid.Dock = System.Windows.Forms.DockStyle.Fill; + this.weeklyInventoryMainDataGrid.Location = new System.Drawing.Point(3, 3); + this.weeklyInventoryMainDataGrid.Name = "weeklyInventoryMainDataGrid"; + this.weeklyInventoryMainDataGrid.ReadOnly = true; + this.weeklyInventoryMainDataGrid.RowHeadersVisible = false; + this.weeklyInventoryMainDataGrid.Size = new System.Drawing.Size(914, 278); + this.weeklyInventoryMainDataGrid.TabIndex = 0; + // + // frmMain + // + this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); + this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; + this.ClientSize = new System.Drawing.Size(934, 512); + this.Controls.Add(this.mainTableLayoutPanel); + this.MaximizeBox = false; + this.Name = "frmMain"; + this.ShowIcon = false; + this.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen; + this.Text = "Advertising Profit Control - Main"; + this.Load += new System.EventHandler(this.frmMain_Load); + this.mainTableLayoutPanel.ResumeLayout(false); + this.mainTableLayoutPanel.PerformLayout(); + this.mainMenu.ResumeLayout(false); + this.mainMenu.PerformLayout(); + this.commentMainTableLayoutPanel.ResumeLayout(false); + this.commentMainGroupBox.ResumeLayout(false); + this.commentMainGroupBox.PerformLayout(); + this.mainViewTabControl.ResumeLayout(false); + this.projectionTab.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.projectedSalesMainDataGrid)).EndInit(); + this.actualSalesInvTab.ResumeLayout(false); + this.actualSalesMainLayoutPanel.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.actualSalesInvMainDataGidView)).EndInit(); + this.weeklyInventoryControlTab.ResumeLayout(false); + ((System.ComponentModel.ISupportInitialize)(this.weeklyInventoryMainDataGrid)).EndInit(); + this.ResumeLayout(false); + + } + + #endregion + + private System.Windows.Forms.TableLayoutPanel mainTableLayoutPanel; + private System.Windows.Forms.MenuStrip mainMenu; + private System.Windows.Forms.ToolStripMenuItem fileMainMenu; + private System.Windows.Forms.TableLayoutPanel commentMainTableLayoutPanel; + private System.Windows.Forms.GroupBox commentMainGroupBox; + private System.Windows.Forms.GroupBox profitAnalysisMainGroupBox; + private System.Windows.Forms.GroupBox costOfSalesMainGroupBox; + private System.Windows.Forms.ToolStripMenuItem exitFileMainMenu; + private System.Windows.Forms.TabControl mainViewTabControl; + private System.Windows.Forms.TabPage projectionTab; + private System.Windows.Forms.TabPage weeklyInventoryControlTab; + private System.Windows.Forms.DataGridView weeklyInventoryMainDataGrid; + private System.Windows.Forms.Label commentsMainLabel; + private System.Windows.Forms.TabPage actualSalesInvTab; + private System.Windows.Forms.TableLayoutPanel actualSalesMainLayoutPanel; + private System.Windows.Forms.DataGridView actualSalesInvMainDataGidView; + private System.Windows.Forms.DataGridView projectedSalesMainDataGrid; + private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; + private System.Windows.Forms.ToolStripMenuItem addRecordToolStripMenuItem; + + } +} + diff --git a/AdvertsingProfitControl/frmMain.cs b/AdvertsingProfitControl/frmMain.cs new file mode 100644 index 0000000..09ba5ea --- /dev/null +++ b/AdvertsingProfitControl/frmMain.cs @@ -0,0 +1,169 @@ +using System; +using System.Collections.Generic; +using System.ComponentModel; +using System.Data; +using System.Drawing; +using System.Text; +using System.Data.OleDb; +using System.Windows.Forms; + +namespace AdvertsingProfitControl +{ + public partial class frmMain : Form + { + private AutoCompleteStringCollection dateSuggestions = new AutoCompleteStringCollection(); + //private string connString = "Provider=Microsoft.ACE.OLEDB.12.0;Data Source=apcDatabase.accdb;Persist Security Info=False"; + + public frmMain() + { + InitializeComponent(); + + } + + private void frmMain_Load(object sender, EventArgs e) + { + //connect to the database on form load | eh? + BuildUITables(); + addRecordToolStripMenuItem.PerformClick(); + } + + /// + /// This function re-orders the DataGridView to fit the + /// column scheme of the Advertising Profit Control sheet, + /// because SQL doesn't appear to return the columns in + /// the desired order. + /// + /// + private void ReorderDataGridView(DataGridView dataGrid) + { + foreach (DataGridViewColumn column in dataGrid.Columns) + { + if (!column.Name.Contains("ID")) + { + switch (column.Name.ToLower()) + { + //---Begin AdItem Table check------------------- + case "aditem": + column.DisplayIndex = 0; + column.HeaderText = "Ad Item"; + break; + //---End AdItem Table check--------------------- + //---Begin Projected Sales Table check---------- + case "prsold": + column.DisplayIndex = 1; + column.HeaderText = "Sold"; + break; + case "prsaleprice": + column.DisplayIndex = 2; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Sale Price"; + break; + case "prtotalsales": + column.DisplayIndex = 3; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Total Sales"; + break; + case "prcost": + column.DisplayIndex = 4; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Cost"; + break; + case "prprofitreturn": + column.DisplayIndex = 5; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Profit Return"; + break; + case "prtotalprofitreturn": + column.DisplayIndex = 6; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Total Profit Return"; + break; + //---End Projected Sales Table check------------ + //---Begin Inventory Table check---------------- + case "invbegininginventory": + column.DisplayIndex = 1; + column.HeaderText = "Beginning inventory"; + break; + case "invrecieved": + column.DisplayIndex = 2; + column.HeaderText = "Received"; + break; + case "invtotal": + column.DisplayIndex = 3; + column.HeaderText = "Total"; + break; + case "invending": + column.DisplayIndex = 4; + column.HeaderText = "Ending Inventory"; + break; + //---End Inventory Table check------------------ + //---Begin Actual Sales Table check------------- + case "acsold": + column.DisplayIndex = 8; + column.HeaderText = "Sold"; + break; + case "acsaleprice": + column.DisplayIndex = 9; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Sale Price"; + break; + case "actotalsales": + column.DisplayIndex = 10; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Total Sales"; + break; + case "accost": + column.DisplayIndex = 11; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Cost"; + break; + case "acprofitreturn": + column.DisplayIndex = 12; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Profit Return"; + break; + case "actotalprofitreturn": + column.DisplayIndex = 13; + column.DefaultCellStyle.Format = "c"; + column.HeaderText = "Total Profit Return"; + break; + //---End Actual Table check--------------------- + default: + MessageBox.Show("This message box should never appear but if it does record this information:\n" + "Column Name: " + column.Name + "\nColumn Type: " + column.ValueType, "Unknown Column Detected", MessageBoxButtons.OK, MessageBoxIcon.Information); + break; + } + } + else + { + //The column was an ID field therefore we won't bother showing it to the user. + column.Visible = false; + } + } + }//End of ReorderDataGridView() function + + private void BuildUITables() + { + RetrieveTables tableData = new RetrieveTables(); + DataGridView finalWICTable = new DataGridView(); + string[] comments; + + projectedSalesMainDataGrid.DataSource = tableData.APCProjectionSaleTable(); + ReorderDataGridView(projectedSalesMainDataGrid); + actualSalesInvMainDataGidView.DataSource = tableData.APCActualSalesTable(); + ReorderDataGridView(actualSalesInvMainDataGidView); + finalWICTable.DataSource = tableData.WICTable(); + comments = tableData.Comment(); + foreach (string comment in comments) + { + commentsMainLabel.Text = comment + "\n"; + } + } + + private void addRecordToolStripMenuItem_Click(object sender, EventArgs e) + { + frmAddRecord recordForm = new frmAddRecord(); + recordForm.ShowDialog(); + BuildUITables(); + } + } +} diff --git a/AdvertsingProfitControl/frmMain.resx b/AdvertsingProfitControl/frmMain.resx new file mode 100644 index 0000000..5b717b2 --- /dev/null +++ b/AdvertsingProfitControl/frmMain.resx @@ -0,0 +1,123 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + 17, 17 + + \ No newline at end of file diff --git a/Readme.md b/Readme.md new file mode 100644 index 0000000..7263532 --- /dev/null +++ b/Readme.md @@ -0,0 +1,18 @@ +This program is one I wrote when I was still working in the produce department in my free time. My boss at the time wanted a program +to archive the contents of a sheet that he would get every week to show how the department was doing. This sheet was called +the Advertising Profit Control. As you may guess, this would show how items that were in that week's ad were selling. However, this +program was not my idea, my dad, while hanging with my boss one day, actually mentioned that I'd be able to build such a program. +When I was asked if I could do it by my boss I said "Yeah sounds like it'd be a cool project." And a day or two later I grabbed +a blank Advertising Profit Control sheet, had hime explain how it all works, and got to work. This was purely a personal project +with no other compensation than what I learned along the way and also something to show potential employers. That said, I had a +lot of fun building this program out. + +I've decided to archive the oldest version of the code. This was before I even knew what Git was so what's been saved is only +manual backups. I tried to piece them together in order as best I could, but I wanted to archive this. + +This project is broken up into three parts: + 1. This part (Pre-alpha as I'll call it) + 2. advertisingprofitcontrol-alpha (which has more complete code, but is before my transition to Entity Framework) + 3. advertisingprofitcontrol (which contains the final, and complete code) + +I say "final" just because any left over bugs and planned features are never gonna happen. This project is quite abandoned.