public ViewStudent(PM06722 student)
 {
     this.id       = student.id;
     this.code     = student.Code;
     this.name     = student.Name;
     this.gender   = student.Gender == true ? "Nu" : "Nam";
     this.hometown = student.Hometown;
 }
Beispiel #2
0
        public void AddStudent(string code, string name, bool gender, string birthPlace)
        {
            var student = new PM06722();

            //student.id = id;
            student.Code     = code;
            student.Name     = name;
            student.Gender   = gender;
            student.Hometown = birthPlace;

            var db = new OOPCSEntities();

            db.PM06722.Add(student);
            db.SaveChanges();
        }