-
Notifications
You must be signed in to change notification settings - Fork 0
/
Test07.cs
46 lines (41 loc) · 1.61 KB
/
Test07.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
using System;
using System.Collections.Generic;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Configuration;
using NUnit.Framework;
/* Test Project #7 - Data from Database
* Calls Database.Get
* Takes the Query
*/
namespace TestingProject01
{
class Test07
{
[Test]
public void TestwithDB()
{
string vLenderLoanNumber;
string vSellerNumber;
string vFinancialInstitutionNumber;
string vMortgageDate;
DataTable dbData = DataReaders.Database.Get("Select * from MortgageLoanTestData");
foreach (DataRow oDataRow in dbData.Rows)
{
vLenderLoanNumber = oDataRow["LenderLoanNumber"].ToString().Trim();
vSellerNumber = oDataRow["SellerNumber"].ToString().Trim();
vFinancialInstitutionNumber = oDataRow["FinancialInstitutionNumber"].ToString().Trim();
vMortgageDate = oDataRow["DateOfMortgageNote"].ToString().Trim();
Console.WriteLine("******************************");
Console.WriteLine("Lender Loan Number: " + oDataRow["LenderLoanNumber"].ToString().Trim());
Console.WriteLine("Seller Number: " + oDataRow["SellerNumber"].ToString().Trim());
Console.WriteLine("Financial Institution Number: " + oDataRow["FinancialInstitutionNumber"].ToString().Trim());
Console.WriteLine("Mortgage Date: " + oDataRow["DateOfMortgageNote"].ToString().Trim());
}
}
}
}