Esempio n. 1
0
 public DocVoencom(Students std)
 {
     this.InitializeComponent();
     this.datarozdenia_text.Text = std.Birth.ToString().Remove(4);
     this.lname_text.Text = std.LastName;
     this.fname_text.Text = std.FirstName;
     this.sname_text.Text = std.SecondName;
     this.oplata_text.Text = std.Oplata;
     this.num_spec_text.Text = std.SpecCode;
     this.name_spec_text.Text = std.SpecName;
 }
Esempio n. 2
0
        public StudFulInfo(MainWindow mw, Students obj)
        {
            


            MainForm = mw;
            mw.DelStFullInfo();
            this.InitializeComponent();

            this.fio.IsEnabled = false;
            this.propiska_st.IsEnabled = false;
            this.faktAddr_st.IsEnabled = false;
            this.PassportVidan_st.IsEnabled = false;
            this.PassportNum_st.IsEnabled = false;
            this.snils_st.IsEnabled = false;
            this.birth_st.IsEnabled = false;
            this.baza_st.IsEnabled = false;
            this.forma_st.IsEnabled = false;
            this.datePodachi_st.IsEnabled = false;
            this.add_foto.IsEnabled = false;
            this.status_st.IsEnabled = false;
            combo_st.ItemsSource = Status.massiv;
            Student = obj;
            ImageSelect();
            LayoutRoot.DataContext = Student; // для биндинга

            #region Привязка события LostFocus для обновления контента
            this.snils_st.LostFocus += (s, e) => { SavData(Students.EditUpdate(Id, snils_st.Text, snils_st.Name)); };
            this.PassportNum_st.LostFocus += (s, e) => { SavData(Students.EditUpdate(Id, PassportNum_st.Text, PassportNum_st.Name)); };
            this.PassportVidan_st.LostFocus += (s, e) => { SavData(Students.EditUpdate(Id, PassportVidan_st.Text, PassportVidan_st.Name)); };
            this.propiska_st.LostFocus += (s, e) => { SavData(Students.EditUpdate(Id, propiska_st.Text, propiska_st.Name)); };
            this.faktAddr_st.LostFocus += (s, e) => { SavData(Students.EditUpdate(Id, faktAddr_st.Text, faktAddr_st.Name)); };
            this.forma_st.LostFocus += (s, e) => { SavData(Students.EditUpdate(Id, forma_st.Text, forma_st.Name)); };
            this.birth_st.LostFocus += (s, e) => { SavData(Students.EditUpdate(Id, birth_st.Text, birth_st.Name)); };
            this.datePodachi_st.LostFocus += (s, e) => { SavData(Students.EditUpdate(Id, datePodachi_st.Text, datePodachi_st.Name)); };
            this.fio.KeyDown += (s, e) => 
            {if (Lname != null)
                SavData(Students.EditUpdate(Id, Lname, "lname_st"));
            if (Sname != null)
                SavData(Students.EditUpdate(Id, Sname, "sname_st"));
            if (Fname != null)
                SavData(Students.EditUpdate(Id, Fname, "fname_st"));
            };
            //this.oplata_st.LostFocus += (s, e) => { SavData(Students.EditUpdate(Id, oplata_st.Text, oplata_st.Name)); };
            #endregion
        }
Esempio n. 3
0
File: DocForm.cs Progetto: ruhex/ais
        public DocForm(Students std, string FileName)
        {
            Student = std;
            var WordApp = new Word.Application();
            WordApp.Visible = false;
            var doc = WordApp.Documents.Open(FileName);

            Form("{Data}", "23.05.2014", doc);
            Form("{LastName}", std.LastName, doc);
            Form("{FirstName}", std.FirstName, doc);
            Form("{SecondName}", std.SecondName, doc);
            Form("{DataBerzday}", std.Birth, doc);
            Form("{GroupName}", std.GroupRef.Group.ToString(), doc);
            Form("{SpecName}", std.GroupRef.SpecName, doc);
            doc.SaveAs(Student.FirstName);
            
            //new Window1().richTextBox1.
            //WordApp.Visible = true;
        }
Esempio n. 4
0
 /// <summary>
 /// Публичный статический метод SelectAllInfo. Производит полную выборку информации о студенте. Студент подаётся на вход.
 /// </summary>
 /// <param name="student">Объект типа Students</param>
 public static void SelectAllInfo(Students student)
 {
     string Query = "SELECT * FROM study WHERE id_st =" + student.Id;
     MySqlDataReader dataReader = MySQL.DataReader(Query);
                
     while (dataReader.Read())
     {
         student.Id = dataReader.GetInt16("id_st");
         student.FirstName = dataReader.GetString("fname_st");
         student.LastName = dataReader.GetString("lname_st");
         student.SecondName = dataReader.GetString("sname_st");
         student.PassportNum = dataReader.GetString("PassportNum_st");
         student.PassportVidan = dataReader.GetString("PassportVidan_st");
         student.Propiska = dataReader.GetString("propiska_st");
         student.FaktAddr = dataReader.GetString("faktAddr_st");
         student.Snils = dataReader.GetString("snils_st");
         student.Sex = dataReader.GetString("sex_st");
         student.Birth = dataReader.GetString("birth_st");
         student.Baza = dataReader.GetString("baza_st");
         student.Obshez = dataReader.GetString("obshez_st");
         student.Srball = dataReader.GetString("srball_st");
         student.StatusID = dataReader.GetInt16("status_st");
         student.Forma = dataReader.GetString("forma_st");
         student.Oplata = dataReader.GetString("oplata_st");
         student.DatePodachi = dataReader.GetString("datePodachi_st");
         student.GroupID = dataReader.GetInt16("group_st");
         student.Podgruppa = dataReader.GetInt16("podgruppa_st");
         student.Phone = dataReader.GetInt16("phone_st");
         student.Idzakaz = dataReader.GetInt16("idzakaz_st");
         student.Temp = dataReader.GetString("temp_st");
         student.Age = age(Date.GetDate(), dataReader.GetString("birth_st"));
     }       
     MySQL.connection.Close();
 }