protected void Page_Load(object sender, EventArgs e) { try { HideErrorMessage(); if (GetFormIsPopup()) { Utilities.UpdatePageHeaderV2(Page.Master, true); } btnClose.Visible = GetFormIsPopup(); if (!IsPostBack) { FillInvoicesList(); } if (Session["UpdateFromWebPay"] != null) { PaymentPendingDB.UpdateAllPaymentsPending(null, DateTime.Now.AddDays(-15), DateTime.Now.AddDays(1), Convert.ToInt32(Session["StaffID"])); Session.Remove("UpdateFromWebPay"); } } catch (CustomMessageException ex) { if (IsPostBack) { SetErrorMessage(ex.Message); } else { HideTableAndSetErrorMessage(ex.Message); } } catch (Exception ex) { if (IsPostBack) { SetErrorMessage("", ex.ToString()); } else { HideTableAndSetErrorMessage("", ex.ToString()); } } }
protected void Run() { if (!CheckIsValidStartEndDates()) { return; } try { string output = PaymentPendingDB.UpdateAllPaymentsPending(null, GetFromDate(), GetToDate(), Convert.ToInt32(Session["StaffID"]), true); lblOutput.Text = output; } catch (System.ServiceModel.CommunicationException ex) { if (ex.Message == "The maximum message size quota for incoming messages (65536) has been exceeded. To increase the quota, use the MaxReceivedMessageSize property on the appropriate binding element.") { SetErrorMessage("Ezidebit can not return this much data in a single request. Please narrow the date range and try again."); return; } throw; } }