Пример #1
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        HideErrorMessage();

        if (txtStartDate.Text.Length > 0 && (!Regex.IsMatch(txtStartDate.Text, @"^\d{2}\-\d{2}\-\d{4}$") || !IsValidDate(txtStartDate.Text)))
        {
            SetErrorMessage("Start date must be empty or valid and of the format dd-mm-yyyy");
            return;
        }
        if (txtEndDate.Text.Length > 0 && (!Regex.IsMatch(txtEndDate.Text, @"^\d{2}\-\d{2}\-\d{4}$") || !IsValidDate(txtEndDate.Text)))
        {
            SetErrorMessage("End date must be empty or valid and of the format dd-mm-yyyy");
            return;
        }


        DateTime startDate = txtStartDate.Text.Length == 0 ? DateTime.MinValue : GetDateFromString(txtStartDate.Text, "dd-mm-yyyy");
        DateTime endDate   = txtEndDate.Text.Length == 0 ? DateTime.MinValue : GetDateFromString(txtEndDate.Text, "dd-mm-yyyy");

        string url = ClearSearchesFromUrl(Request.RawUrl);

        url = UrlParamModifier.AddEdit(url, "start_date", startDate == DateTime.MinValue ? "" : startDate.ToString("yyyy_MM_dd"));
        url = UrlParamModifier.AddEdit(url, "end_date", endDate == DateTime.MinValue ? "" : endDate.ToString("yyyy_MM_dd"));
        url = UrlParamModifier.AddEdit(url, "inc_medicare", chkIncMedicare.Checked   ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "inc_dva", chkIncDVA.Checked        ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "inc_private", chkIncPrivate.Checked    ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "inc_reconciled", chkIncReconciled.Checked ? "1" : "0");

        Response.Redirect(url);
    }
Пример #2
0
    protected void chkShowDeleted_Submit(object sender, EventArgs e)
    {
        string url = Request.RawUrl;

        url = UrlParamModifier.Update(chkShowDeleted.Checked, url, "show_deleted", "1");
        Response.Redirect(url);
    }
Пример #3
0
    protected void btnSearchName_Click(object sender, EventArgs e)
    {
        //if (!Regex.IsMatch(txtSearchName.Text, @"^[a-zA-Z\-]*$"))
        //{
        //    SetErrorMessage("Search text can only be letters and hyphens");
        //    return;
        //}
        //else
        if (txtSearchName.Text.Trim().Length == 0)
        {
            SetErrorMessage("No search text entered");
            return;
        }
        else
        {
            HideErrorMessage();
        }


        string url = Request.RawUrl;

        url = UrlParamModifier.AddEdit(url, "name_search", txtSearchName.Text);
        url = UrlParamModifier.AddEdit(url, "name_starts_with", chkSearchOnlyStartWith.Checked ? "1" : "0");
        Response.Redirect(url);
    }
    protected void ddlOfferings_SelectedIndexChanged(object sender, EventArgs e)
    {
        string url = Request.RawUrl;

        url = UrlParamModifier.Update(ddlOfferings.SelectedValue != "-1", url, "offering", ddlOfferings.SelectedValue);
        Response.Redirect(url);
    }
    protected string ClearSearchesFromUrl(string url)
    {
        url = UrlParamModifier.Remove(url, "start_date");
        url = UrlParamModifier.Remove(url, "end_date");

        return(url);
    }
Пример #6
0
    protected void btnEdit_Click(object sender, EventArgs e)
    {
        string url = Request.RawUrl;

        url = UrlParamModifier.AddEdit(url, "type", "edit");
        Response.Redirect(url);
    }
