private void set_btn(object sender, System.Windows.RoutedEventArgs e)
 {
     Library_Manager.Member NewMember = new Library_Manager.Member(txtName.Text, txtEmail.Text, txtPreNumber.Text + txtPhoneNumber.Text, txtPassword.Password, ImageFile);
     if (ValidateFields())
     {
         DataBaseManager.updateMember(NewMember);
         System.Windows.MessageBox.Show("Done !");
     }
 }
        public MemberMyBook(Library_Manager.Member mem)
        {
            InitializeComponent();
            member = mem;
            books  = new ObservableCollection <Book>();
            DataTable data = DataBaseManager.MyBooks(member.Name);

            for (int i = 0; i < data.Rows.Count; i++)
            {
                books.Add(new Book()
                {
                    Name = data.Rows[i][0].ToString(), Author = data.Rows[i][1].ToString(), Genre = data.Rows[i][2].ToString(), PrintNumber = data.Rows[i][3].ToString(), Count = int.Parse(data.Rows[i][4].ToString())
                });
            }

            DataContext = this;
        }
 public editMember(Library_Manager.Member member)
 {
     InitializeComponent();
     txtName.Text         = member.Name;
     txtEmail.Text        = member.Email;
     txtPassword.Password = member.Password;
     txtPreNumber.Text    = member.PhoneNumber.Substring(0, 2);
     txtPhoneNumber.Text  = member.PhoneNumber.Substring(2);
     try
     {
         BitmapImage bitmap = new BitmapImage();
         bitmap.BeginInit();
         bitmap.UriSource = new Uri(member.ImageFileName);
         bitmap.EndInit();
         ProfileImage.Source = bitmap;
     }
     catch { }
 }
 public MemberWallet(Library_Manager.Member member)
 {
     InitializeComponent();
     this.member = member;
     UpdatePrice();
 }