protected void btnEditSave_Click(object sender, EventArgs e)
        {
            Person                  person  = new Person(Convert.ToInt32(hfEditPerson.Value));
            PersonAddress           address = person.Addresses.FindByType(Convert.ToInt32(hfEditType.Value));
            PersonAddressCollection pac     = new PersonAddressCollection();


            //
            // Verify valid data.
            //
            if (address.AddressID == -1)
            {
                throw new System.Exception("Invalid address type during edit.");
            }

            //
            // Make sure this is the only person using this address, otherwise create a new one.
            //
            pac.LoadByAddressID(address.AddressID);
            if (pac.Count > 1)
            {
                person.Addresses.Remove(address);
                address             = new PersonAddress();
                address.PersonID    = person.PersonID;
                address.Address     = new Address();
                address.AddressType = new Lookup(Convert.ToInt32(hfEditType.Value));
                person.Addresses.Add(address);
            }

            //
            // Set the address information.
            //
            address.Address.StreetLine1 = tbEditStreetAddress1.Text.Trim();
            address.Address.StreetLine2 = tbEditStreetAddress2.Text.Trim();
            address.Address.City        = tbEditCity.Text.Trim();
            address.Address.State       = tbEditState.Text.Trim();
            address.Address.PostalCode  = tbEditPostal.Text.Trim();
            address.Address.Country     = ddlEditCountry.SelectedValue;

            //
            // If this address is becoming primary (and wasn't already) make sure it is the
            // only one.
            //
            if (cbEditPrimary.Checked && address.Primary == false)
            {
                foreach (PersonAddress pa in person.Addresses)
                {
                    pa.Primary = false;
                }
            }
            address.Primary = cbEditPrimary.Checked;

            //
            // Standardize and save.
            //
            address.Address.Standardize();
            person.SaveAddresses(person.OrganizationID, CurrentUser.Identity.Name);
            LoadFamilyAddresses(family_id);
            cbSelectAll.Checked = false;
        }
Example #2
0
        private void UpdateAddressAreas(bool reGeoCode)
        {
            Arena.DataLayer.Organization.OrganizationData oData = new Arena.DataLayer.Organization.OrganizationData();

            AreaCollection areas = new AreaCollection(OrganizationId);

            SqlDataReader rdr = new Arena.DataLayer.Core.AddressData().GetAddresses();

            while (rdr.Read())
            {
                Address address = new Address((int)rdr["address_id"]);
                if (address != null && address.AddressID != -1)
                {
                    if (reGeoCode &&
                        !address.StreetLine1.ToUpper().StartsWith("PO BOX") &&
                        address.Latitude == 0 &&
                        address.Longitude == 0 &&
                        address.Standardized &&
                        address.DateGeocoded.AddDays(30) < DateTime.Today)
                    {
                        bool active = false;
                        PersonAddressCollection pac = new PersonAddressCollection();
                        pac.LoadByAddressID(address.AddressID);
                        foreach (PersonAddress pa in pac)
                        {
                            Person person = new Person(pa.PersonID);
                            if (person.RecordStatus == Arena.Enums.RecordStatus.Active)
                            {
                                active = true;
                                break;
                            }
                        }

                        if (active)
                        {
                            status.Text = address.ToString().Replace("\n", " ");
                            address.Geocode("ImportMapPointAreas", true);
                            string breakstring = address.StreetLine1;
                        }
                    }
                    else if (address.Latitude != 0 && address.Longitude != 0)
                    {
                        status.Text = address.ToString().Replace("\n", " ");
                        address.UpdateArea(areas);
                    }

                    System.Windows.Forms.Application.DoEvents();
                }
            }
            rdr.Close();

            status.Text = string.Empty;

            MessageBox.Show("Addresses have been updated", "Import Complete");
        }
