Exemplo n.º 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();
     }
 }
Exemplo n.º 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());
 }
Exemplo n.º 3
0
 //thêm tự động
 private void btnAutoAdd_Click(object sender, EventArgs e)
 {
     StudentService.AutoData();
     BindData();
 }
Exemplo n.º 4
0
 private void SearchResult_Load(object sender, EventArgs e)
 {
     dataGridView1.DataSource = StudentService.Search(StudentService.txt);
 }