public static void Edit(SocialNetworkAccount socialNetworkAccount, SocialNetworkType socialNetworkType, Member member,
                                bool status, string account, DataBaseDataContext connection)
        {
            socialNetworkAccount.Status = status;

            socialNetworkAccount.Account = account;

            socialNetworkAccount.SocialNetworkType = socialNetworkType;

            socialNetworkAccount.Member = member;

            connection.SubmitChanges();
        }
        public static SocialNetworkAccount Insert(SocialNetworkType socialNetworkType, Member member,
                                                  bool status, string account, DataBaseDataContext connection)
        {
            SocialNetworkAccount socialNetworkAccount = new SocialNetworkAccount(status, account);

            socialNetworkAccount.SocialNetworkType = socialNetworkType;

            socialNetworkAccount.Member = member;

            connection.SocialNetworkAccounts.InsertOnSubmit(socialNetworkAccount);

            connection.SubmitChanges();

            return(socialNetworkAccount);
        }
Exemplo n.º 3
0
        private void FrmProfile_Load(object sender, EventArgs e)
        {
            DataBaseDataContext myConnection = Setting.DataBase;

            Phone.LoadComboBox(cmbPhone, myConnection);

            PhoneNumber.ShowListByMember(lstPhoneNumber, FrmMember.MemberProfile, myConnection);

            SocialNetworkType.LoadComboBox(cmbSocialAccount, myConnection);

            SocialNetworkAccount.ShowListByMember(lstSocialNetwork, FrmMember.MemberProfile, myConnection);

            lblCode.Text = FrmMember.MemberProfile.Code;

            lblFirstName.Text = FrmMember.MemberProfile.FirstName;

            lblLastName.Text = FrmMember.MemberProfile.LastName;

            lblBirthDate.Text = BTM.Date.ConvertToPersianDate(FrmMember.MemberProfile.BirthDate);

            lblNationalCode.Text = FrmMember.MemberProfile.NationalCode;

            byte[] myBytes = FrmMember.MemberProfile.Image;

            if (myBytes != null)
            {
                _memoryStream = new MemoryStream(myBytes);

                PicBox.Image = Image.FromStream(_memoryStream);
            }

            if (lstPhoneNumber.Items.Count == 1)
            {
                btnPhoneDelete.Enabled = false;
            }

            if (lstSocialNetwork.Items.Count == 1)
            {
                btnSocialAccountDelete.Enabled = false;
            }

            myConnection.Dispose();
        }