Example #3
0
        public Contracts.GenericListResult <Contracts.PersonReference> GetPersonMatch(string email, string firstname, string lastname, string gender, string maritalstatus, string campus, string street1, string street2, string city, string state, string postalcode, string phonehome, string phonecell, string birthdate, string matchpercentminimum, string sessionid)
        {
            Contracts.GenericListResult <Contracts.PersonReference> personReferenceList = new Contracts.GenericListResult <Contracts.PersonReference>();
            personReferenceList.Items = new List <Contracts.PersonReference>();

            // Load PersonReference object with the provided values
            Contracts.PersonReference personReferenceOriginal = new Contracts.PersonReference();
            personReferenceOriginal.BirthDate    = birthdate.Trim();
            personReferenceOriginal.Campus       = campus.Trim();
            personReferenceOriginal.City         = city.Trim();
            personReferenceOriginal.Emails       = new Contracts.GenericListResult <Contracts.EmailReference>();
            personReferenceOriginal.Emails.Items = new List <Contracts.EmailReference>();
            personReferenceOriginal.Emails.Items.Add(new Contracts.EmailReference(1, email.Trim(), "True", "1"));
            personReferenceOriginal.FirstName          = firstname.Trim();
            personReferenceOriginal.LastName           = lastname.Trim();
            personReferenceOriginal.Gender             = gender.Trim();
            personReferenceOriginal.MaritalStatus      = maritalstatus.Trim();
            personReferenceOriginal.NickName           = firstname.Trim();
            personReferenceOriginal.PhoneNumbers       = new Contracts.GenericListResult <Contracts.PhoneReference>();
            personReferenceOriginal.PhoneNumbers.Items = new List <Contracts.PhoneReference>();
            // Phone numbers are optional
            if (!String.IsNullOrEmpty(phonehome))
            {
                personReferenceOriginal.PhoneNumbers.Items.Add(new Contracts.PhoneReference(PersonPhone.FormatPhone(phonehome.Trim()), "", "main/home"));
            }
            if (!String.IsNullOrEmpty(phonecell))
            {
                personReferenceOriginal.PhoneNumbers.Items.Add(new Contracts.PhoneReference(PersonPhone.FormatPhone(phonecell.Trim()), "", "cell"));
            }
            personReferenceOriginal.PostalCode = postalcode.Trim();
            personReferenceOriginal.State      = state.Trim();
            personReferenceOriginal.Street1    = street1.Trim();
            personReferenceOriginal.Street2    = street2.Trim();

            // What is the minimum matching percent of a person that we will return from the function
            int matchPercentMinimum = String.IsNullOrEmpty(matchpercentminimum) ? 0 : Convert.ToInt32(matchpercentminimum);

            //  Let's determine the provided gender or stop
            int genderId = -1;

            switch (gender.ToLower())
            {
            case "male":
                genderId = 0;
                break;

            case "female":
                genderId = 1;
                break;
            }

            if (genderId == -1)
            {
                throw new Exception("Please specify a valid gender.");
            }

            // Let's use the first 2 characters in order to limit results and do more auto-matching
            string firstNameInitial = (firstname.Length > 1 ? firstname.Substring(0, 2) : firstname.Substring(0, 1));

            // Get persons by first initial, last name, gender and birthdate
            CorePersonService  cps     = new CorePersonService();
            List <core_person> persons = cps.GetList(firstNameInitial, lastname, false);

            PersonCollection pc;
            List <Person>    personList = new List <Person>();

            // Get persons with this e-mail address
            pc = new PersonCollection();
            pc.LoadByEmail(email);
            personList.AddRange((from pcbe in pc
                                 select pcbe).ToList());

            // Get persons with this phone number
            if (!String.IsNullOrEmpty(phonehome))
            {
                phonehome = PersonPhone.FormatPhone(phonehome);
                pc        = new PersonCollection();
                pc.LoadByPhone(phonehome);
                personList.AddRange((from pcbe in pc
                                     select pcbe).ToList());
            }
            if (!String.IsNullOrEmpty(phonecell))
            {
                phonecell = PersonPhone.FormatPhone(phonecell);
                pc        = new PersonCollection();
                pc.LoadByPhone(phonecell);
                personList.AddRange((from pcbe in pc
                                     select pcbe).ToList());
            }

            // Get persons with this address and first initial
            Address            address       = new Address(street1, street2, city, state, postalcode);
            CoreAddressService cas           = new CoreAddressService();
            List <int>         addressIdList = cas.GetList(address.StreetLine1, address.StreetLine2, address.PostalCode);
            Person             person        = new Person();

            // TODO: enhance Arena with LoadByAddressIDs function to improve performance
            foreach (int addressId in addressIdList)
            {
                PersonAddressCollection pac = new PersonAddressCollection();
                pac.LoadByAddressID(addressId);

                foreach (PersonAddress pa in pac)
                {
                    person = new Person(pa.PersonID);
                    if ((person.FirstName.ToLower().StartsWith(firstNameInitial.ToLower()) || person.NickName.ToLower().StartsWith(firstNameInitial.ToLower())))
                    {
                        personList.Add(person);
                    }
                }
            }

            // Remove duplicates
            personList = (from p in personList select p).Distinct().ToList();

            // Load persons over the Match Percent Minimum threshold
            List <int> personIdList = new List <int>();

            Contracts.PersonReference personReference = new Contracts.PersonReference();
            string mapMatch = String.Empty;
            int    counter  = 0;

            foreach (Person p in personList)
            {
                if ((from prl in personIdList where prl == p.PersonID select prl).Count() == 0)
                {
                    counter++;
                    personReference = ConvertPersonToPersonReference(p);
                    personReference.MatchPercent = CalculateMatchPercent(personReferenceOriginal, personReference, out mapMatch);
                    personReference.MatchMap     = mapMatch;
                    personReference.IsExact      = "false";
                    // If Person is greater than Match Percent Minimum then check for exact match and add to
                    if (Convert.ToInt32(personReference.MatchPercent) >= matchPercentMinimum)
                    {
                        string domain = String.Empty;
                        personReference.IsExact = IsPersonQualifiedForExact(p, (personReference.MaritalStatus == personReferenceOriginal.MaritalStatus ? true : false), birthdate, email, firstname, lastname, gender, street1, street2, city, state, postalcode, phonehome, phonecell, out domain).ToString();
                        personReference.IsExactPrimaryEmailDomain = domain;
                        personReferenceList.Items.Add(personReference);
                        personIdList.Add(personReference.PersonId);
                    }
                }
            }

            foreach (core_person cp in persons)
            {
                if ((from prl in personIdList where prl == cp.person_id select prl).Count() == 0)
                {
                    counter++;
                    person                       = new Person(cp.person_id);
                    personReference              = ConvertPersonToPersonReference(person);
                    personReference.IsExact      = "false";
                    personReference.MatchPercent = CalculateMatchPercent(personReferenceOriginal, personReference, out mapMatch);
                    personReference.MatchMap     = mapMatch;
                    // If Person is greater than Match Percent Minimum then check for exact match
                    if (Convert.ToInt32(personReference.MatchPercent) >= matchPercentMinimum)
                    {
                        string domain = String.Empty;
                        personReference.IsExact = IsPersonQualifiedForExact(person, (personReference.MaritalStatus == personReferenceOriginal.MaritalStatus ? true : false), birthdate, email, firstname, lastname, gender, street1, street2, city, state, postalcode, phonehome, phonecell, out domain).ToString();
                        personReference.IsExactPrimaryEmailDomain = domain;
                        personReferenceList.Items.Add(personReference);
                        personIdList.Add(personReference.PersonId);
                    }
                }
            }

            // Order filtered persons by Match Percent
            Contracts.GenericListResult <Contracts.PersonReference> personsSorted = new Contracts.GenericListResult <Contracts.PersonReference>();
            personsSorted.Items = new List <Contracts.PersonReference>();
            personsSorted.Items = (from prl in personReferenceList.Items orderby Convert.ToInt32(prl.MatchPercent) descending select prl).ToList();

            personsSorted.Max   = counter;
            personsSorted.Total = personReferenceList.Items.Count();

            return(personsSorted);
        }
        public Contracts.GenericListResult<Contracts.PersonReference> GetPersonMatch(string email, string firstname, string lastname, string gender, string maritalstatus, string campus, string street1, string street2, string city, string state, string postalcode, string phonehome, string phonecell, string birthdate, string matchpercentminimum, string sessionid)
        {
            Contracts.GenericListResult<Contracts.PersonReference> personReferenceList = new Contracts.GenericListResult<Contracts.PersonReference>();
            personReferenceList.Items = new List<Contracts.PersonReference>();

            // Load PersonReference object with the provided values
            Contracts.PersonReference personReferenceOriginal = new Contracts.PersonReference();
            personReferenceOriginal.BirthDate = birthdate.Trim();
            personReferenceOriginal.Campus = campus.Trim();
            personReferenceOriginal.City = city.Trim();
            personReferenceOriginal.Emails = new Contracts.GenericListResult<Contracts.EmailReference>();
            personReferenceOriginal.Emails.Items = new List<Contracts.EmailReference>();
            personReferenceOriginal.Emails.Items.Add(new Contracts.EmailReference(1, email.Trim(), "True", "1"));
            personReferenceOriginal.FirstName = firstname.Trim();
            personReferenceOriginal.LastName = lastname.Trim();
            personReferenceOriginal.Gender = gender.Trim();
            personReferenceOriginal.MaritalStatus = maritalstatus.Trim();
            personReferenceOriginal.NickName = firstname.Trim();
            personReferenceOriginal.PhoneNumbers = new Contracts.GenericListResult<Contracts.PhoneReference>();
            personReferenceOriginal.PhoneNumbers.Items = new List<Contracts.PhoneReference>();
            // Phone numbers are optional
            if (!String.IsNullOrEmpty(phonehome))
            {
                personReferenceOriginal.PhoneNumbers.Items.Add(new Contracts.PhoneReference(PersonPhone.FormatPhone(phonehome.Trim()), "", "main/home"));
            }
            if (!String.IsNullOrEmpty(phonecell))
            {
                personReferenceOriginal.PhoneNumbers.Items.Add(new Contracts.PhoneReference(PersonPhone.FormatPhone(phonecell.Trim()), "", "cell"));
            }
            personReferenceOriginal.PostalCode = postalcode.Trim();
            personReferenceOriginal.State = state.Trim();
            personReferenceOriginal.Street1 = street1.Trim();
            personReferenceOriginal.Street2 = street2.Trim();

            // What is the minimum matching percent of a person that we will return from the function
            int matchPercentMinimum = String.IsNullOrEmpty(matchpercentminimum) ? 0 : Convert.ToInt32(matchpercentminimum);

            //  Let's determine the provided gender or stop
            int genderId = -1;
            switch (gender.ToLower())
            {
                case "male":
                    genderId = 0;
                    break;
                case "female":
                    genderId = 1;
                    break;
            }

            if (genderId == -1)
            {
                throw new Exception("Please specify a valid gender.");
            }

            // Let's use the first 2 characters in order to limit results and do more auto-matching
            string firstNameInitial = (firstname.Length > 1 ? firstname.Substring(0, 2) : firstname.Substring(0, 1));

            // Get persons by first initial, last name, gender and birthdate
            CorePersonService cps = new CorePersonService();
            List<core_person> persons = cps.GetList(firstNameInitial, lastname, false);

            PersonCollection pc;
            List<Person> personList = new List<Person>();

            // Get persons with this e-mail address
            pc = new PersonCollection();
            pc.LoadByEmail(email);
            personList.AddRange((from pcbe in pc
                                 select pcbe).ToList());

            // Get persons with this phone number
            if (!String.IsNullOrEmpty(phonehome))
            {
                phonehome = PersonPhone.FormatPhone(phonehome);
                pc = new PersonCollection();
                pc.LoadByPhone(phonehome);
                personList.AddRange((from pcbe in pc
                                     select pcbe).ToList());
            }
            if (!String.IsNullOrEmpty(phonecell))
            {
                phonecell = PersonPhone.FormatPhone(phonecell);
                pc = new PersonCollection();
                pc.LoadByPhone(phonecell);
                personList.AddRange((from pcbe in pc
                                     select pcbe).ToList());
            }

            // Get persons with this address and first initial
            Address address = new Address(street1, street2, city, state, postalcode);
            CoreAddressService cas = new CoreAddressService();
            List<int> addressIdList = cas.GetList(address.StreetLine1, address.StreetLine2, address.PostalCode);
            Person person = new Person();

            // TODO: enhance Arena with LoadByAddressIDs function to improve performance
            foreach (int addressId in addressIdList)
            {
                PersonAddressCollection pac = new PersonAddressCollection();
                pac.LoadByAddressID(addressId);

                foreach (PersonAddress pa in pac)
                {
                    person = new Person(pa.PersonID);
                    if ((person.FirstName.ToLower().StartsWith(firstNameInitial.ToLower()) || person.NickName.ToLower().StartsWith(firstNameInitial.ToLower())))
                    {
                        personList.Add(person);
                    }
                }
            }

            // Remove duplicates
            personList = (from p in personList select p).Distinct().ToList();

            // Load persons over the Match Percent Minimum threshold
            List<int> personIdList = new List<int>();
            Contracts.PersonReference personReference = new Contracts.PersonReference();
            string mapMatch = String.Empty;
            int counter = 0;

            foreach (Person p in personList)
            {
                if ((from prl in personIdList where prl == p.PersonID select prl).Count() == 0)
                {
                    counter++;
                    personReference = ConvertPersonToPersonReference(p);
                    personReference.MatchPercent = CalculateMatchPercent(personReferenceOriginal, personReference, out mapMatch);
                    personReference.MatchMap = mapMatch;
                    personReference.IsExact = "false";
                    // If Person is greater than Match Percent Minimum then check for exact match and add to
                    if (Convert.ToInt32(personReference.MatchPercent) >= matchPercentMinimum)
                    {
                        string domain = String.Empty;
                        personReference.IsExact = IsPersonQualifiedForExact(p, (personReference.MaritalStatus == personReferenceOriginal.MaritalStatus ? true : false), birthdate, email, firstname, lastname, gender, street1, street2, city, state, postalcode, phonehome, phonecell, out domain).ToString();
                        personReference.IsExactPrimaryEmailDomain = domain;
                        personReferenceList.Items.Add(personReference);
                        personIdList.Add(personReference.PersonId);
                    }
                }
            }

            foreach (core_person cp in persons)
            {
                if ((from prl in personIdList where prl == cp.person_id select prl).Count() == 0)
                {
                    counter++;
                    person = new Person(cp.person_id);
                    personReference = ConvertPersonToPersonReference(person);
                    personReference.IsExact = "false";
                    personReference.MatchPercent = CalculateMatchPercent(personReferenceOriginal, personReference, out mapMatch);
                    personReference.MatchMap = mapMatch;
                    // If Person is greater than Match Percent Minimum then check for exact match
                    if (Convert.ToInt32(personReference.MatchPercent) >= matchPercentMinimum)
                    {
                        string domain = String.Empty;
                        personReference.IsExact = IsPersonQualifiedForExact(person, (personReference.MaritalStatus == personReferenceOriginal.MaritalStatus ? true : false), birthdate, email, firstname, lastname, gender, street1, street2, city, state, postalcode, phonehome, phonecell, out domain).ToString();
                        personReference.IsExactPrimaryEmailDomain = domain;
                        personReferenceList.Items.Add(personReference);
                        personIdList.Add(personReference.PersonId);
                    }
                }
            }

            // Order filtered persons by Match Percent
            Contracts.GenericListResult<Contracts.PersonReference> personsSorted = new Contracts.GenericListResult<Contracts.PersonReference>();
            personsSorted.Items = new List<Contracts.PersonReference>();
            personsSorted.Items = (from prl in personReferenceList.Items orderby Convert.ToInt32(prl.MatchPercent) descending select prl).ToList();

            personsSorted.Max = counter;
            personsSorted.Total = personReferenceList.Items.Count();

            return personsSorted;
        }
        private void LoadFamilyAddresses(int family_id)
        {
            Family family = new Family(family_id);


            //
            // Make sure we are in a known valid state.
            //
            while (tblPeople.Rows.Count > 2)
            {
                tblPeople.Rows.RemoveAt(1);
            }

            foreach (FamilyMember fm in family.FamilyMembers)
            {
                PersonAddressCollection pac = new PersonAddressCollection();
                bool      first             = true;
                TableRow  row  = null;
                TableCell cell = null;
                Literal   lt;

                //
                // Sort addresses by primary and then all the rest (in order of lookup), I don't
                // know a better way to do this.
                //
                foreach (PersonAddress address in fm.Addresses)
                {
                    if (address.Primary)
                    {
                        pac.Add(address);
                    }
                }
                foreach (PersonAddress address in fm.Addresses)
                {
                    if (!address.Primary)
                    {
                        pac.Add(address);
                    }
                }
                if (pac.Count == 0)
                {
                    pac.Add(new PersonAddress());
                }

                foreach (PersonAddress address in pac)
                {
                    ArenaCheckBox cb;

                    row = new TableRow();
                    tblPeople.Rows.AddAt(tblPeople.Rows.Count - 1, row);

                    //
                    // Add in the checkbox + name if applicable.
                    //
                    cell = new TableCell();
                    row.Cells.Add(cell);
                    if (first == true)
                    {
                        cb = new ArenaCheckBox();

                        cell.Controls.Add(cb);
                        cb.ID       = "cbPerson_" + fm.PersonID.ToString();
                        cb.Text     = fm.NickName;
                        cb.CssClass = "personName";
                        if (fm.RecordStatus == Arena.Enums.RecordStatus.Inactive)
                        {
                            cb.Text      += " (Inactive)";
                            row.CssClass += " inactive";
                        }
                        else if (fm.RecordStatus == Arena.Enums.RecordStatus.Pending)
                        {
                            cb.Text      += " (Pending)";
                            row.CssClass += " pending";
                        }
                        cb.Checked = false;
                    }
                    first = false;

                    if (address.AddressID != -1)
                    {
                        //
                        // Add in the address type.
                        //
                        cell = new TableCell();
                        row.Cells.Add(cell);
                        DropDownList ddlType = new DropDownList();
                        cell.Controls.Add(ddlType);
                        ddlType.ID = "ddlType_" + fm.PersonID.ToString() + "_" + address.AddressID.ToString() + "_" + address.AddressType.LookupID.ToString();
                        foreach (Lookup lookup in new LookupType(new Guid("9B4BE12C-C105-4F80-8254-8639B27D7640")).Values)
                        {
                            ddlType.Items.Add(new ListItem(lookup.Value, lookup.LookupID.ToString()));
                        }
                        ddlType.SelectedValue = address.AddressType.LookupID.ToString();
                        lt = new Literal();
                        cell.Controls.Add(lt);
                        lt.Text = "<span id=\"" + ddlType.ClientID + "_error\" class=\"errorText\" style=\"display: none;\"> *</span>";

                        //
                        // Add in the Address itself.
                        //
                        cell = new TableCell();
                        row.Cells.Add(cell);
                        Literal ltAddress = new Literal();
                        cell.Controls.Add(ltAddress);
                        ltAddress.Text = address.Address.ToString();

                        //
                        // Add in the primary checkbox.
                        //
                        cell = new TableCell();
                        row.Cells.Add(cell);
                        cell.CssClass = "button";
                        cb            = new ArenaCheckBox();
                        cell.Controls.Add(cb);
                        cb.ID = "cbPrimary_" + fm.PersonID.ToString() + "_" + address.AddressID.ToString() + "_" + address.AddressType.LookupID.ToString();
                        cb.Attributes.Add("cbPrimary", fm.PersonID.ToString());
                        cb.Checked = address.Primary;

                        //
                        // Add in the Edit button.
                        //
                        cell = new TableCell();
                        row.Cells.Add(cell);
                        cell.CssClass = "button";
                        ArenaImageButton image = new ArenaImageButton();
                        cell.Controls.Add(image);
                        image.ID            = "btnEdit_" + fm.PersonID.ToString() + "_" + address.AddressID.ToString() + "_" + address.AddressType.LookupID.ToString();
                        image.OnClientClick = ClientEditAddressScript(fm, address) + "return false;";
                        image.ImageUrl      = "~/images/edit.gif";

                        //
                        // Add in the Delete button.
                        //
                        cell = new TableCell();
                        row.Cells.Add(cell);
                        cell.CssClass = "button";
                        image         = new ArenaImageButton();
                        cell.Controls.Add(image);
                        image.ID            = "btnDelete_" + fm.PersonID.ToString() + "_" + address.AddressID.ToString() + "_" + address.AddressType.LookupID.ToString();
                        image.Click        += new ImageClickEventHandler(btnDeleteAddress_Click);
                        image.OnClientClick = "return confirm('Are you sure you want to remove " + fm.NickName.Replace("'", "\\'") + "\\'s " + address.AddressType.Value.Replace("'", "\\'") + "?');";
                        image.ImageUrl      = "~/images/delete.gif";
                    }
                    else
                    {
                        cell = new TableCell();
                        row.Cells.Add(cell);
                        cell.ColumnSpan = 5;
                    }
                }

                if (row != null)
                {
                    row = new TableRow();
                    tblPeople.Rows.AddAt(tblPeople.Rows.Count - 1, row);
                    cell = new TableCell();
                    row.Cells.Add(cell);
                    cell.ColumnSpan = 6;
                    row.CssClass    = "spacer";
                }
            }
        }