public Window1() { InitializeComponent(); connection = new SqlConnectionDB(); FocusManager.SetFocusedElement(this, textBox); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; }
public Student(int id) { InitializeComponent(); this.id = id; conn = new SqlConnectionDB(); string vid_query = "SELECT vid_name FROM videos"; listView.ItemsSource = conn.ListOF(vid_query); Info.IsSelected = true; WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; }
public Lecturer(int lecturer_id) { InitializeComponent(); this.lecturer_id = lecturer_id; conn = new SqlConnectionDB(); fillcourses(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; string select_title = "SELECT tch_name FROM teacher where tch_id=" + lecturer_id; string select_degree = "SELECT tch_degree FROM teacher WHERE tch_id=" + lecturer_id; string dgree = conn.ListOF(select_degree).ElementAt(0); if ((dgree.ToLower()) == "doctor") { title.Content = "D." + conn.ListOF(select_title).ElementAt(0); } else { title.Content = "I." + conn.ListOF(select_title).ElementAt(0); } }
public teacher() { InitializeComponent(); conn = new SqlConnectionDB(); WindowStartupLocation = System.Windows.WindowStartupLocation.CenterScreen; }