/* Event for delete the referral */ protected void btnDelete_Click(object sender, EventArgs e) { string StrReferalID = Utility.GetCheckedRow(gdvReferalSource, "chkSelect"); if (StrReferalID != "") { StoreFront ObjStoreFront = new StoreFront(); int Count = ObjStoreFront.DeleteReferalSource(StrReferalID); if (Count == 0) { ErrMessage("Referal source(s) in use. It cannot be deleted unless all references to it are deleted"); } else { SuccesfullMessage("Referral Name(s) deleted successfully."); } } BindGrid(); }