protected void btnDeleteMultiple_Click(object sender, EventArgs e) { string path = Server.MapPath("~/"); lt_pw = t.getStageByValidationID(Session["edit_transID"].ToString()); if (lt_pw.Count > 0) { lt_app = t.getApplicantListByUserID(lt_pw[0].ID); lt_mi = t.getMarkInfoByUserID(lt_pw[0].ID); lt_aos = t.getAddressServiceListByID(lt_pw[0].ID); lt_rep = t.getRepListByUserID(lt_pw[0].ID); if (lt_app.Count > 0) { lt_appaddy = t.getAddressListByID(lt_app[0].addressID); } if (lt_rep.Count > 0) { lt_repaddy = t.getAddressListByID(lt_rep[0].addressID); } } if (lt_pw.Count > 1) { for (int i = 0; i < lt_pw.Count - 1; i++) { t.flushPwalletByID(lt_pw[i].ID); } } if (lt_app.Count > 1) { for (int i = 0; i < lt_app.Count - 1; i++) { t.flushApplicantByID(lt_app[i].ID); t.flushAddressByID(lt_app[i].addressID); } } if (lt_mi.Count > 1) { for (int i = 0; i < lt_mi.Count - 1; i++) { t.flushMark_infoByID(path, lt_mi[i].xID); } } if (lt_aos.Count > 1) { for (int i = 0; i < lt_aos.Count - 1; i++) { t.flushAddress_serviceByID(lt_aos[i].ID); } } if (lt_rep.Count > 1) { for (int i = 0; i < lt_rep.Count - 1; i++) { t.flushRepresentativeByID(lt_rep[i].ID); t.flushAddressByID(lt_rep[i].addressID); } } multiple_succ_status = "Entries Deleted Successfully!!"; this.lt_pw = this.t.getStageByValidationID(Session["edit_transID"].ToString()); if (this.lt_pw.Count != 0) { pwallet_status = "RECORD EXISTS."; lt_app = t.getApplicantListByUserID(lt_pw[0].ID); if (this.lt_app.Count != 0) { appx_status = "RECORD EXISTS."; } lt_mi = t.getMarkInfoByUserID(lt_pw[0].ID); if (this.lt_mi.Count != 0) { mark_status = "RECORD EXISTS."; } lt_aos = t.getAddressServiceListByID(lt_pw[0].ID); if (this.lt_aos.Count != 0) { aos_status = "RECORD EXISTS."; } lt_rep = t.getRepListByUserID(lt_pw[0].ID); if (this.lt_rep.Count != 0) { rep_status = "RECORD EXISTS."; } if (this.lt_app.Count != 0) { lt_appaddy = t.getAddressListByID(lt_app[0].addressID); if (this.lt_appaddy.Count != 0) { appaddy_status = "RECORD EXISTS."; } } if (this.lt_rep.Count != 0) { lt_repaddy = t.getAddressListByID(lt_rep[0].addressID); if (this.lt_repaddy.Count != 0) { repaddy_status = "RECORD EXISTS."; } } if ((lt_aos.Count > 1) || (lt_app.Count > 1) || (lt_rep.Count > 1) || (lt_mi.Count > 1) || (lt_appaddy.Count > 1) || (lt_repaddy.Count > 1) || (lt_pw.Count > 1)) { multiple_status = "1"; } this.showt = 1; } else { trans_status = "THE REFERENCE NUMBER DOESN'T EXIST ON THE SYSTEM"; } }