Exemplo n.º 1
0
        private void UpdateStudentMenu()
        {
            if (students.Count == 0)
            {
                Console.WriteLine("No student in List");
            }
            else
            {
                string   hoTen, diaChi, dienThoai;
                DateTime ngaySinh;
                string   mMaSv = GetInput.GetString("Nhap MaSV Can cap nhat: ", "Vui long nhap lai");

                Student s = FindStudent(mMaSv);
                if (s == null)
                {
                    Console.WriteLine("Khong tim thay sinh vien " + mMaSv);
                }
                else

                {
                    ngaySinh  = GetInput.GetDate("Nhap ngaysinh (MM/DD/YYYY)", "Vui long nhap lai");
                    hoTen     = GetInput.GetString("Nhap Ho Ten", "Vui long nhap lai");
                    diaChi    = GetInput.GetString("Nhap Dia CHi", "Vui long nhap lai");
                    dienThoai = GetInput.GetPhoneNumber("Nhap so dt", "Nhap dung dinh dang");
                    UpdateStudent(mMaSv, hoTen, ngaySinh, diaChi, dienThoai);

                    Console.WriteLine("Cap nhat thanh cong");
                }
            }
        }
Exemplo n.º 2
0
 private void FindStudentMenu()
 {
     if (students.Count == 0)
     {
         Console.WriteLine("No student in List");
     }
     else
     {
         string  mMaSv = GetInput.GetString("Nhap MaSV Can tim: ", "Vui long nhap lai");
         Student s     = FindStudent(mMaSv);
         if (s == null)
         {
             Console.WriteLine("Khong tim thay sinh vien " + mMaSv);
         }
         else
         {
             s.XemThongTin();
         }
     }
 }
Exemplo n.º 3
0
        private void AddStudentMenu()
        {
            string   mMaSV, hoTen, diaChi, dienThoai;
            DateTime ngaySinh;

            do
            {
                mMaSV = GetInput.GetString("Nhap MaSV", "Vui long nhap lai");
                //check student was in List
                if (FindStudent(mMaSV) != null)
                {
                    Console.WriteLine("That student was exsits");
                    return;
                }
                ngaySinh  = GetInput.GetDate("Nhap ngaysinh (MM/DD/YYYY)", "Vui long nhap lai");
                hoTen     = GetInput.GetString("Nhap Ho Ten", "Vui long nhap lai");
                diaChi    = GetInput.GetString("Nhap Dia CHi", "Vui long nhap lai");
                dienThoai = GetInput.GetPhoneNumber("Nhap so dt", "Nhap dung dinh dang");

                AddStudent(mMaSV, hoTen, ngaySinh, diaChi, dienThoai);
                Console.WriteLine("Them thanh cong");
                return;
            } while (true);
        }