Skip to content

Commit

Permalink
Azure first commit weekly datagrid not populating
Browse files Browse the repository at this point in the history
  • Loading branch information
TONYRYANWORLDWIDE committed Jun 20, 2019
1 parent 6281c22 commit 6b21dc5
Show file tree
Hide file tree
Showing 18 changed files with 57 additions and 32 deletions.
Binary file modified WindowsFormsApplinq/.vs/WindowsFormsApplinq/v16/.suo
Binary file not shown.
3 changes: 3 additions & 0 deletions WindowsFormsApplinq/WindowsFormsApplinq/App.config
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@
<add name="WindowsFormsApplinq.Properties.Settings.BillsConnectionString"
connectionString="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Bills;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False"
providerName="System.Data.SqlClient" />
<add name="WindowsFormsApplinq.Properties.Settings.TRBillsConnectionString"
connectionString="Data Source=trbillsapp.database.windows.net;Initial Catalog=TRBills;User ID=tonyryan;Password=AzureWebApp#1;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False"
providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
Expand Down
14 changes: 7 additions & 7 deletions WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<?xml version="1.0" encoding="utf-8"?><Database Name="Bills" Class="DataClasses1DataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
<Connection Mode="AppSettings" ConnectionString="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Bills;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False" SettingsObjectName="WindowsFormsApplinq.Properties.Settings" SettingsPropertyName="BillsConnectionString" Provider="System.Data.SqlClient" />
<Table Name="dbo.MonthlyBills" Member="MonthlyBills">
<?xml version="1.0" encoding="utf-8"?><Database Name="TRBills" Class="DataClasses1DataContext" xmlns="http://schemas.microsoft.com/linqtosql/dbml/2007">
<Connection Mode="AppSettings" ConnectionString="Data Source=trbillsapp.database.windows.net;Initial Catalog=TRBills;User ID=tonyryan;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False" SettingsObjectName="WindowsFormsApplinq.Properties.Settings" SettingsPropertyName="TRBillsConnectionString" Provider="System.Data.SqlClient" />
<Table Name="dbo.MonthlyBill" Member="MonthlyBills">
<Type Name="MonthlyBill">
<Column Name="BILL" AutoSync="OnUpdate" Type="System.String" DbType="VarChar(50)" IsPrimaryKey="true" CanBeNull="false" />
<Column Name="COST" AutoSync="OnUpdate" Type="System.Single" DbType="Real" CanBeNull="false" />
<Column Name="Date" AutoSync="OnUpdate" Type="System.String" DbType="VarChar(2)" CanBeNull="false" />
<Column Name="BILL" Type="System.String" DbType="VarChar(50) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
<Column Name="COST" Type="System.Single" DbType="Real" CanBeNull="true" />
<Column Name="Date" Type="System.String" DbType="VarChar(2)" CanBeNull="true" />
</Type>
</Table>
<Table Name="dbo.WeeklyBills" Member="WeeklyBills">
<Table Name="dbo.WeeklyBill" Member="WeeklyBills">
<Type Name="WeeklyBill">
<Column Name="Bill" Type="System.String" DbType="VarChar(50) NOT NULL" IsPrimaryKey="true" CanBeNull="false" />
<Column Name="Cost" Type="System.Single" DbType="Real" CanBeNull="true" />
Expand Down
12 changes: 6 additions & 6 deletions WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.dbml.layout
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,22 @@
<ordesignerObjectsDiagram dslVersion="1.0.0.0" absoluteBounds="0, 0, 11, 8.5" name="DataClasses1">
<DataContextMoniker Name="/DataClasses1DataContext" />
<nestedChildShapes>
<classShape Id="153ff8c9-6d65-401e-905a-a5b49fb7fa7c" absoluteBounds="2, 1.75, 2, 1.3862939453125">
<classShape Id="d4851a21-84b0-4e39-a109-eed234cac237" absoluteBounds="2.125, 2.25, 2, 1.3862939453125">
<DataClassMoniker Name="/DataClasses1DataContext/MonthlyBill" />
<nestedChildShapes>
<elementListCompartment Id="a3ae5c57-1b6b-403d-837b-cfcdc6353efd" absoluteBounds="2.015, 2.21, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
<elementListCompartment Id="a788dbb2-9eee-48f7-800a-69a101ff99c4" absoluteBounds="2.14, 2.71, 1.9700000000000002, 0.8262939453125" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
</nestedChildShapes>
</classShape>
<classShape Id="96cee989-d702-4ab0-85c9-bb2526dacb95" absoluteBounds="4.5, 1.875, 2, 1.1939925130208333">
<classShape Id="b6066fcb-1cb7-40b4-ba9a-01fdb23bc528" absoluteBounds="5.375, 2.5, 2, 1.1939925130208333">
<DataClassMoniker Name="/DataClasses1DataContext/WeeklyBill" />
<nestedChildShapes>
<elementListCompartment Id="f67db2c5-c128-4640-bab5-b79dbbe3607c" absoluteBounds="4.515, 2.335, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
<elementListCompartment Id="9be78aab-64d4-4747-ae56-d1de64bee326" absoluteBounds="5.39, 2.96, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
</nestedChildShapes>
</classShape>
<classShape Id="c3b271cd-5f83-4993-90c8-bb97b0cb7f03" absoluteBounds="1.375, 4.625, 2, 1.1939925130208333">
<classShape Id="a401cd14-c716-476b-9211-905b6a6e18fa" absoluteBounds="2.125, 6.25, 2, 1.1939925130208333">
<DataClassMoniker Name="/DataClasses1DataContext/BringHomePay" />
<nestedChildShapes>
<elementListCompartment Id="c33a1a8a-20f3-4c86-a24f-09c0abc71bf0" absoluteBounds="1.3900000000000001, 5.085, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
<elementListCompartment Id="795c0742-8cff-4ead-921b-77547b73120c" absoluteBounds="2.14, 6.71, 1.9700000000000002, 0.63399251302083326" name="DataPropertiesCompartment" titleTextColor="Black" itemTextColor="Black" />
</nestedChildShapes>
</classShape>
</nestedChildShapes>
Expand Down
26 changes: 13 additions & 13 deletions WindowsFormsApplinq/WindowsFormsApplinq/DataClasses1.designer.cs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions WindowsFormsApplinq/WindowsFormsApplinq/Form1.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,13 @@
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Bills;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False</Value>
</Setting>
<Setting Name="TRBillsConnectionString" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=trbillsapp.database.windows.net;Initial Catalog=TRBills;User ID=tonyryan;Password=AzureWebApp#1;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=trbillsapp.database.windows.net;Initial Catalog=TRBills;User ID=tonyryan;Password=AzureWebApp#1;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False</Value>
</Setting>
</Settings>
</SettingsFile>
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<configSections></configSections>
<connectionStrings>
<add name="WindowsFormsApplinq.Properties.Settings.BillsConnectionString" connectionString="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Bills;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False" providerName="System.Data.SqlClient" />
<add name="WindowsFormsApplinq.Properties.Settings.TRBillsConnectionString" connectionString="Data Source=trbillsapp.database.windows.net;Initial Catalog=TRBills;User ID=tonyryan;Password=AzureWebApp#1;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False" providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
<configSections></configSections>
<connectionStrings>
<add name="WindowsFormsApplinq.Properties.Settings.BillsConnectionString" connectionString="Data Source=(localdb)\MSSQLLocalDB;Initial Catalog=Bills;Integrated Security=True;Connect Timeout=30;Encrypt=False;TrustServerCertificate=False" providerName="System.Data.SqlClient" />
<add name="WindowsFormsApplinq.Properties.Settings.TRBillsConnectionString" connectionString="Data Source=trbillsapp.database.windows.net;Initial Catalog=TRBills;User ID=tonyryan;Password=AzureWebApp#1;Connect Timeout=30;Encrypt=True;TrustServerCertificate=False" providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" />
Expand Down
Binary file not shown.

0 comments on commit 6b21dc5

Please sign in to comment.