diff --git a/WindowsFormsApplinq/.vs/WindowsFormsApplinq/v16/.suo b/WindowsFormsApplinq/.vs/WindowsFormsApplinq/v16/.suo index 177b941..c24d3aa 100644 Binary files a/WindowsFormsApplinq/.vs/WindowsFormsApplinq/v16/.suo and b/WindowsFormsApplinq/.vs/WindowsFormsApplinq/v16/.suo differ diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/App.config b/WindowsFormsApplinq/WindowsFormsApplinq/App.config index 6ec9ff8..e88188a 100644 --- a/WindowsFormsApplinq/WindowsFormsApplinq/App.config +++ b/WindowsFormsApplinq/WindowsFormsApplinq/App.config @@ -6,6 +6,9 @@ + diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml b/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml index fa8a2fd..9b4e412 100644 --- a/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml +++ b/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml @@ -1,13 +1,13 @@ - - - + + +
- - - + + +
- +
diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml.layout b/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml.layout index fc8263c..735441f 100644 --- a/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml.layout +++ b/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml.layout @@ -2,22 +2,22 @@ - + - + - + - + - + - + diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.designer.cs b/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.designer.cs index 6ed7bea..85503c3 100644 --- a/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.designer.cs +++ b/WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.designer.cs @@ -22,7 +22,7 @@ namespace WindowsFormsApplinq using System; - [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="Bills")] + [global::System.Data.Linq.Mapping.DatabaseAttribute(Name="TRBills")] public partial class DataClasses1DataContext : System.Data.Linq.DataContext { @@ -42,7 +42,7 @@ public partial class DataClasses1DataContext : System.Data.Linq.DataContext #endregion public DataClasses1DataContext() : - base(global::WindowsFormsApplinq.Properties.Settings.Default.BillsConnectionString, mappingSource) + base(global::WindowsFormsApplinq.Properties.Settings.Default.TRBillsConnectionString, mappingSource) { OnCreated(); } @@ -96,7 +96,7 @@ public System.Data.Linq.Table BringHomePays } } - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.MonthlyBills")] + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.MonthlyBill")] public partial class MonthlyBill : INotifyPropertyChanging, INotifyPropertyChanged { @@ -104,7 +104,7 @@ public partial class MonthlyBill : INotifyPropertyChanging, INotifyPropertyChang private string _BILL; - private float _COST; + private System.Nullable _COST; private string _Date; @@ -114,7 +114,7 @@ public partial class MonthlyBill : INotifyPropertyChanging, INotifyPropertyChang partial void OnCreated(); partial void OnBILLChanging(string value); partial void OnBILLChanged(); - partial void OnCOSTChanging(float value); + partial void OnCOSTChanging(System.Nullable value); partial void OnCOSTChanged(); partial void OnDateChanging(string value); partial void OnDateChanged(); @@ -125,7 +125,7 @@ public MonthlyBill() OnCreated(); } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BILL", AutoSync=AutoSync.OnUpdate, DbType="VarChar(50)", CanBeNull=false, IsPrimaryKey=true)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BILL", DbType="VarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] public string BILL { get @@ -145,8 +145,8 @@ public string BILL } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_COST", AutoSync=AutoSync.OnUpdate, DbType="Real")] - public float COST + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_COST", DbType="Real")] + public System.Nullable COST { get { @@ -165,7 +165,7 @@ public float COST } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Date", AutoSync=AutoSync.OnUpdate, DbType="VarChar(2)", CanBeNull=false)] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Date", DbType="VarChar(2)")] public string Date { get @@ -206,7 +206,7 @@ protected virtual void SendPropertyChanged(String propertyName) } } - [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.WeeklyBills")] + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.WeeklyBill")] public partial class WeeklyBill : INotifyPropertyChanging, INotifyPropertyChanged { @@ -300,7 +300,7 @@ public partial class BringHomePay : INotifyPropertyChanging, INotifyPropertyChan private string _Name; - private System.Nullable _Amount; + private System.Nullable _Amount; #region Extensibility Method Definitions partial void OnLoaded(); @@ -308,7 +308,7 @@ public partial class BringHomePay : INotifyPropertyChanging, INotifyPropertyChan partial void OnCreated(); partial void OnNameChanging(string value); partial void OnNameChanged(); - partial void OnAmountChanging(System.Nullable value); + partial void OnAmountChanging(System.Nullable value); partial void OnAmountChanged(); #endregion @@ -338,7 +338,7 @@ public string Name } [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Amount", DbType="Decimal(18,2)")] - public System.Nullable Amount + public System.Nullable Amount { get { diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/Form1.cs b/WindowsFormsApplinq/WindowsFormsApplinq/Form1.cs index d724bc9..ab2c90f 100644 --- a/WindowsFormsApplinq/WindowsFormsApplinq/Form1.cs +++ b/WindowsFormsApplinq/WindowsFormsApplinq/Form1.cs @@ -44,8 +44,8 @@ private void formload() DataGridWeeklyBIlls.DataSource = week.WeeklyBills; DataClasses1DataContext bringHome = new DataClasses1DataContext(); - var bh = from br in bringHome.BringHomePays - select br; + var bh = from br in bringHome.BringHomePays + select br; dgBringHome.DataSource = bringHome.BringHomePays; } public void BtnSubmit_Click(object sender, EventArgs e) @@ -195,19 +195,19 @@ public void BtnSubmit_Click(object sender, EventArgs e) w.SubmitChanges(); MessageBox.Show("Weekly BIlls Updated"); } - float bh; + decimal bh; string thename; DataClasses1DataContext Bringit = new DataClasses1DataContext(); BringHomePay BRHOME = new BringHomePay(); int bindex = dgBringHome.CurrentRow.Index; thename = dgBringHome.Rows[bindex].Cells[0].Value.ToString(); - bh = float.Parse(dgBringHome.Rows[bindex].Cells[1].Value.ToString()); + bh = Decimal.Parse(dgBringHome.Rows[bindex].Cells[1].Value.ToString()); BringHomePay brh = Bringit.BringHomePays .Where(c => c.Name == thename) .Single(); - if( brh.Amount != bh) + if(brh.Amount != bh) { brh.Amount = bh; Bringit.SubmitChanges(); diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/Properties/Settings.Designer.cs b/WindowsFormsApplinq/WindowsFormsApplinq/Properties/Settings.Designer.cs index 6500275..b0a5159 100644 --- a/WindowsFormsApplinq/WindowsFormsApplinq/Properties/Settings.Designer.cs +++ b/WindowsFormsApplinq/WindowsFormsApplinq/Properties/Settings.Designer.cs @@ -12,7 +12,7 @@ namespace WindowsFormsApplinq.Properties { [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.0.0.0")] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.1.0.0")] internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); @@ -33,5 +33,17 @@ public string BillsConnectionString { return ((string)(this["BillsConnectionString"])); } } + + [global::System.Configuration.ApplicationScopedSettingAttribute()] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Configuration.SpecialSettingAttribute(global::System.Configuration.SpecialSetting.ConnectionString)] + [global::System.Configuration.DefaultSettingValueAttribute("Data Source=trbillsapp.database.windows.net;Initial Catalog=TRBills;User ID=tonyr" + + "yan;Password=AzureWebApp#1;Connect Timeout=30;Encrypt=True;TrustServerCertificat" + + "e=False")] + public string TRBillsConnectionString { + get { + return ((string)(this["TRBillsConnectionString"])); + } + } } } diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/Properties/Settings.settings b/WindowsFormsApplinq/WindowsFormsApplinq/Properties/Settings.settings index 8c3b902..a0a6e4a 100644 --- a/WindowsFormsApplinq/WindowsFormsApplinq/Properties/Settings.settings +++ b/WindowsFormsApplinq/WindowsFormsApplinq/Properties/Settings.settings @@ -10,5 +10,13 @@ </SerializableConnectionString> Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Bills;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False + + <?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>Data Source=trbillsapp.database.windows.net;Initial Catalog=TRBills;User ID=tonyryan;Password=AzureWebApp#1;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False</ConnectionString> + <ProviderName>System.Data.SqlClient</ProviderName> +</SerializableConnectionString> + Data Source=trbillsapp.database.windows.net;Initial Catalog=TRBills;User ID=tonyryan;Password=AzureWebApp#1;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False + \ No newline at end of file diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.exe b/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.exe index b1547aa..38fd4a7 100644 Binary files a/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.exe and b/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.exe differ diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.exe.config b/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.exe.config index 6e44ed4..088fd45 100644 --- a/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.exe.config +++ b/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.exe.config @@ -3,6 +3,7 @@ + diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.pdb b/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.pdb index 52697da..6186cf8 100644 Binary files a/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.pdb and b/WindowsFormsApplinq/WindowsFormsApplinq/bin/Debug/WindowsFormsApplinq.pdb differ diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/BillsDataSet.Designer.cs.dll b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/BillsDataSet.Designer.cs.dll index 6d0a816..6e12472 100644 Binary files a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/BillsDataSet.Designer.cs.dll and b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/BillsDataSet.Designer.cs.dll differ diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/DataClasses1.designer.cs.dll b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/DataClasses1.designer.cs.dll index aa64800..994c7f4 100644 Binary files a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/DataClasses1.designer.cs.dll and b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/DataClasses1.designer.cs.dll differ diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/DataClasses2.designer.cs.dll b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/DataClasses2.designer.cs.dll index faea244..72636f6 100644 Binary files a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/DataClasses2.designer.cs.dll and b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/TempPE/DataClasses2.designer.cs.dll differ diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.csprojAssemblyReference.cache b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.csprojAssemblyReference.cache index e50450a..80b9300 100644 Binary files a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.csprojAssemblyReference.cache and b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.csprojAssemblyReference.cache differ diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.exe b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.exe index b1547aa..38fd4a7 100644 Binary files a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.exe and b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.exe differ diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.exe.config b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.exe.config index 6e44ed4..088fd45 100644 --- a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.exe.config +++ b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.exe.config @@ -3,6 +3,7 @@ + diff --git a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.pdb b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.pdb index 52697da..6186cf8 100644 Binary files a/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.pdb and b/WindowsFormsApplinq/WindowsFormsApplinq/obj/Debug/WindowsFormsApplinq.pdb differ