protected void SaveButton_Click(object sender, EventArgs e)
    {
        bool isError = false;

        try
        {
            // Get the common web service instance.

            ServiceAccess           serviceLoader = ServiceAccess.GetInstance();
            FarmService.FarmService farmService   = serviceLoader.GetFarm();
            FarmService.ContactInfo contact       = new Irmac.MailingCycle.BLLServiceLoader.Farm.ContactInfo();

            contact.ContactId = Int64.Parse(ContactIdLabel.Text);

            if (!ScheduleNumberTextBox.Text.Trim().Equals(""))
            {
                contact.ScheduleNumber = int.Parse(ScheduleNumberTextBox.Text);
            }
            else
            {
                contact.ScheduleNumber = 0;
            }

            contact.OwnerFullName = OwnerFullNameTextBox.Text;

            if (!LotTextBox.Text.Trim().Equals(""))
            {
                contact.Lot = int.Parse(LotTextBox.Text);
            }
            else
            {
                contact.Lot = 0;
            }

            contact.Block       = BlockTextBox.Text;
            contact.Subdivision = SubDivisionTextBox.Text;
            contact.Filing      = FilingTextBox.Text;
            contact.SiteAddress = SiteAddressTextBox.Text;

            if (!BedroomsTextBox.Text.Trim().Equals(""))
            {
                contact.Bedrooms = int.Parse(BedroomsTextBox.Text);
            }
            else
            {
                contact.Bedrooms = 0;
            }

            if (!FullBathTextBox.Text.Trim().Equals(""))
            {
                contact.FullBath = int.Parse(FullBathTextBox.Text);
            }
            else
            {
                contact.FullBath = 0;
            }

            if (!ThreeQuarterBathTextBox.Text.Trim().Equals(""))
            {
                contact.ThreeQuarterBath = int.Parse(ThreeQuarterBathTextBox.Text);
            }
            else
            {
                contact.ThreeQuarterBath = 0;
            }

            if (!HalfBathTextBox.Text.Trim().Equals(""))
            {
                contact.HalfBath = int.Parse(HalfBathTextBox.Text);
            }
            else
            {
                contact.HalfBath = 0;
            }

            if (!AcresTextBox.Text.Trim().Equals(""))
            {
                contact.Acres = float.Parse(AcresTextBox.Text);
            }
            else
            {
                contact.Acres = 0;
            }

            contact.ActMktComb     = ActMktCombTextBox.Text;
            contact.OwnerFirstName = OwnerFirstNameTextBox.Text;
            contact.OwnerLastName  = OwnerLastNameTextBox.Text;
            contact.OwnerAddress1  = OwnerAddress1TextBox.Text;
            contact.OwnerAddress2  = OwnerAddress2TextBox.Text;
            contact.OwnerCity      = OwnerCityTextBox.Text;
            contact.OwnerState     = OwnerStateTextBox.Text;
            contact.OwnerZip       = OwnerZipTextBox.Text;
            contact.OwnerCountry   = OwnerCountryTextBox.Text;
            contact.SaleDate       = DateTime.Parse(SaleDateTextBox.Text);

            if (!TransAmountTextBox.Text.Trim().Equals(""))
            {
                contact.TransAmount = decimal.Parse(TransAmountTextBox.Text);
            }
            else
            {
                contact.TransAmount = 0;
            }

            contact.LastModifyBy = LoginUserId;
            contact.PlotId       = int.Parse(PlotIdHiddenField.Value.ToString());
            farmService.UpdateContactDetails(contact);
        }
        catch (Exception exception)
        {
            log.Error("UNKNOWN ERROR:", exception);
            isError = true;
        }
        if (!isError)
        {
            if (ParentPageHiddenField.Value.ToString() == "")
            {
                Response.Redirect("~/Members/ViewPlot.aspx?plotId=" + PlotIdHiddenField.Value.ToString());
            }
            else
            if (ParentPageHiddenField.Value.ToString().Equals("SearchFarmData.aspx"))
            {
                Response.Redirect("~/Members/" + ParentPageHiddenField.Value.ToString() + "?accessType=old");
            }
            else
            {
                Response.Redirect("~/Members/" + ParentPageHiddenField.Value.ToString());
            }
        }
    }