From 58501fec366070ea498997b56bfe10b9fdb4fb30 Mon Sep 17 00:00:00 2001 From: Garritt McCune Date: Thu, 28 Jan 2021 19:53:08 -0600 Subject: [PATCH] What I believe is the olderest, marked as 'AdvertsingProfitControl Alpha' by the folder. Only had a simple 'Add Records' form, quite incomplete. --- .gitignore | 2 + AdvertsingProfitControl.sln | 20 + AdvertsingProfitControl.v11.suo | Bin 0 -> 61952 bytes AdvertsingProfitControl/AddRecord.cs | 38 + .../AdvertsingProfitControl.csproj | 119 + AdvertsingProfitControl/Program.cs | 20 + .../Properties/AssemblyInfo.cs | 36 + .../Properties/Resources.Designer.cs | 71 + .../Properties/Resources.resx | 117 + .../Properties/Settings.Designer.cs | 70 + .../Properties/Settings.settings | 38 + AdvertsingProfitControl/RetrieveTables.cs | 103 + AdvertsingProfitControl/WriteToDatabase.cs | 97 + .../apcDatabase.Designer.cs | 10916 ++++++++++++++++ AdvertsingProfitControl/apcDatabase.accdb | Bin 0 -> 1220608 bytes AdvertsingProfitControl/apcDatabase.cs | 6 + AdvertsingProfitControl/apcDatabase.xsc | 9 + AdvertsingProfitControl/apcDatabase.xsd | 1037 ++ AdvertsingProfitControl/apcDatabase.xss | 105 + AdvertsingProfitControl/app.config | 19 + .../frmAddRecord.Designer.cs | 210 + AdvertsingProfitControl/frmAddRecord.cs | 223 + AdvertsingProfitControl/frmAddRecord.resx | 123 + AdvertsingProfitControl/frmMain.Designer.cs | 344 + AdvertsingProfitControl/frmMain.cs | 169 + AdvertsingProfitControl/frmMain.resx | 123 + Readme.md | 18 + 27 files changed, 14033 insertions(+) create mode 100644 .gitignore create mode 100644 AdvertsingProfitControl.sln create mode 100644 AdvertsingProfitControl.v11.suo create mode 100644 AdvertsingProfitControl/AddRecord.cs create mode 100644 AdvertsingProfitControl/AdvertsingProfitControl.csproj create mode 100644 AdvertsingProfitControl/Program.cs create mode 100644 AdvertsingProfitControl/Properties/AssemblyInfo.cs create mode 100644 AdvertsingProfitControl/Properties/Resources.Designer.cs create mode 100644 AdvertsingProfitControl/Properties/Resources.resx create mode 100644 AdvertsingProfitControl/Properties/Settings.Designer.cs create mode 100644 AdvertsingProfitControl/Properties/Settings.settings create mode 100644 AdvertsingProfitControl/RetrieveTables.cs create mode 100644 AdvertsingProfitControl/WriteToDatabase.cs create mode 100644 AdvertsingProfitControl/apcDatabase.Designer.cs create mode 100644 AdvertsingProfitControl/apcDatabase.accdb create mode 100644 AdvertsingProfitControl/apcDatabase.cs create mode 100644 AdvertsingProfitControl/apcDatabase.xsc create mode 100644 AdvertsingProfitControl/apcDatabase.xsd create mode 100644 AdvertsingProfitControl/apcDatabase.xss create mode 100644 AdvertsingProfitControl/app.config create mode 100644 AdvertsingProfitControl/frmAddRecord.Designer.cs create mode 100644 AdvertsingProfitControl/frmAddRecord.cs create mode 100644 AdvertsingProfitControl/frmAddRecord.resx create mode 100644 AdvertsingProfitControl/frmMain.Designer.cs create mode 100644 AdvertsingProfitControl/frmMain.cs create mode 100644 AdvertsingProfitControl/frmMain.resx create mode 100644 Readme.md 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 0000000000000000000000000000000000000000..05092a908e6d5a1df86a490a5da8e7f091b7d4cd GIT binary patch literal 61952 zcmca`Uhu)fjZzO8(10BSGsD0CoD6J8;*1Oo3`{V-00V;}0|Nsy0|Udq|NsAkghA~8 zqhLsdKoCPdLq0@)=wiDj*U>l41-@aQi{-AVwP(BLjl~RAC51B117lHiHjC zCPOhp2}3ADF+(at5d%!T7^)5zrNY3($j`t4cLOeU$l{>P!T}WsXUJs8V@P4hXDDaz zWk_VmV@PC32fILzApk6w$B@d9!r;bG#E{64%aF=|>LN1+CPq*m1^FF>p~m8+{xL8x z@IX~aF)%Rv1!+XXpggU>zyQwwFey;Xz}O&Kkb!|gf`NfS66$|321vNFGcYjZL&ZSm z$S^Q4fWkfOH7#K$LKW*|qD2(x8Mn(n(CPoGZW<~}E7Dh;0j*XFl zft`_ofrF8OffFhQibr&F1Q;0@1Q{6^gcunZgrVxt)krcjFi0^nFi0~pFv#FggRTd} zS7&5k&|qX>&}3v_&>}$}Nbe{nJ_P(3N*PKRa=y2 z2FQL;p9JP(xC9=?Cr~{NwIA00Ol3%BC}D5`x34l8(iuRlt|B~Uz@!uym>5Cr7f{;< zm_S*WK?NEIgmpmjI7}T#^JxAD z#oWlmqxm1w{~W3Lzmb7~p^1Tkp&8oWXob@43=9k%3=9mN3=9li3=9n23=9lC3=9mt z3=9l?3=9nY3=9kt7#J8PGB7YqVqjpH%)r1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-TyPZwm^Xw zevMA!gQoFE`rQ058Q}u&N*rDPP1@>ra4|4CBy4U{JG#(obp0Rt%93HU{_oEKuRo>5 z`UB!;1kQ?I3faH)L8#|8=V{Dc70sZDAK1!~4NMFSx787AdOy7)%6o){+_MTI44|6;LH$I~-ibVrQZx+O6_Uq*-xm-qdA3Og#%ZQ$=4pn8DW(RA#)+(;jja$# z6cTg*9rAV&=+SmLsYQALIf<1ynZ+e8i6x1kZlpH20||0AsEY|Qg$GpFrQ+$aLiV8O zD1@aJ6=&w>*%}(^8GxXUf^%t3Noi54ZC+|=Nl{{sjzU0bQch;FcWPxwes(IR`*}bv zC?IH+o@ZW3YEfEZa%wTAt#mH`3G96t&Hu1nL7+5GkMSc=k_F+>@*lPbjK2G?2D%;Sfk@kCJVfw}VzhL&QNbZkltzmwYnH= z2)A00T3tbOLOU}rCAGpo%_p(A#5E@sbcnGnZpAjaMWxR9xw(mXDIuv9B|e$OCFoXxF6(4t zWW+by0ckrT?_b6?+W~48a)6ql3=FJ){^OrNA;0(xK5#uNi0YP)ga)LU@MAKK&gPuCa*Ln$BscE zqokz3N?*Ucyj-u`STDaQUEj#Sz)(NJ*C#kRBQ-aXfsv7+gxby===tB#_CF{MFffd^ z|1+`NorT=eC1#`zSNT2K{%2qqZT}-iT}RvhqwW7<2HN-BNiDxd+y4p-)Eqe>HT-ea zAEWL6)SQ&j_CNe$sL}R6a=V>&BcG(^Ut;d4ouwAi8LD(?^U{mTeIl!CCW6}Eps^HW z3=)H2(1|UeB_O!Y+rfSb8MK=hoLZtsPA?C7Hyfc|XhBgv=yE{@a;_(Xo!SUm9s}wF zgM5qUW-^d8GKQ@DsAFLG;0#)1!@$5G&cMI`VuB0=b*SO0@y~xycl>`e{)xSwZm`5Z E0Lt$0g8%>k literal 0 HcmV?d00001 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 0000000000000000000000000000000000000000..745e1a012abcc4a93f7003dd16a47000cfdd0d63 GIT binary patch literal 1220608 zcmZQzWMBv`Nz6-0EJ{&ubaqv6abjR%U|`sq$DEYFc_{Sd%Jd=!dxkl6^C$doon?5m za@SjfJ@?PdO}_c$@O-!5U3>hrptFI-I5kR^~Z%ymDcoQ^6D;^-knc<`=9-|+rkPl zp0_V`ldgoYF)*0u88D23(GVC7fzc2c4S~@R7!85Z5Eu=C(GVC7fzc2c4FT$e04Jjp zTOlLEC>)_7z{r@w&j?LQObomE%lM(3QED^c|Ks2F|H0rdn8ZpjG2Y__c}9wb zfgzHOfx!sGVPF6)3jniVV*|m04BQNY;H3ee^@G)>;NPt}h z4m+^rups%z$O*EX4emi$3_zU=i2y{9urRPNfL+A{iUSm*7#P4taWk-@S^kfa8Ds}D z+zyD(LD9g+;LMQEkjIe6kjjwEP{JU<;KGo|P{NSNki?M4P|T3ZAOaOhWpHLFVn_wc zB8!GH6fmSfMY$N<7;+dA8PXYw8N?Xe81lh7G8xht@)-OW5*czCQW;nnJQ-3LSQva5 z${6^-q$@)OLkU9>Ln4C!nD5Jw&yd1U%80%5)47p%-9zz;KK7$X~kLe5&XyU;P8DKY-FmN!0FjO)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kI%izM`2@h2TxT!7-`3%Vnpje00w;>FP3`q>d40a3w z44_afVJHRH2_SnwAzc7=e+dI9j)ECVz^+VWNC$^IEN(z4Pzu^60M$ew-=;Ii%n212C7w&;|7r{w6N#|`8t&W z7HabfwF}d7`Rv&xEKr=EE)6|Oc@LqK)TqVvLH4))HF^8MkWrBxtt7) zjGPRN42&RIE~rY7EH_9NB*+8RqQJn&#mgYU010YP!U1I?M3KY8z`)GMz{1eOz`(%8 zz`)GUz{KDNc7OoXSdeLg3@i-Sp + + + + \ 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.