Пример #1
0
        private void buttonDelete_Click(object sender, EventArgs e)
        {
            try

            {
                TrainingSetDbGateWay.LocalDataTable.Rows[TrainingSetDbGateWay.RowNumber].Delete();

                SqlCommandBuilder commandBuilder1 = new SqlCommandBuilder(TrainingSetDbGateWay.DataAdater);

                MessageBox.Show("Image Record Successfully Deleted!!");

                TrainingSetDbGateWay.DataAdater.Update(TrainingSetDbGateWay.LocalDataTable);

                TrainingSetDbGateWay.refreshDBconnection();

                TrainingSetDbGateWay.RowNumber--;

                pictureBox1.Image            = TrainingSetDbGateWay.ReadImageFromDB();
                importedFaceNametextBox.Text = TrainingSetDbGateWay.LocalDataTable.Rows[TrainingSetDbGateWay.RowNumber]["PersonName"].ToString();
            }


            catch (Exception ex)

            {
                MessageBox.Show(ex.ToString());
            }
        }
Пример #2
0
        private void goToLastImageButton_Click(object sender, EventArgs e)
        {
            int totalRows = TrainingSetDbGateWay.LocalDataTable.Rows.Count;


            TrainingSetDbGateWay.refreshDBconnection();
            TrainingSetDbGateWay.RowNumber = totalRows - 1;
            pictureBox1.Image = TrainingSetDbGateWay.ReadImageFromDB();

            importedFaceNametextBox.Text = TrainingSetDbGateWay.LocalDataTable.Rows[TrainingSetDbGateWay.RowNumber]["PersonName"].ToString();
            PersonNamelabel.Text         = (TrainingSetDbGateWay.RowNumber + 1).ToString();



            MessageBox.Show("You Have Reached The First Image In List!!!");
        }
Пример #3
0
        private void buttonPre_Click(object sender, EventArgs e)
        {
            if (TrainingSetDbGateWay.RowNumber == 0)
            {
                MessageBox.Show("This Is The First Image");
            }

            else
            {
                TrainingSetDbGateWay.RowNumber--;
                pictureBox1.Image = TrainingSetDbGateWay.ReadImageFromDB();

                importedFaceNametextBox.Text = TrainingSetDbGateWay.LocalDataTable.Rows[TrainingSetDbGateWay.RowNumber]["PersonName"].ToString();
                PersonNamelabel.Text         = (TrainingSetDbGateWay.RowNumber + 1).ToString();
            }
        }
Пример #4
0
        private void buttonNext_Click(object sender, EventArgs e)
        {
            if (TrainingSetDbGateWay.RowNumber == TrainingSetDbGateWay.LocalDataTable.Rows.Count - 1)
            {
                MessageBox.Show("You Have Reached The Last Image!!");
            }

            else
            {
                TrainingSetDbGateWay.RowNumber++;
                pictureBox1.Image = TrainingSetDbGateWay.ReadImageFromDB();

                importedFaceNametextBox.Text = TrainingSetDbGateWay.LocalDataTable.Rows[TrainingSetDbGateWay.RowNumber]["PersonName"].ToString();
                PersonNamelabel.Text         = (TrainingSetDbGateWay.RowNumber + 1).ToString();
            }
        }