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 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; }
public void AddToLESSON(LESSON lESSON) { base.AddObject("LESSON", lESSON); }
public static LESSON CreateLESSON(int cOURSE_ID, int ID, string tITLE, int nUMBER) { LESSON lESSON = new LESSON(); lESSON.COURSE_ID = cOURSE_ID; lESSON.ID = ID; lESSON.TITLE = tITLE; lESSON.NUMBER = nUMBER; return lESSON; }
/// <summary> /// Edits the lesson. /// </summary> /// <param name="lesson">The lesson.</param> /// <param name="onComplete">The on complete.</param> public void EditLesson(LESSON lesson, OnQueryComplete onComplete) { ctx.UpdateObject(lesson); this.onUQC = onComplete; ctx.BeginSaveChanges(onQueryComplete2, null); }
/// <summary> /// Generates a lesson box. /// </summary> /// <param name="les">The les.</param> /// <returns></returns> private Grid GenerateALessonBox(LESSON les) { if (les == null) { return(null); } TextBlock lessonName = new TextBlock { FontSize = 50, Height = 65, Margin = new Thickness(5, 0, 0, 0), Foreground = new SolidColorBrush(Colors.White), HorizontalAlignment = HorizontalAlignment.Left, Text = les.TITLE, }; /* * Image docImage = new Image * { * Source = new BitmapImage(new Uri("ms-appx:///Images/Upload/doc_white.png")), * Margin = new Thickness(4, 0, 4, 0), * }; * Image audioImage = new Image * { * Source = new BitmapImage(new Uri("ms-appx:///Images/Upload/audio_white.png")), * Margin = new Thickness(4, 0, 4, 0) * }; * Image videoImage = new Image * { * Source = new BitmapImage(new Uri("ms-appx:///Images/Upload/video_white.png")), * Margin = new Thickness(8, 0, 8, 0) * }; */ StackPanel imagesStackPanel = new StackPanel { Orientation = Orientation.Horizontal, HorizontalAlignment = HorizontalAlignment.Right, }; //imagesStackPanel.Children.Add(docImage); //imagesStackPanel.Children.Add(audioImage); //imagesStackPanel.Children.Add(videoImage); Image noteImage = new Image { Source = new BitmapImage(new Uri("ms-appx:///Images/Coursing/Lectures/newnote.png")), Margin = new Thickness(4, 0, -40, 0) }; noteImage.Height = 30; noteImage.Width = 30; noteImage.HorizontalAlignment = HorizontalAlignment.Right; Grid newLesson = new Grid() { Background = this.Resources["LessonBackgroundBrush"] as SolidColorBrush, Margin = new Thickness(2, 2, 80, 2) }; newLesson.Children.Add(lessonName); newLesson.Children.Add(imagesStackPanel); newLesson.Children.Add(noteImage); noteImage.Tapped += noteImage_Tapped; AddImageButton(les.ID, imagesStackPanel); return(newLesson); }