protected void ButtonChange_Click(object sender, EventArgs e)
    {
        MembershipPaymentStatus newStatus = (MembershipPaymentStatus)Convert.ToInt32(DropDownListStatusChange.SelectedValue);
        DateTime nowvalue   = DateTime.Now;
        string   checkedIds = "" + Request.Form["CheckboxSelect"];

        string[]    checkedIdArr      = checkedIds.Split(',');
        List <int>  ids               = new List <int>();
        Memberships membershipsToLoad = new Memberships();

        foreach (string id in checkedIdArr)
        {
            Membership ms = Membership.FromIdentity(Convert.ToInt32(id));
            membershipsToLoad.Add(ms);
        }
        Membership.LoadPaymentStatuses(membershipsToLoad);
        foreach (Membership ms in membershipsToLoad)
        {
            ms.SetPaymentStatus(newStatus, nowvalue);
        }

        RebuildGrid();
    }