Пример #7
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        HideErrorMessage();

        if (txtStartDate.Text.Length > 0 && (!Regex.IsMatch(txtStartDate.Text, @"^\d{2}\-\d{2}\-\d{4}$") || !IsValidDate(txtStartDate.Text)))
        {
            SetErrorMessage("Start date must be empty or valid and of the format dd-mm-yyyy");
            return;
        }
        if (txtEndDate.Text.Length > 0 && (!Regex.IsMatch(txtEndDate.Text, @"^\d{2}\-\d{2}\-\d{4}$") || !IsValidDate(txtEndDate.Text)))
        {
            SetErrorMessage("End date must be empty or valid and of the format dd-mm-yyyy");
            return;
        }


        DateTime startDate = txtStartDate.Text.Length == 0 ? DateTime.MinValue : GetDateFromString(txtStartDate.Text, "dd-mm-yyyy");
        DateTime endDate   = txtEndDate.Text.Length == 0 ? DateTime.MinValue : GetDateFromString(txtEndDate.Text, "dd-mm-yyyy");

        string url = ClearSearchesFromUrl(Request.RawUrl);

        url = UrlParamModifier.AddEdit(url, "start_date", startDate == DateTime.MinValue ? "" : startDate.ToString("yyyy_MM_dd"));
        url = UrlParamModifier.AddEdit(url, "end_date", endDate == DateTime.MinValue ? "" : endDate.ToString("yyyy_MM_dd"));
        url = UrlParamModifier.AddEdit(url, "inc_all_sites", chkIncAllSites.Checked             ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "inc_incomplete_bookings", chkIncIncompleteBookings.Checked   ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "inc_paid_unavailabilities", chkIncPaidUnavailabilities.Checked ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "date_across_top", chkDateAcrossTop.Checked           ? "1" : "0");

        Response.Redirect(url);
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        if (!Regex.IsMatch(txtStartDate.Text, @"^\d{2}\-\d{2}\-\d{4}$"))
        {
            SetErrorMessage("Start date must be of the format yyyy-mm-dd");
            return;
        }
        if (!Regex.IsMatch(txtEndDate.Text, @"^\d{2}\-\d{2}\-\d{4}$"))
        {
            SetErrorMessage("End date must be of the format yyyy-mm-dd");
            return;
        }
        else
        {
            HideErrorMessage();
        }


        DateTime startDate = GetDateFromString(txtStartDate.Text, "dd-mm-yyyy");
        DateTime endDate   = GetDateFromString(txtEndDate.Text, "dd-mm-yyyy");


        string url = ClearSearchesFromUrl(Request.RawUrl);

        url = UrlParamModifier.AddEdit(url, "start_date", startDate.ToString("yyyy_MM_dd"));
        url = UrlParamModifier.AddEdit(url, "end_date", endDate.ToString("yyyy_MM_dd"));
        Response.Redirect(url);
    }
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        HideErrorMessage();

        if (txtStartDate.Text.Length > 0 && (!Regex.IsMatch(txtStartDate.Text, @"^\d{2}\-\d{2}\-\d{4}$") || !IsValidDate(txtStartDate.Text)))
        {
            SetErrorMessage("Start date must be empty or valid and of the format dd-mm-yyyy");
            return;
        }
        if (txtEndDate.Text.Length > 0 && (!Regex.IsMatch(txtEndDate.Text, @"^\d{2}\-\d{2}\-\d{4}$") || !IsValidDate(txtEndDate.Text)))
        {
            SetErrorMessage("End date must be empty or valid and of the format dd-mm-yyyy");
            return;
        }


        DateTime startDate = txtStartDate.Text.Length == 0 ? DateTime.MinValue : GetDateFromString(txtStartDate.Text, "dd-mm-yyyy");
        DateTime endDate   = txtEndDate.Text.Length == 0 ? DateTime.MinValue : GetDateFromString(txtEndDate.Text, "dd-mm-yyyy");

        string url = ClearSearchesFromUrl(Request.RawUrl);

        url = UrlParamModifier.AddEdit(url, "start_date", startDate == DateTime.MinValue ? "" : startDate.ToString("yyyy_MM_dd"));
        url = UrlParamModifier.AddEdit(url, "end_date", endDate == DateTime.MinValue ? "" : endDate.ToString("yyyy_MM_dd"));
        url = UrlParamModifier.AddEdit(url, "inc_completed", chkIncCompleted.Checked  ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "inc_incomplete", chkIncIncomplete.Checked ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "inc_cancelled", chkIncCancelled.Checked  ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "inc_deleted", chkIncDeleted.Checked    ? "1" : "0");

        url = UrlParamModifier.Update(txtBookingNbrSearch.Text.Trim().Length > 0, url, "booking_nbr_search", txtBookingNbrSearch.Text.Trim());

        Response.Redirect(url);
    }