Exemplo n.º 4
0
        private void lstSocialNetwork_Click(object sender, EventArgs e)
        {
            DataBaseDataContext myConnection = Setting.DataBase;

            #region SocialNetworkAccount Casting

            SocialNetworkAccount socialNetworkAccount = (SocialNetworkAccount)lstSocialNetwork.SelectedItems[0].Tag;

            if (!SocialNetworkAccount.Validation(socialNetworkAccount.ID, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }
            socialNetworkAccount = SocialNetworkAccount.Get(socialNetworkAccount.ID, myConnection);

            #endregion

            txtSocialAccount.Text = socialNetworkAccount.Account;

            cmbSocialAccount.SelectedItem = socialNetworkAccount.SocialNetworkType;

            myConnection.Dispose();
        }
        public static void Delete(SocialNetworkAccount socialNetworkAccount, DataBaseDataContext connection)
        {
            connection.SocialNetworkAccounts.DeleteOnSubmit(socialNetworkAccount);

            connection.SubmitChanges();
        }
Exemplo n.º 6
0
        private void btnSocialAccountDelete_Click(object sender, EventArgs e)
        {
            DataBaseDataContext myConnection = Setting.DataBase;

            if (lstSocialNetwork.SelectedItems.Count == 0)
            {
                DataValidationMesaage.NoSelectedItemFromList("لیست اکانت های شبکه های اجتماعی");

                return;
            }

            #region Member Casting

            int memberId = FrmMember.MemberProfile.ID;

            if (!Member.Validation(memberId, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            Member member = Member.Get(memberId, myConnection);

            #endregion

            #region SocialNetworkType Casting

            int socialNetworkTypeId = ((SocialNetworkType)cmbSocialAccount.SelectedItem).ID;

            if (!SocialNetworkType.Validation(socialNetworkTypeId, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            SocialNetworkType socialNetworkType = SocialNetworkType.Get(socialNetworkTypeId, myConnection);

            #endregion

            #region SocialNetworkAccount Casting

            SocialNetworkAccount socialNetworkAccount = (SocialNetworkAccount)lstSocialNetwork.SelectedItems[0].Tag;

            if (!SocialNetworkAccount.Validation(socialNetworkAccount.ID, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }
            socialNetworkAccount = SocialNetworkAccount.Get(socialNetworkAccount.ID, myConnection);

            #endregion

            DialogResult messageResult =
                DataValidationMesaage.ConfirmDeleteData(lstSocialNetwork.SelectedItems[0].SubItems[1].Text);

            if (messageResult == DialogResult.Yes)
            {
                if (socialNetworkAccount.Status)
                {
                    #region NextSocialNetworkAccount Casting

                    int nextSocialNetworkAccountIndex = (int.Parse(lstSocialNetwork.SelectedItems[0].Text)) %
                                                        lstSocialNetwork.Items.Count;

                    SocialNetworkAccount nextSocialNetworkAccount =
                        (SocialNetworkAccount)lstSocialNetwork.Items[nextSocialNetworkAccountIndex].Tag;

                    if (!SocialNetworkAccount.Validation(nextSocialNetworkAccount.ID, myConnection))
                    {
                        DataValidationMesaage.NoDataInBank();

                        return;
                    }
                    nextSocialNetworkAccount = SocialNetworkAccount.Get(nextSocialNetworkAccount.ID, myConnection);

                    var query = myConnection.SocialNetworkAccounts.Where(a => a.Member == member);

                    foreach (var item in query)
                    {
                        item.Status = false;

                        myConnection.SubmitChanges();
                    }

                    #endregion

                    nextSocialNetworkAccount.Status = true;

                    myConnection.SubmitChanges();
                }
                SocialNetworkAccount.Delete(socialNetworkAccount, myConnection);

                SocialNetworkAccount.ShowListByMember(lstSocialNetwork, FrmMember.MemberProfile, myConnection);

                if (lstSocialNetwork.Items.Count == 1)
                {
                    btnPhoneDelete.Enabled = false;
                }
            }

            txtSocialAccount.Clear();

            myConnection.Dispose();
        }
Exemplo n.º 7
0
        private void btnSocialAccountEdit_Click(object sender, EventArgs e)
        {
            DataBaseDataContext myConnection = Setting.DataBase;

            if (lstSocialNetwork.SelectedItems.Count == 0)
            {
                DataValidationMesaage.NoSelectedItemFromList("لیست اکانت های شبکه های اجتماعی");

                return;
            }

            #region Member Casting

            int memberId = FrmMember.MemberProfile.ID;

            if (!Member.Validation(memberId, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            Member member = Member.Get(memberId, myConnection);

            #endregion

            #region SocialNetworkType Casting

            int socialNetworkTypeId = ((SocialNetworkType)cmbSocialAccount.SelectedItem).ID;

            if (!SocialNetworkType.Validation(socialNetworkTypeId, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            SocialNetworkType socialNetworkType = SocialNetworkType.Get(socialNetworkTypeId, myConnection);

            #endregion

            #region SocialNetworkAccount Casting

            SocialNetworkAccount socialNetworkAccount = (SocialNetworkAccount)lstSocialNetwork.SelectedItems[0].Tag;

            if (!SocialNetworkAccount.Validation(socialNetworkAccount.ID, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }
            socialNetworkAccount = SocialNetworkAccount.Get(socialNetworkAccount.ID, myConnection);

            #endregion

            DialogResult message = MessageBox.Show("در صورت تایید اکانت فعلی فعال گردیده و مابقی غیرفعال میگردند",
                                                   "کاربر گرامی", MessageBoxButtons.YesNo, MessageBoxIcon.Question);

            if (message == DialogResult.Yes)
            {
                if (lstSocialNetwork.SelectedItems.Count == 0)
                {
                    DataValidationMesaage.NoSelectedItemFromList("لیست اکانت های شبکه های اجتماعی");

                    return;
                }


                var query = myConnection.SocialNetworkAccounts.Where(a => a.Member == member);

                foreach (var item in query)
                {
                    item.Status = false;

                    myConnection.SubmitChanges();
                }

                SocialNetworkAccount.Edit(socialNetworkAccount, socialNetworkType, member, true, txtSocialAccount.Text.Trim(), myConnection);

                txtSocialAccount.Clear();

                SocialNetworkAccount.ShowListByMember(lstSocialNetwork, member, myConnection);
            }

            myConnection.Dispose();
        }
Exemplo n.º 8
0
        private void btnSocialAccountSave_Click(object sender, EventArgs e)
        {
            DataBaseDataContext myConnection = Setting.DataBase;

            if (string.IsNullOrWhiteSpace(txtSocialAccount.Text) || string.IsNullOrEmpty(txtSocialAccount.Text))
            {
                DataValidationMesaage.BlankTextBox("اکانت شبکه های اجتماعی");

                return;
            }

            #region Member Casting

            int memberId = FrmMember.MemberProfile.ID;

            if (!Member.Validation(memberId, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            Member member = Member.Get(memberId, myConnection);

            #endregion

            #region SocialNetworkType Casting

            int socialNetworkTypeId = ((SocialNetworkType)cmbSocialAccount.SelectedItem).ID;

            if (!SocialNetworkType.Validation(socialNetworkTypeId, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            SocialNetworkType socialNetworkType = SocialNetworkType.Get(socialNetworkTypeId, myConnection);

            #endregion

            if (myConnection.SocialNetworkAccounts.Any(
                    a => a.Account == txtSocialAccount.Text.Trim() && a.Member == member &&
                    a.SocialNetworkType == socialNetworkType))
            {
                DataValidationMesaage.DuplicateData(txtSocialAccount.Text.Trim());

                return;
            }

            var query = myConnection.SocialNetworkAccounts.Where(a => a.Member == member);

            foreach (var item in query)
            {
                item.Status = false;

                myConnection.SubmitChanges();
            }



            SocialNetworkAccount socialNetworkAccount = SocialNetworkAccount.Insert(socialNetworkType, member, true, txtSocialAccount.Text.Trim(), myConnection);

            DataValidationMesaage.AcceptMessage(socialNetworkAccount.Account);

            SocialNetworkAccount.ShowListByMember(lstSocialNetwork, member, myConnection);

            txtSocialAccount.Clear();

            if (lstSocialNetwork.Items.Count > 1)
            {
                btnSocialAccountDelete.Enabled = true;
            }

            myConnection.Dispose();
        }
Exemplo n.º 9
0
        private void btnYes_Click(object sender, EventArgs e)
        {
            if (string.IsNullOrEmpty(txtFirstName.Text) || string.IsNullOrEmpty(txtLastName.Text) ||
                string.IsNullOrEmpty(txtNationalCode.Text) ||
                string.IsNullOrWhiteSpace(txtFirstName.Text) || string.IsNullOrWhiteSpace(txtLastName.Text) ||
                string.IsNullOrWhiteSpace(txtNationalCode.Text))
            {
                MessageBox.Show("کاربر گرامی مقادیر نام یا نام خانوادگی یا کد ملی نمی توانند خالی باشند ", "اخطار در ورود اطلاعات", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);

                return;
            }

            DataBaseDataContext myConnection = Setting.DataBase;

            #region Level Casting

            int levelId = ((Level)cmbLevel.SelectedItem).ID;

            if (!Level.Validation(levelId, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            Level level = Level.Get(levelId, myConnection);

            #endregion

            #region Member Casting

            int memeberId = int.Parse(gridMember.SelectedRows[0].Cells[1].Value.ToString());

            if (!Member.Validation(memeberId, myConnection))

            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            Member member = Member.Get(memeberId, myConnection);

            #endregion

            #region PhoneNumber Casting

            string gridPhoneNumber = gridMember.SelectedRows[0].Cells[9].Value.ToString();

            PhoneNumber phoneNumber =
                myConnection.PhoneNumbers.FirstOrDefault(a => a.Number == gridPhoneNumber && a.Member == member);

            if (phoneNumber != null && !PhoneNumber.Validation(phoneNumber.ID, myConnection))

            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            #endregion

            #region SocialNetworkAccount Casting

            string gridSocialAccount = gridMember.SelectedRows[0].Cells[8].Value.ToString();

            SocialNetworkAccount socialNetworkAccount =
                myConnection.SocialNetworkAccounts.FirstOrDefault(
                    a => a.Account == gridSocialAccount && a.Member == member);

            if (socialNetworkAccount != null && !SocialNetworkAccount.Validation(socialNetworkAccount.ID, myConnection))

            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            #endregion

            #region Phone Casting

            int phoneId = ((Phone)cmbPhone.SelectedItem).ID;

            if (!Phone.Validation(phoneId, myConnection))
            {
                //TODO Fix Message

                DataValidationMesaage.NoDataInBank();

                return;
            }

            Phone phone = Phone.Get(phoneId, myConnection);

            #endregion

            #region SocialNetwork Casting

            int socialNetworkTypeID = ((SocialNetworkType)cmbSocialNetworkType.SelectedItem).ID;

            if (!Phone.Validation(socialNetworkTypeID, myConnection))
            {
                //TODO Fix Message

                DataValidationMesaage.NoDataInBank();

                return;
            }

            SocialNetworkType socialNetworkType = SocialNetworkType.Get(socialNetworkTypeID, myConnection);

            #endregion

            bool query = myConnection.PhoneNumbers.Any(a => a.Number == CorrectPhoneNumber() &&
                                                       a.Member == member && a.ID != phoneNumber.ID);
            if (query)
            {
                DataValidationMesaage.DuplicateData("شماره تماس برای این کاربر");

                return;
            }

            query =
                myConnection.SocialNetworkAccounts.Any(
                    a =>
                    a.Account == txtSocialAccount.Text.Trim() && a.Member == member &&
                    a.ID != socialNetworkAccount.ID);

            if (query)
            {
                DataValidationMesaage.DuplicateData("اکانت شبکه های اجتماعی برای این کاربر");

                return;
            }

            query = myConnection.Members.Any(a => a.NationalCode == txtNationalCode.Text.Trim() && a.ID != memeberId);

            if (query)
            {
                DataValidationMesaage.DuplicateData("کاربر با این کد ملی");

                return;
            }

            if (!flag)
            {
                Image picImage = Properties.Resources.profile;

                picBox.Image = picImage;

                picImage.Save(_memory, picBox.Image.RawFormat);

                _myArray = _memory.GetBuffer();
            }

            if (flag)
            {
                _image.Save(_memory, picBox.Image.RawFormat);

                _myArray = _memory.GetBuffer();
            }


            Phone.Edit(phone, cmbPhone.Text.Trim(), myConnection);

            PhoneNumber.Edit(phoneNumber, phone, member, true, CorrectPhoneNumber(), myConnection);

            SocialNetworkType.Edit(socialNetworkType, cmbSocialNetworkType.Text.Trim(), myConnection);

            SocialNetworkAccount.Edit(socialNetworkAccount, socialNetworkType, member, true, txtSocialAccount.Text.Trim(), myConnection);

            //TODO How to check Has Cabinet or not?

            Member.Edit(member, txtCode.Text.Trim(), txtFirstName.Text.Trim(), txtLastName.Text.Trim(),
                        txtNationalCode.Text.Trim(), BTM.Date.ConvertToGorgianDate(txtBirthDate.Text.Trim()),
                        cmbType.Text.Trim(), cmbSex.Text.Trim(), _myArray, level, myConnection);

            DataValidationMesaage.EditMessage();

            ClearTextBox();

            txtFirstName.Focus();

            Member.LoadGridJoinSocialNetworkAccountJoinPhoneNumber(gridMember, myConnection);

            FormManagement.DisableYesNo(this.Controls);
        }
Exemplo n.º 10
0
        private void btnDelete_Click(object sender, EventArgs e)
        {
            if (gridMember.SelectedRows.Count == 0)
            {
                DataValidationMesaage.NoSelectedItemFromList(gridMember.Text);

                return;
            }

            DataBaseDataContext myConnection = Setting.DataBase;

            #region Member Casting

            int memeberId = int.Parse(gridMember.SelectedRows[0].Cells[1].Value.ToString());

            if (!Member.Validation(memeberId, myConnection))

            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            Member member = Member.Get(memeberId, myConnection);

            #endregion

            #region PhoneNumber Casting

            string gridPhoneNumber = gridMember.SelectedRows[0].Cells[9].Value.ToString();

            PhoneNumber phoneNumber =
                myConnection.PhoneNumbers.FirstOrDefault(a => a.Number == gridPhoneNumber && a.Member == member);

            if (!PhoneNumber.Validation(phoneNumber.ID, myConnection))

            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            #endregion

            #region SocialNetworkAccount Casting

            string gridSocialAccount = gridMember.SelectedRows[0].Cells[8].Value.ToString();

            SocialNetworkAccount socialNetworkAccount =
                myConnection.SocialNetworkAccounts.FirstOrDefault(
                    a => a.Account == gridSocialAccount && a.Member == member);

            if (!SocialNetworkAccount.Validation(socialNetworkAccount.ID, myConnection))

            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            #endregion

            DialogResult message = DataValidationMesaage.ConfirmDeleteData(member.Code);

            if (message == DialogResult.Yes)
            {
                PhoneNumber.Delete(phoneNumber, myConnection);

                SocialNetworkAccount.Delete(socialNetworkAccount, myConnection);

                Member.Delete(member, myConnection);

                DataValidationMesaage.DeleteMessage();

                GetCode();

                Member.LoadGridJoinSocialNetworkAccountJoinPhoneNumber(gridMember, myConnection);
            }
        }
Exemplo n.º 11
0
        private void btnEdit_Click(object sender, EventArgs e)
        {
            if (gridMember.SelectedRows.Count == 0)
            {
                DataValidationMesaage.NoSelectedItemFromList(gridMember.Text);

                return;
            }

            DataBaseDataContext myConnection = Setting.DataBase;

            #region Member Casting

            int memeberId = int.Parse(gridMember.SelectedRows[0].Cells[1].Value.ToString());

            if (!Member.Validation(memeberId, myConnection))

            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            Member member = Member.Get(memeberId, myConnection);

            #endregion

            #region PhoneNumber Casting

            string gridPhoneNumber = gridMember.SelectedRows[0].Cells[9].Value.ToString();

            PhoneNumber phoneNumber =
                myConnection.PhoneNumbers.FirstOrDefault(a => a.Number == gridPhoneNumber && a.Member == member);

            if (!PhoneNumber.Validation(phoneNumber.ID, myConnection))

            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            #endregion

            #region SocialNetworkAccount Casting

            string gridSocialAccount = gridMember.SelectedRows[0].Cells[8].Value.ToString();

            SocialNetworkAccount socialNetworkAccount =
                myConnection.SocialNetworkAccounts.FirstOrDefault(
                    a => a.Account == gridSocialAccount && a.Member == member);

            if (!SocialNetworkAccount.Validation(socialNetworkAccount.ID, myConnection))

            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            #endregion

            #region Fill TextBoxes

            txtCode.Text = member.Code;

            txtFirstName.Text = member.FirstName;

            txtLastName.Text = member.LastName;

            txtBirthDate.Text = BTM.Date.ConvertToPersianDate(member.BirthDate);

            txtNationalCode.Text = member.NationalCode;

            cmbSex.SelectedItem = member.Sex;

            cmbType.SelectedItem = member.Type;

            cmbLevel.SelectedItem = member.Level;

            cmbPhone.SelectedItem = phoneNumber.Phone;

            txtPhoneNumber.Text = phoneNumber.Number;

            cmbSocialNetworkType.SelectedItem = socialNetworkAccount.SocialNetworkType;

            txtSocialAccount.Text = socialNetworkAccount.Account;

            byte[] myBytes = member.Image;

            if (myBytes != null)
            {
                _memoryStream = new MemoryStream(myBytes);

                picBox.Image = Image.FromStream(_memoryStream);
            }

            #endregion

            FormManagement.EnableYesNo(this.Controls);

            btnImageSelect.Enabled = true;

            txtFirstName.Focus();

            myConnection.Dispose();
        }
Exemplo n.º 12
0
        private void btnSave_Click(object sender, EventArgs e)
        {
            DataBaseDataContext myConnection = Setting.DataBase;

            #region Level Casting

            int levelId = ((Level)cmbLevel.SelectedItem).ID;

            if (!Level.Validation(levelId, myConnection))
            {
                DataValidationMesaage.NoDataInBank();

                return;
            }

            Level level = Level.Get(levelId, myConnection);

            #endregion

            #region Phone Casting

            int phoneId = ((Phone)cmbPhone.SelectedItem).ID;

            if (!Phone.Validation(phoneId, myConnection))
            {
                //TODO Fix Message

                DataValidationMesaage.NoDataInBank();

                return;
            }

            Phone phone = Phone.Get(phoneId, myConnection);

            #endregion



            #region Save Image

            if (!flag)
            {
                Image picImage = Properties.Resources.profile;

                picBox.Image = picImage;

                picImage.Save(_memoryStream, picBox.Image.RawFormat);

                _myArray = _memoryStream.GetBuffer();
            }

            if (flag)
            {
                _image.Save(_memoryStream, picBox.Image.RawFormat);

                _myArray = _memoryStream.GetBuffer();
            }

            #endregion

            if (myConnection.Members.Any(a => a.Code == txtCode.Text))
            {
                DataValidationMesaage.DuplicateData(txtCode.Text);

                return;
            }

            if (myConnection.Members.Any(a => a.NationalCode == txtNationalCode.Text))
            {
                DataValidationMesaage.DuplicateData(txtNationalCode.Text);

                return;
            }

            if (string.IsNullOrEmpty(txtNationalCode.Text.Trim()) || string.IsNullOrWhiteSpace(txtNationalCode.Text.Trim()))
            {
                DataValidationMesaage.BlankTextBox("کد ملی");

                return;
            }

            if (!BTM.Date.Validation(txtBirthDate.Text))
            {
                MessageBox.Show("قالب تاریخ تولد وارد شده صحیح نمی باشد", "اخطار در ورود اطلاعات", MessageBoxButtons.OK,
                                MessageBoxIcon.Error);

                return;
            }


            Member member = Member.Insert(txtCode.Text.Trim(), txtFirstName.Text.Trim(), txtLastName.Text.Trim(),
                                          txtNationalCode.Text.Trim(),
                                          BTM.Date.ConvertToGorgianDate(txtBirthDate.Text.Trim()), cmbType.Text.Trim(), cmbSex.Text.Trim(),
                                          _myArray, false, level, myConnection);

            PhoneNumber.Insert(phone, member, true, CorrectPhoneNumber(), myConnection);


            if (txtSocialAccount.Text.Length > 0)
            {
                #region SocialNetwork Casting

                int socialNetworkTypeID = ((SocialNetworkType)cmbSocialNetworkType.SelectedItem).ID;

                if (!Phone.Validation(socialNetworkTypeID, myConnection))
                {
                    //TODO Fix Message

                    DataValidationMesaage.NoDataInBank();

                    return;
                }

                SocialNetworkType socialNetworkType = SocialNetworkType.Get(socialNetworkTypeID, myConnection);

                #endregion

                SocialNetworkAccount.Insert(socialNetworkType, member, true, txtSocialAccount.Text.Trim(), myConnection);
            }
            GetCode();

            Member.LoadGridJoinSocialNetworkAccountJoinPhoneNumber(gridMember, myConnection);

            ClearTextBox();

            myConnection.Dispose();
        }