protected void btnYes_Click(object sender, EventArgs e)
    {
        var ClaimList = new clsClaimCollection();

        ClaimList.ThisClaim.Find(ClaimID);
        ClaimList.Delete();
        Response.Redirect("ClaimList.aspx");
    }
Example #2
0
        public void DeleteMethodOK()
        {
            var AllClaims  = new clsClaimCollection();
            var TestItem   = new clsClaim();
            var PrimaryKey = 0;

            TestItem.ClaimStatus = true;
            TestItem.ClaimAmnt   = 295255.18M;
            TestItem.ClaimDate   = DateTime.Now.Date;
            TestItem.ClaimID     = 1;
            TestItem.ClaimReason = "sem";
            TestItem.CustomerID  = 8194;
            TestItem.StaffID     = 16;
            AllClaims.ThisClaim  = TestItem;
            PrimaryKey           = AllClaims.Add();
            TestItem.ClaimID     = PrimaryKey;
            AllClaims.ThisClaim.Find(PrimaryKey);
            AllClaims.Delete();
            var found = AllClaims.ThisClaim.Find(PrimaryKey);

            Assert.IsFalse(found);
        }