Пример #10
0
    protected void btnSearch_Click(object sender, EventArgs e)
    {
        HideErrorMessage();


        DateTime startDate = new DateTime(2004, Convert.ToInt32(ddlStartDate_Month.SelectedValue), Convert.ToInt32(ddlStartDate_Day.SelectedValue));
        DateTime endDate   = new DateTime(2004, Convert.ToInt32(ddlEndDate_Month.SelectedValue), Convert.ToInt32(ddlEndDate_Day.SelectedValue));

        if (endDate < startDate)
        {
            endDate = endDate.AddYears(1);                       // if say dec 20 - jan 10, make the jan 10 for next year
        }
        if (endDate.Subtract(startDate).TotalDays > 62)
        {
            SetErrorMessage("Can not select more than 2 months");
            return;
        }

        string url = ClearSearchesFromUrl(Request.RawUrl);

        url = UrlParamModifier.AddEdit(url, "start_date", startDate.ToString("M_d"));
        url = UrlParamModifier.AddEdit(url, "end_date", endDate.ToString("M_d"));
        url = UrlParamModifier.AddEdit(url, "inc_with_mobile", chkIncWithMobile.Checked ? "1" : "0");
        url = UrlParamModifier.AddEdit(url, "inc_with_email", chkIncWithEmail.Checked  ? "1" : "0");

        Response.Redirect(url);
    }
Пример #11
0
    protected void btnClearNameSearch_Click(object sender, EventArgs e)
    {
        string url = Request.RawUrl;

        url = UrlParamModifier.Remove(url, "name_search");
        url = UrlParamModifier.Remove(url, "name_starts_with");
        Response.Redirect(url);
    }
Пример #12
0
    protected void ddlReceiptPaymentType_SelectedIndexChanged(object sender, EventArgs e)
    {
        int newddlReceiptPaymentTypeID = Convert.ToInt32(ddlReceiptPaymentType.SelectedValue);

        string url = Request.RawUrl;

        url = UrlParamModifier.Update(newddlReceiptPaymentTypeID != -1, url, "payment_type", newddlReceiptPaymentTypeID == -1 ? "" : newddlReceiptPaymentTypeID.ToString());
        Response.Redirect(url);
    }
Пример #13
0
    protected void ddlProviders_SelectedIndexChanged(object sender, EventArgs e)
    {
        int newProvID = Convert.ToInt32(ddlProviders.SelectedValue);

        string url = Request.RawUrl;

        url = UrlParamModifier.Update(newProvID != -1, url, "provider", newProvID == -1 ? "" : newProvID.ToString());
        Response.Redirect(url);
    }
Пример #14
0
    protected string ClearSearchesFromUrl(string url)
    {
        url = UrlParamModifier.Remove(url, "start_date");
        url = UrlParamModifier.Remove(url, "end_date");
        url = UrlParamModifier.Remove(url, "inc_all_sites");
        url = UrlParamModifier.Remove(url, "inc_bookings");
        url = UrlParamModifier.Remove(url, "date_across_top");

        return(url);
    }
Пример #15
0
    protected void btnCancel_Click(object sender, EventArgs e)
    {
        if (GetUrlParamType() == UrlParamType.Edit)
        {
            Response.Redirect(UrlParamModifier.AddEdit(Request.RawUrl, "type", "view"));
            return;
        }

        // close this window
        Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "<script language=javascript>window.returnValue=false;self.close();</script>");
    }
    protected string ClearSearchesFromUrl(string url)
    {
        //url = UrlParamModifier.Remove(url, "start_date");
        url = UrlParamModifier.Remove(url, "end_date");
        url = UrlParamModifier.Remove(url, "no_recall_after");
        url = UrlParamModifier.Remove(url, "show_with_epc");
        url = UrlParamModifier.Remove(url, "show_with_no_epc");
        url = UrlParamModifier.Remove(url, "org");

        return(url);
    }
    protected string ClearSearchesFromUrl(string url)
    {
        url = UrlParamModifier.Remove(url, "start_date");
        url = UrlParamModifier.Remove(url, "end_date");
        url = UrlParamModifier.Remove(url, "inc_completed");
        url = UrlParamModifier.Remove(url, "inc_incomplete");
        url = UrlParamModifier.Remove(url, "inc_cancelled");
        url = UrlParamModifier.Remove(url, "booking_nbr_search");

        return(url);
    }
