public Payment GetDetailsWithBillNo(string billNo) { Payment pay1 = new Payment(); if (billNo.Length == 19) { pay1 = pGateway.GetDetailsWithBillNo(billNo); if (pay1.BillNo != billNo) { pay1.BillNo = "Not Found."; return(pay1); } return(pay1); } pay1.BillNo = "Wrong bill number! Enter the correct one."; return(pay1); }