Beispiel #1
0
 private void enrolleeBindingSource_CurrentChanged(object sender, EventArgs e)
 {
     if (enrolleeBindingSource.Current != null)
     {
         if (((Enrollee)enrolleeBindingSource.Current).Picture != null)
         {
             pictureBox1.Image = UtilityClass.ByteToImage(((Enrollee)enrolleeBindingSource.Current).Picture.ToArray());
         }
     }
 }
Beispiel #2
0
        private void pictureBox1_DoubleClick(object sender, EventArgs e)
        {
            OpenFileDialog openDialog = new OpenFileDialog();

            openDialog.Filter = @"Jpeg (*.jpg)|*.jpg|Jpeg (*.jpeg)|*.jpeg|Png (*.png) |*.png|Gif (*.gif) | *.gif";
            if (openDialog.ShowDialog() == System.Windows.Forms.DialogResult.OK)
            {
                pictureBox1.ImageLocation = openDialog.FileName;
                byte[] tempBuffer = UtilityClass.ReadFile(openDialog.FileName);
                pictureBox1.Image = UtilityClass.ByteToImage(tempBuffer);
            }
        }
Beispiel #3
0
 private void personnelBindingSource_CurrentChanged(object sender, EventArgs e)
 {
     if (personnelBindingSource != null)
     {
         personnelBindingNavigatorSaveItem.Enabled = true;
         if (((Personnel)personnelBindingSource.Current).Photo != null)
         {
             pictureBox1.Image = UtilityClass.ByteToImage(((Personnel)personnelBindingSource.Current).Photo.ToArray());
         }
         GenrateBarcode(personnelIdNoTextBox.Text);
     }
 }