Пример #18
0
    protected string ClearSearchesFromUrl(string url)
    {
        url = UrlParamModifier.Remove(url, "start_date");
        url = UrlParamModifier.Remove(url, "end_date");
        url = UrlParamModifier.Remove(url, "inc_medicare");
        url = UrlParamModifier.Remove(url, "inc_dva");
        url = UrlParamModifier.Remove(url, "inc_private");
        url = UrlParamModifier.Remove(url, "inc_reconciled");

        return(url);
    }
 protected void ddlOrgs_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlOrgs.SelectedValue == "0")
     {
         Response.Redirect(UrlParamModifier.Remove(Request.RawUrl, "id"));
     }
     else
     {
         Response.Redirect(UrlParamModifier.AddEdit(Request.RawUrl, "id", ddlOrgs.SelectedValue));
     }
 }
Пример #20
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (GetUrlParamType() == UrlParamType.View)
        {
            Response.Redirect(UrlParamModifier.AddEdit(Request.RawUrl, "type", "edit"));
        }
        else if (GetUrlParamType() == UrlParamType.Edit)
        {
            if (!IsValidFormID())
            {
                HideTableAndSetErrorMessage();
                return;
            }

            int offeringID = GetFormID();
            if (!OfferingDB.Exists(offeringID))
            {
                HideTableAndSetErrorMessage("Invalid Offering ID");
                return;
            }

            OfferingDB.UpdatePopupMessage(offeringID, txtPopupMessage.Text);

            //close this window
            Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "<script language=javascript>window.returnValue=false;self.close();</script>");
        }
        else if (GetUrlParamType() == UrlParamType.Add)
        {
            if (!IsValidFormID())
            {
                HideTableAndSetErrorMessage();
                return;
            }

            int offeringID = GetFormID();
            if (!OfferingDB.Exists(offeringID))
            {
                HideTableAndSetErrorMessage("Invalid Offering ID");
                return;
            }


            OfferingDB.UpdatePopupMessage(offeringID, txtPopupMessage.Text);


            // close this window
            Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "<script language=javascript>window.returnValue=false;self.close();</script>");
        }
        else
        {
            HideTableAndSetErrorMessage("", "Invalid URL Parameters");
        }
    }
Пример #21
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (GetUrlParamType() == UrlParamType.View)
        {
            Response.Redirect(UrlParamModifier.AddEdit(Request.RawUrl, "type", "edit"));
        }
        else if (GetUrlParamType() == UrlParamType.Edit)
        {
            if (!IsValidFormID())
            {
                HideTableAndSetErrorMessage();
                return;
            }

            Patient patient = PatientDB.GetByID(GetFormID());
            if (patient == null)
            {
                HideTableAndSetErrorMessage("Invalid Patient ID");
                return;
            }

            PatientDB.UpdateFlashingText(patient.PatientID, txtFlashingText.Text, Convert.ToInt32(Session["StaffID"]), DateTime.Now);

            //close this window
            Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "<script language=javascript>window.opener.location.href=window.opener.location.href;self.close();</script>");
        }
        else if (GetUrlParamType() == UrlParamType.Add)
        {
            if (!IsValidFormID())
            {
                HideTableAndSetErrorMessage();
                return;
            }

            Patient patient = PatientDB.GetByID(GetFormID());
            if (patient == null)
            {
                HideTableAndSetErrorMessage("Invalid Patient ID");
                return;
            }

            PatientDB.UpdateFlashingText(patient.PatientID, txtFlashingText.Text, Convert.ToInt32(Session["StaffID"]), DateTime.Now);

            // close this window
            Page.ClientScript.RegisterStartupScript(this.GetType(), "close", "<script language=javascript>window.opener.location.href=window.opener.location.href;self.close();</script>");
        }
        else
        {
            HideTableAndSetErrorMessage("", "Invalid URL Parameters");
        }
    }
 protected void btnClearSurnameSearch_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["surname_search"] != null || Request.QueryString["surname_starts_with"] != null)
     {
         string url = Request.RawUrl;
         url = UrlParamModifier.Remove(url, "surname_search");
         url = UrlParamModifier.Remove(url, "surname_starts_with");
         Response.Redirect(url);
     }
     else
     {
         txtSearchSurname.Text = "";
     }
 }
