protected void btnFind_Click(object sender, EventArgs e) { var AClaim = new clsClaim(); int ClaimID; if (!int.TryParse(txtClaimID.Text, out ClaimIDTemp)) { lblError.Text = "<br />ClaimID is not an Integer<br />"; } else { lblError.Text = ""; ClaimID = ClaimIDTemp; Session["ClaimID"] = ClaimID; var Found = AClaim.Find(ClaimID); if (Found) { txtClaimID.Text = Convert.ToString(AClaim.ClaimID); txtCustomerID.Text = Convert.ToString(AClaim.CustomerID); txtStaffID.Text = Convert.ToString(AClaim.StaffID); txtClaimDate.Text = Convert.ToString(AClaim.ClaimDate); txtClaimAmnt.Text = Convert.ToString(AClaim.ClaimAmnt); txtClaimStatus.Text = Convert.ToString(AClaim.ClaimStatus); txtClaimReason.Text = Convert.ToString(AClaim.ClaimReason); } else { lblError.Text = "<br />[ClaimID]: " + ClaimID + " - is not in the Database!!<br />"; } } }
public void FindMethodOK() { var AClaim = new clsClaim(); var Found = false; var ClaimID = 1; Found = AClaim.Find(ClaimID); Assert.IsTrue(Found); }
public void TestClaimReasonNoFound() { var AClaim = new clsClaim(); var Found = false; var OK = true; var ClaimID = 1; Found = AClaim.Find(ClaimID); if (AClaim.ClaimReason != "sem") { OK = false; } Assert.IsTrue(OK); }
public void TestClaimStatusNoFound() { var AClaim = new clsClaim(); var Found = false; var OK = true; var ClaimID = 1; Found = AClaim.Find(ClaimID); if (!AClaim.ClaimStatus) { OK = false; } Assert.IsTrue(OK); }
public void TestClaimAmntNoFound() { var AClaim = new clsClaim(); var Found = false; var OK = true; var ClaimID = 1; Found = AClaim.Find(ClaimID); if (AClaim.ClaimAmnt != 295255.18M) { OK = false; } Assert.IsTrue(OK); }
public void TestClaimDateNoFound() { var AClaim = new clsClaim(); var Found = false; var OK = true; var ClaimID = 1; Found = AClaim.Find(ClaimID); if (AClaim.ClaimDate != Convert.ToDateTime("13/03/2020")) { OK = false; } Assert.IsTrue(OK); }
public void TestCustomerIDNoFound() { var AClaim = new clsClaim(); var Found = false; var OK = true; var ClaimID = 1; Found = AClaim.Find(ClaimID); if (AClaim.CustomerID != 8194) { OK = false; } Assert.IsTrue(OK); }
public void TestStaffIDNoFound() { var AClaim = new clsClaim(); var Found = false; var OK = true; var ClaimID = 1; Found = AClaim.Find(ClaimID); if (AClaim.StaffID != 16) { OK = false; } Assert.IsTrue(OK); }