private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (tabControl1.SelectedIndex)
            {
            case 0:    //özlük
            {
            }
            break;

            case 1:    //ogrenci bilgileri
            {
                int    id       = ADMINSTRATOR_SCREEN.id;
                string password = ADMINSTRATOR_SCREEN.password;
                var    con      = new Model.Context("Server=.;Database=STUDENT_INFORMATION_SYSTEM;Trusted_Connection=True;");
                LESSON cekme    = con.ACADEMİC_PERSONALS
                                  .Join(con.LESSONS, x => x.Id, y => y.PERSONAL.Id, (x, y) => new LESSON
                    {
                        Id          = y.Id,
                        LESSON_NAME = y.LESSON_NAME,
                        CLASS       = y.CLASS,
                        CREDİT      = y.CREDİT,
                        PERSONAL    = x
                    }).Where(x => x.PERSONAL.Id == id && x.PERSONAL.PASSWORS == password).FirstOrDefault();

                lbl.Text  = cekme.LESSON_NAME;
                lbl3.Text = cekme.CREDİT;
                lbl4.Text = cekme.CLASS;
            }
            break;

            case 2:    //dersler
            {
            }
            break;

            case 3:    //Sınavlarrr
            {
                MessageBox.Show("Test4");
            }
            break;

            case 4:    //Bölüm
            {
                MessageBox.Show("Test4");
            }
            break;

            case 5:    //not girişi
            {
                MessageBox.Show("Test5");
            }
            break;

            case 6:    //akademik takvim
            {
                MessageBox.Show("Test6");
            }
            break;
            }
        }
        private void TabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            switch (TabControl1.SelectedIndex)
            {
            case 0:    //identity informations
            {
                int id  = ADMINSTRATOR_SCREEN.id;
                var con = new Model.Context("Server=.;Database=STUDENT_INFORMATION_SYSTEM;Trusted_Connection=True;");

                Model.STUDENT QUERY = con.STUDENTS.Where(x => x.Id == id).SingleOrDefault();
                lbName.Text           = QUERY.NAME;
                lbSurname.Text        = QUERY.SURNAME;
                Label_Start_Date.Text = QUERY.START_DATE;
            }
            break;

            case 1:    //mortar
            {
                int    id  = ADMINSTRATOR_SCREEN.id;
                var    con = new Model.Context("Server=.;Database=STUDENT_INFORMATION_SYSTEM;Trusted_Connection=True;");
                MORTAR ac  = con.MORTARS.Where(x => x.Id == id).SingleOrDefault();
                Lbl_Pay_Date.Text = ac.PAY_DATE;
                Lbl_total.Text    = ac.TOTAL;
            }
            break;

            case 2:    //school clubs
            {
                var con = new Model.Context("Server=.;Database=STUDENT_INFORMATION_SYSTEM;Trusted_Connection=True;");
                var cek = con.SCHOOL_CLUB_STUDENTS.Select(x => x.NAME).ToList();
                dataGridView1.DataSource = cek;
            }
            break;

            case 3:    //academic schedule
            {
                MessageBox.Show("Test4");
            }
            break;

            case 4:    //section
            {
                MessageBox.Show("Test4");
            }
            break;

            case 5:    //exam result
            {
                MessageBox.Show("Test5");
            }
            break;

            case 6:    //lessons
            {
                MessageBox.Show("Test6");
            }
            break;
            }
        }
        private void tabPage3_Click(object sender, EventArgs e)
        {
            int    id       = ADMINSTRATOR_SCREEN.id;
            string password = ADMINSTRATOR_SCREEN.password;
            var    con      = new Model.Context("Server=.;Database=STUDENT_INFORMATION_SYSTEM;Trusted_Connection=True;");
            LESSON cek      = con.LESSONS.Where(x => x.PERSONAL_ID == id).FirstOrDefault();

            lbl_DersAdı.Text = cek.LESSON_NAME;
            lbl_Kredi.Text   = cek.CREDİT;
            lbl_Sınıf.Text   = cek.CLASS;
        }
        private void ACADEMIC_PERSONEL_FORM_Load(object sender, EventArgs e)
        {
            int               id       = ADMINSTRATOR_SCREEN.id;
            string            password = ADMINSTRATOR_SCREEN.password;
            var               con      = new Model.Context("Server=.;Database=STUDENT_INFORMATION_SYSTEM;Trusted_Connection=True;");
            ACADEMİC_PERSONAL cek      = con.ACADEMİC_PERSONALS.Where(x => x.Id == id && x.PASSWORS == password).FirstOrDefault();

            lbl_ad.Text     = cek.PERSONEL_NAME;
            lbl_Soyad.Text  = cek.PERSONEL_SURNAME;
            lbl_bastar.Text = cek.START_DATE;
            //g
        }
Exemplo n.º 5
0
        private void GİRİS_BTN_Click(object sender, EventArgs e)
        {
            if (!CHCOX_ACADEMİC.Checked)//OGR
            {
                if (Kullanici_Adi_Txt != null && PASSWORD_TXT != null)
                {
                    try
                    {
                        using (var con = new Model.Context("Server=.;Database=STUDENT_INFORMATION_SYSTEM;Trusted_Connection=True;"))
                        {
                            id       = Convert.ToInt32(Kullanici_Adi_Txt.Text);
                            password = PASSWORD_TXT.Text;
                            STUDENT QUERY = con.STUDENTS.Where(x => x.Id == id && x.PASSWORD == password).FirstOrDefault();
                            if (QUERY == null)
                            {
                                MessageBox.Show("Lütfen kullanıcı adını veya şifrenizi kontrol ediniz !");
                            }
                            else
                            {
                                STUDENTS_SCREEN SCREEN = new STUDENTS_SCREEN();
                                SCREEN.Show();
                                this.Hide();
                            }
                        }
                    }
                    catch (Exception EX)
                    {
                        MessageBox.Show("Lütfen kullanıcı adınızı kontrol ediniz!");
                    }
                }
                else
                {
                    MessageBox.Show("Lütfen kullanıcı adınızı boş girmeyiniz girip tekrar deneyiniz!");
                }
            }
            else//HOCA
            {
                if (Kullanici_Adi_Txt != null && PASSWORD_TXT != null)
                {
                    try
                    {
                        using (var con = new Model.Context("Server=.;Database=STUDENT_INFORMATION_SYSTEM;Trusted_Connection=True;"))
                        {
                            id       = Convert.ToInt32(Kullanici_Adi_Txt.Text);
                            password = PASSWORD_TXT.Text;
                            ACADEMİC_PERSONAL QUERY = con.ACADEMİC_PERSONALS.Where(x => x.Id == id && x.PASSWORD == password).FirstOrDefault();

                            if (QUERY == null)
                            {
                                MessageBox.Show("Lütfen kullanıcı adını veya şifrenizi kontrol ediniz !");
                            }
                            else
                            {
                                ACADEMIC_PERSONEL_FORM A = new ACADEMIC_PERSONEL_FORM();
                                A.Show();

                                this.Hide();
                            }
                        }
                    }
                    catch (Exception EX)
                    {
                        MessageBox.Show("Kullanıcı adınızı kontrol ediniz");
                    }
                }
                else
                {
                    MessageBox.Show("Lütfen kullanıcı adınızı boş girmeyiniz girip tekrar deneyiniz!");
                }
            }
        }