Пример #23
0
    protected void btnMoveDate_Command(object sender, CommandEventArgs e)
    {
        txtStartDate.Text = txtStartDate.Text.Trim();
        if (txtStartDate.Text.Length == 0 || !Utilities.IsValidDate(txtStartDate.Text, "dd-mm-yyyy"))
        {
            SetErrorMessage("Invalid Date to move.");
            return;
        }

        DateTime startDate = Utilities.GetDate(txtStartDate.Text, "dd-mm-yyyy");

        if (e.CommandArgument == "Today")
        {
            startDate = DateTime.Today;
        }
        else
        {
            int totalToMove = Convert.ToInt32(ddlMoveDateNum.SelectedValue);
            if (e.CommandArgument == "Backwards")
            {
                totalToMove *= -1;
            }

            if (ddlMoveDateType.SelectedValue == "Days")
            {
                startDate = startDate.AddDays(totalToMove);
            }
            if (ddlMoveDateType.SelectedValue == "Weeks")
            {
                startDate = startDate.AddDays(totalToMove * 7);
            }
            if (ddlMoveDateType.SelectedValue == "Months")
            {
                startDate = startDate.AddMonths(totalToMove);
            }
            if (ddlMoveDateType.SelectedValue == "Years")
            {
                startDate = startDate.AddYears(totalToMove);
            }
        }

        string newURL = Request.RawUrl;

        newURL = UrlParamModifier.AddEdit(newURL, "date", startDate.ToString("yyyy_MM_dd"));
        Response.Redirect(newURL);
    }
    protected void btnSearchPhoneNbr_Click(object sender, EventArgs e)
    {
        if (!Regex.IsMatch(txtSearchPhoneNbr.Text, @"^[0-9]*$"))
        {
            SetErrorMessage("Phone Nbr can only be numbers. No spaces, dashes or other characters");
            return;
        }
        else
        {
            HideErrorMessage();
        }

        string url = Request.RawUrl;

        url = UrlParamModifier.AddEdit(url, "phone_nbr_search", txtSearchPhoneNbr.Text);
        url = UrlParamModifier.AddEdit(url, "phone_nbr_starts_with", chkPhoneNbrSearchOnlyStartWith.Checked ? "1" : "0");
        Response.Redirect(url);
    }
    protected void btnSearchProviderNbr_Click(object sender, EventArgs e)
    {
        if (!Regex.IsMatch(txtSearchProviderNbr.Text, @"^[0-9a-zA-Z\-]*$"))
        {
            SetErrorMessage("Provider Nbr can only be letters and numbers");
            return;
        }
        else
        {
            HideErrorMessage();
        }

        string url = Request.RawUrl;

        url = UrlParamModifier.AddEdit(url, "provider_nbr_search", txtSearchProviderNbr.Text);
        url = UrlParamModifier.AddEdit(url, "provider_nbr_starts_with", chkProviderNbrSearchOnlyStartWith.Checked ? "1" : "0");
        Response.Redirect(url);
    }
    protected void btnSearchSurname_Click(object sender, EventArgs e)
    {
        if (!Regex.IsMatch(txtSearchSurname.Text, @"^[a-zA-Z\-\']*$"))
        {
            SetErrorMessage("Search text can only be letters and hyphens");
            return;
        }
        else
        {
            HideErrorMessage();
        }

        string url = Request.RawUrl;

        url = UrlParamModifier.AddEdit(url, "surname_search", txtSearchSurname.Text);
        url = UrlParamModifier.AddEdit(url, "surname_starts_with", chkSurnameSearchOnlyStartWith.Checked ? "1" : "0");
        Response.Redirect(url);
    }
    protected void btnSurnameSearch_Command(object sender, CommandEventArgs e)
    {
        if (e.CommandName == "SurnameSearch")
        {
            string letter = e.CommandArgument.ToString();

            if (letter == "All")
            {
                string url = Request.RawUrl;
                url = UrlParamModifier.Remove(url, "surname_search");
                url = UrlParamModifier.Remove(url, "surname_starts_with");
                Response.Redirect(url);
            }
            else
            {
                string url = Request.RawUrl;
                url = UrlParamModifier.AddEdit(url, "surname_search", letter);
                url = UrlParamModifier.AddEdit(url, "surname_starts_with", "1");
                Response.Redirect(url);
            }
        }
    }
