protected void btnDelete_Click(object sender, EventArgs e) { if (ListAppNoPay != null) { var biz = new BLL.PaymentBiz(); var res = biz.CancelApplicantsHeader(ListAppNoPay.ToArray()); if (res.IsError) { var errorMsg = res.ErrorMsg; UCModalError.ShowMessageError = res.ErrorMsg; UCModalError.ShowModalError(); } else { UCModalSuccess.ShowMessageSuccess = "ยกเลิกรายการ " + ListAppNoPay.Count + " รายการเรียบร้อยแล้ว"; UCModalSuccess.ShowModalSuccess(); btnDelete.Visible = true; ClearData(); btnSearch_Click(sender, e); // BindDataInGridview(true); NPbutton(btnPreviousGvSearch, txtNumberGvSearch, btnNextGvSearch, "", txtTotalPage); PnlDetail.Visible = true; UpdatePanelGv.Update(); ListAppNoPay = new List <DTO.AppNoPay>(); if (gvSearch.Rows.Count == 0) { btnExportExcel.Visible = false; } } } else { UCModalError.ShowMessageError = Resources.errorApplicantNoPay_003; UCModalError.ShowModalError(); } }