Пример #1
0
 private void btnOk_Click(object sender, EventArgs e)
 {
     if (Validation())
     {
         Student std = new Student();
         std.FullName    = txtFullName.Text;
         std.StudentCode = txtStudentCode.Text;
         std.ClassName   = txtClassName.Text;
         std.Nation      = txtNation.Text;
         if (radioNam.Checked == true)
         {
             std.Gender = radioNam.Text;
         }
         else
         {
             std.Gender = radioNu.Text;
         }
         std.DateOfBirth = DateTime.Parse(dateTimePicker1.Text);
         StudentService.AddNew(std);
         this.Close();
     }
 }
Пример #2
0
 private void FormChart_Load(object sender, EventArgs e)
 {
     chart1.Series["Series1"].Points.AddXY("Nam", StudentService.CountSv());
     chart1.Series["Series1"].Points.AddXY("Nữ", StudentService.lstStudent.Count - StudentService.CountSv());
 }
Пример #3
0
 //thêm tự động
 private void btnAutoAdd_Click(object sender, EventArgs e)
 {
     StudentService.AutoData();
     BindData();
 }
Пример #4
0
 private void SearchResult_Load(object sender, EventArgs e)
 {
     dataGridView1.DataSource = StudentService.Search(StudentService.txt);
 }