示例#1
0
        private void button_güncelle_Click(object sender, EventArgs e)
        {
            Veritabani.Connect();

            ogr.OGRENCI_NO = textBoxogrnobul.Text;
            ogr            = Veritabani.OGRENCI_GETIR(ogr)[0];



            ogr.AD         = textBoxad.Text;
            ogr.SOYAD      = textBoxsoyad.Text;
            ogr.TCK_NO     = textBoxtc.Text;
            ogr.OGRENCI_NO = textBoxno.Text;
            ogr.CINSIYET   = comboBoxcinsiyet.Text == "ERKEK" ? "E" : "K";

            bool deger = Veritabani.OGRENCI_GUNCELLE(ogr);


            if (deger == true)
            {
                MessageBox.Show("günceleme başarılı");
            }

            Veritabani.Disconnect();
        }
示例#2
0
        private void button1_Click(object sender, EventArgs e)
        {
            Veritabani.Connect();
            ogr.OGRENCI_NO = textBoxogrnobul.Text;

            try
            {
                if (textBoxogrnobul.Text != "")
                {
                    ogr = Veritabani.OGRENCI_GETIR(ogr)[0];
                }
            }
            catch
            {
                MessageBox.Show("Böyle bir numara yok");
            }



            textBoxad.Text        = ogr.AD;
            textBoxsoyad.Text     = ogr.SOYAD;
            textBoxtc.Text        = ogr.TCK_NO;
            textBoxno.Text        = ogr.OGRENCI_NO;
            comboBoxcinsiyet.Text = ogr.CINSIYET == "E" ? "ERKEK" : "KADIN";
            comboBoxsınıf.Text    = ogr.SINIF + ".SINIF";

            Veritabani.Disconnect();
        }
示例#3
0
 public string Recognise(Image <Gray, byte> Input_image, int Eigen_Thresh = -1)
 {
     if (_IsTrained)
     {
         EigenObjectRecognizer.RecognitionResult ER = recognizer.Recognize(Input_image);
         //handle if recognizer.EigenDistanceThreshold is set as a null will be returned
         //NOTE: This is still not working correctley
         if (ER == null)
         {
             Eigen_label    = "Tanımsız";
             Eigen_Distance = 0;
             return(Eigen_label);
         }
         else
         {
             try
             {
                 OGRENCI ogr = new OGRENCI();
                 ogr.OGRENCI_NO = ER.Label;
                 Eigen_label    = Veritabani.OGRENCI_GETIR(ogr)[0].AD + Veritabani.OGRENCI_GETIR(ogr)[0].SOYAD;
                 Eigen_Distance = ER.Distance;
                 if (Eigen_Thresh > -1)
                 {
                     Eigen_threshold = Eigen_Thresh;
                 }
                 if (Eigen_Distance > Eigen_threshold)
                 {
                     return(Eigen_label);
                 }
                 else
                 {
                     return("Tanımsız");
                 }
             }
             catch (Exception)
             {
                 return("Tanımsız");
             }
         }
     }
     else
     {
         return("");
     }
 }
示例#4
0
        /// <summary>
        /// Recognise a Grayscale Image using the trained Eigen Recogniser
        /// </summary>
        /// <param name="Input_image"></param>
        /// <returns></returns>
        public string Recognise(Image <Gray, byte> Input_image, int Eigen_Thresh, FormYoklama form)
        {
            if (_IsTrained)
            {
                EigenObjectRecognizer.RecognitionResult ER = recognizer.Recognize(Input_image);
                //handle if recognizer.EigenDistanceThreshold is set as a null will be returned
                //NOTE: This is still not working correctley
                if (ER == null)
                {
                    Eigen_label    = "Tanımsız";
                    Eigen_Distance = 0;
                    return(Eigen_label);
                }
                else
                {
                    try
                    {
                        bool    karar = true;
                        OGRENCI ogr   = new OGRENCI();
                        ogr.OGRENCI_NO = ER.Label;
                        ogr            = Veritabani.OGRENCI_GETIR(ogr)[0];
                        Eigen_label    = ogr.AD + " " + ogr.SOYAD;

                        foreach (DataGridViewRow row in form.dgYoklama.Rows)
                        {
                            if (row.Cells[0].Value.ToString().Contains(ogr.OGRENCI_NO))
                            {
                                karar = false;
                            }
                        }

                        if (karar)
                        {
                            OGRENCI ogr2 = new OGRENCI();
                            ogr2 = Veritabani.OGRENCI_GETIR(ogr)[0];
                            form.dgYoklama.Rows.Add(ogr2.OGRENCI_NO, ogr2.AD, ogr2.SOYAD, ogr2.CINSIYET);
                        }

                        Eigen_Distance = ER.Distance;
                        if (Eigen_Thresh > -1)
                        {
                            Eigen_threshold = Eigen_Thresh;
                        }
                        if (Eigen_Distance > Eigen_threshold)
                        {
                            return(Eigen_label);
                        }
                        else
                        {
                            return("Tanımsız");
                        }
                    }
                    catch (Exception)
                    {
                        return("Tanımsız");
                    }
                }
            }
            else
            {
                return("");
            }
        }