Exemplo n.º 1
0
        private void Button_Click_4(object sender, RoutedEventArgs e)
        {
            DiplomaContext context = new DiplomaContext();
            Diploma        result  = (from dp in context.Diplomas where dp.student == tempuser.facultyNumber select dp).First();
            DialogDipl     dialog  = new DialogDipl("Vuvedete tema", "Web sait");

            if (dialog.ShowDialog() == true)
            {
                result.topic = dialog.Answer;
            }
            diplomaTxt.Text = result.topic;
            context.SaveChanges();                       // promenite se zapazvat v bazata danni mojete da runete query
        }
Exemplo n.º 2
0
        public void Populate(object obj)
        {
            FirstName   = st.firstName;
            SureName    = st.sureName;
            LastName    = st.lastName;
            Faculty     = st.faculty;
            Specialnost = st.specialnost;
            Oks         = st.major;
            Status      = st.status;
            FacNumber   = st.facultyNumber;
            Course      = Convert.ToString(st.course);
            Potok       = Convert.ToString(st.potok);
            Group       = Convert.ToString(st.group);
            DiplomaContext context = new DiplomaContext();
            Diploma        result  = (from dp in context.Diplomas where dp.student == st.facultyNumber select dp).First();

            Diploma = result.topic;
        }