Ejemplo n.º 1
0
        private void btnPhoneGet_Click(object sender, EventArgs e)
        {
            FrmPhone frm = new FrmPhone();

            frm.ShowDialog();

            Phone.LoadComboBox(cmbPhone, Setting.DataBase);

            Setting.DataBase.Dispose();
        }
Ejemplo n.º 2
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();
        }
Ejemplo n.º 3
0
        private void FrmMember_Load(object sender, EventArgs e)
        {
            DataBaseDataContext myConnection = Setting.DataBase;

            Level.LoadComboBox(cmbLevel, myConnection);

            Phone.LoadComboBox(cmbPhone, myConnection);

            SocialNetworkType.LoadComboBox(cmbSocialNetworkType, myConnection);

            cmbType.SelectedIndex = 0;

            cmbSex.SelectedIndex = 0;

            GetCode();

            Member.LoadGridJoinSocialNetworkAccountJoinPhoneNumber(gridMember, myConnection);

            myConnection.Dispose();
        }