Пример #28
0
    protected void UpdateSuburbInfo(bool redirect)
    {
        return;

        int newSuburbID = Convert.ToInt32(suburbID.Value);

        if (newSuburbID == -1)
        {
            lblSuburbText.Text = "--";
        }
        else
        {
            Suburb suburb = SuburbDB.GetByID(newSuburbID);
            lblSuburbText.Text = suburb.Name + ", " + suburb.State + "(" + suburb.Postcode + ")";
        }

        if (redirect)
        {
            string url = Request.RawUrl;
            url = UrlParamModifier.Update(newSuburbID != -1, url, "suburb", newSuburbID == -1 ? "" : newSuburbID.ToString());
            Response.Redirect(url);
        }
    }
 protected void ddlDisplayUserType_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (ddlDisplayUserType.SelectedValue == "All")
     {
         string url = Request.RawUrl;
         url = UrlParamModifier.Remove(url, "inc_staff");
         url = UrlParamModifier.Remove(url, "inc_patients");
         Response.Redirect(url);
     }
     if (ddlDisplayUserType.SelectedValue == "Staff Only")
     {
         string url = Request.RawUrl;
         url = UrlParamModifier.Remove(url, "inc_staff");
         url = UrlParamModifier.AddEdit(url, "inc_patients", "0");
         Response.Redirect(url);
     }
     if (ddlDisplayUserType.SelectedValue == "Patients Only")
     {
         string url = Request.RawUrl;
         url = UrlParamModifier.AddEdit(url, "inc_staff", "0");
         url = UrlParamModifier.Remove(url, "inc_patients");
         Response.Redirect(url);
     }
 }
Пример #30
0
    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        if (GetUrlParamType() == UrlParamType.View)
        {
            Response.Redirect(UrlParamModifier.AddEdit(Request.RawUrl, "type", "edit"));
        }
        if (GetUrlParamType() == UrlParamType.Edit)
        {
            SiteDB.Update(Convert.ToInt32(lblId.Text), Utilities.FormatName(txtName.Text), Convert.ToInt32(ddlClinic.SelectedValue), txtABN.Text, txtACN.Text, txtTFN.Text, txtASIC.Text,
                          chkIsProvider.Checked, txtBPay.Text, txtBSB.Text, txtBankAccount.Text, txtBankDirectDebitUserID.Text, txtBankUsername.Text,
                          Convert.ToDecimal(txtOustandingBalanceWarning.Text), chkIsPrintEPC.Checked,
                          !chkIncSunday.Checked, !chkIncMonday.Checked, !chkIncTuesday.Checked, !chkIncWednesday.Checked,
                          !chkIncThursday.Checked, !chkIncFriday.Checked, !chkIncSaturday.Checked,
                          GetDayStartTime(), GetLunchStartTime(), GetLunchEndTime(), GetDayEndTime(), GetFYEFromForm(), Convert.ToInt32(ddlNumBookingMonthsToGet.SelectedValue));

            Response.Redirect(UrlParamModifier.AddEdit(Request.RawUrl, "type", "view"));
        }
        else if (GetUrlParamType() == UrlParamType.Add)
        {
            int id = SiteDB.Insert(Utilities.FormatName(txtName.Text), Convert.ToInt32(ddlClinic.SelectedValue), txtABN.Text, txtACN.Text, txtTFN.Text, txtASIC.Text,
                                   chkIsProvider.Checked, txtBPay.Text, txtBSB.Text, txtBankAccount.Text, txtBankDirectDebitUserID.Text, txtBankUsername.Text,
                                   Convert.ToDecimal(txtOustandingBalanceWarning.Text), chkIsPrintEPC.Checked,
                                   !chkIncSunday.Checked, !chkIncMonday.Checked, !chkIncTuesday.Checked, !chkIncWednesday.Checked,
                                   !chkIncThursday.Checked, !chkIncFriday.Checked, !chkIncSaturday.Checked,
                                   GetDayStartTime(), GetLunchStartTime(), GetLunchEndTime(), GetDayEndTime(), GetFYEFromForm(), Convert.ToInt32(ddlNumBookingMonthsToGet.SelectedValue));

            string url = Request.RawUrl;
            url = UrlParamModifier.AddEdit(url, "type", "view");
            url = UrlParamModifier.AddEdit(url, "id", id.ToString());
            Response.Redirect(url);
        }
        else
        {
            HideTableAndSetErrorMessage("", "Invalid URL Parameters");
        }
    }