예제 #1
0
파일: DiffStudent.cs 프로젝트: lis0jk/Laba8
 public DiffStudent(string name, UniversityType university, FacultyType faculty,
                    SpecialityType speciality, int rankingPlace, int[] array) : base(name, university, rankingPlace, array)
 {
     Faculty    = faculty;
     Speciality = speciality;
     Ticket     = GenerateID.Generate();
 }
예제 #2
0
 public Student(
     string firstName,
     string middleName,
     string lastName,
     int ssnNumber,
     string address,
     string phone,
     string email,
     string course,
     SpecialtyType specialty,
     UniversityType university,
     FacultyType faculty)
 {
     this.FirstName  = firstName;
     this.MiddleName = middleName;
     this.LastName   = lastName;
     this.SSN        = ssnNumber;
     this.Address    = address;
     this.Phone      = phone;
     this.Email      = email;
     this.Course     = course;
     this.Specialty  = specialty;
     this.University = university;
     this.Faculty    = faculty;
 }
예제 #3
0
파일: Student.cs 프로젝트: ikupenov/Telerik
 ////Constructor
 public Student(
     string firstName,
     string middleName,
     string lastName,
     string socialSecurityNumber,
     string permanentAddress,
     string phoneNumber,
     string emailAddress,
     string course,
     SpecialtyType specialty,
     UniversityType university,
     FacultyType faculty)
 {
     this.FirstName        = firstName;
     this.MiddleName       = middleName;
     this.LastName         = lastName;
     this.SSN              = socialSecurityNumber;
     this.permanentAddress = permanentAddress;
     this.PhoneNumber      = phoneNumber;
     this.EmailAddress     = emailAddress;
     this.Course           = course;
     this.Specialty        = specialty;
     this.University       = university;
     this.Faculty          = faculty;
 }
예제 #4
0
        public ActionResult DeleteConfirmed(int id)
        {
            UniversityType universityType = db.UniversityTypes.Find(id);

            universityType.Is_Deleted = true;
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #5
0
 public Student(string firstName, string midName, string lastName, int ssn,
                string address, string phone, string email, string course,
                SpecialtyType specialty, UniversityType university, FacultyType faculty)
     : this(firstName, midName, lastName, ssn, address, phone, email, course)
 {
     this.specialty  = specialty;
     this.university = university;
     this.faculty    = faculty;
 }
예제 #6
0
 public StudentModel(string name, string adress, string phone, string email,
                     string ssn, byte course, UniversityType uniType, FacultyType facType, SpecialtyType specType)
 {
     Names           = name.Split(' ');
     this.Adress     = adress;
     this.Phone      = phone;
     this.Email      = email;
     this.SSN        = ssn;
     this.Course     = course;
     this.University = uniType;
     this.Faculty    = facType;
     this.Specialty  = specType;
 }
예제 #7
0
 public Student(string firstName, string middleName, string lastName, string ssn, string address, string phoneNumber, string email, SpecialityType speciality, UniversityType university, FacultiesType faculties)
 {
     this.firstName   = firstName;
     this.middleName  = middleName;
     this.lastName    = lastName;
     this.ssn         = ssn;
     this.address     = address;
     this.phoneNumber = phoneNumber;
     this.email       = email;
     this.speciality  = speciality;
     this.university  = university;
     this.faculties   = faculties;
 }
예제 #8
0
 //constructor
 public Student(string firstName, string middleName, string lastName, string permanentAddress, string mobilePhone, string email, string course, SpecialityType speciality, UniversityType university, FacultyType faculty)
 {
     FirstName        = firstName;
     MiddleName       = middleName;
     LastName         = lastName;
     PermanentAddress = permanentAddress;
     MobilePhone      = mobilePhone;
     Email            = email;
     Course           = course;
     Speciality       = speciality;
     University       = university;
     Faculty          = faculty;
 }
예제 #9
0
        // GET: UniversityTypes/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("errorpage", "home"));
            }
            UniversityType universityType = db.UniversityTypes.Find(id);

            if (universityType == null)
            {
                return(RedirectToAction("errorpage", "home"));
            }
            return(View(universityType));
        }
예제 #10
0
 public Student(string firstName, string middleName, string lastName, int ssn, string permanentAddress, string mobilePhone,
                string email, byte course, SpecialityType specialityType, UniversityType universityType, FacultyType facultyType)
 {
     this.FirstName        = firstName;
     this.MiddleName       = middleName;
     this.LastName         = lastName;
     this.Ssn              = ssn;
     this.PermanentAddress = permanentAddress;
     this.MobilePhone      = mobilePhone;
     this.Email            = email;
     this.Course           = course;
     this.SpecialityType   = specialityType;
     this.UniversityType   = universityType;
     this.FacultyType      = facultyType;
 }
예제 #11
0
 public Student(string firstName, string middleName, string lastName, string ssn, string address, string phoneNumber,
     string email, string course, SpecialityType speciality, UniversityType university, FacultyType faculty)
 {
     this.FirstName = firstName;
     this.MiddleName = middleName;
     this.LastName = lastName;
     this.SSN = ssn;
     this.permanenetAddress = address;
     this.PhoneNumber = phoneNumber;
     this.Email = email;
     this.Course = course;
     this.University = university;
     this.Speciality = speciality;
     this.Faculty = faculty;
 }
예제 #12
0
 public Student(string firstName = "NoName", string middleName = "NoName", string lastName = "NoName",
     ulong ssn = 0, string address = "No Address", string tel = "0888000000", string email = "*****@*****.**",
     string course = "No course", SpecialityType spec = SpecialityType.Mathematics,
     UniversityType university = UniversityType.FreeUniversity, FacilityType facility = FacilityType.Facility1)
 {
     this.FirstName = firstName;
     this.MiddleName = middleName;
     this.LastName = lastName;
     this.SSN = ssn;
     this.Address = address;
     this.Tel = tel;
     this.Email = email;
     this.Univerisity = university;
     this.Facility = facility;
     this.Speciality = spec;
 }
예제 #13
0
 public Student(string firstName, string middleName, string lastName, string ssn,
                string address            = null, string mobile = null, string email = null, int course = 0,
                UniversityType university = UniversityType.Other,
                FacultyType faculty       = FacultyType.Other,
                SpecialtyType specialty   = SpecialtyType.Other)
 {
     this.FirstName  = firstName;
     this.MiddleName = middleName;
     this.LastName   = lastName;
     this.Ssn        = ssn;
     this.Address    = address;
     this.Mobile     = mobile;
     this.Email      = email;
     this.Course     = course;
     this.University = university;
     this.Faculty    = faculty;
     this.Specialty  = specialty;
 }
예제 #14
0
        public ActionResult Create(UniversityType universityType)
        {
            if (ModelState.IsValid)
            {
                var data = db.UniversityTypes.Where(a => a.Is_Deleted != true && a.UniversityTypeName == universityType.UniversityTypeName).SingleOrDefault();

                if (data != null)
                {
                    ViewBag.school = Languages.Language.SchoolErr;
                    return(View(universityType));
                }
                db.UniversityTypes.Add(universityType);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(universityType));
        }
예제 #15
0
        public static Student CreateStudent()
        {
            Console.Write("First name: ");
            string firstName = Console.ReadLine();

            Console.Write("Middle name: ");
            string middleName = Console.ReadLine();

            Console.Write("Last name: ");
            string lastName = Console.ReadLine();

            Console.Write("SSN: ");
            string ssn = Console.ReadLine();

            Console.Write("Address: ");
            string address = Console.ReadLine();

            Console.Write("Phone number: ");
            string phoneNumber = Console.ReadLine();

            Console.Write("E-mail: ");
            string email = Console.ReadLine();

            Console.Clear();

            UniversityType university = University();

            Console.Clear();

            FacultiesType faculty = Faculty();

            Console.Clear();

            SpecialityType speciality = Speciality();

            Console.Clear();

            Student student = new Student(firstName, middleName, lastName, ssn, address, phoneNumber, email, speciality, university, faculty);

            return(student);
        }
예제 #16
0
        public ActionResult Edit(UniversityType universityType)
        {
            if (ModelState.IsValid)
            {
                var data = db.UniversityTypes.Where(a => a.Id != universityType.Id && a.Is_Deleted != true);
                foreach (var item in data)
                {
                    if (item.UniversityTypeName == universityType.UniversityTypeName)
                    {
                        ViewBag.school = Languages.Language.SchoolErr;
                        return(View(universityType));
                    }
                }

                var old = db.UniversityTypes.Find(universityType.Id);
                old.UniversityTypeName       = universityType.UniversityTypeName;
                old.UniversityTypeNameArabic = universityType.UniversityTypeNameArabic;
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }
            return(View(universityType));
        }
예제 #17
0
        public static UniversityType University()
        {
            UniversityType university = new UniversityType();
            int            choice     = 0;

            do
            {
                Console.WriteLine("Choose university");
                Console.WriteLine("1. TU");
                Console.WriteLine("2. SU");
                Console.WriteLine("3. NBU");
                Console.WriteLine("4. UNSS");
                Console.Write("Your choice");
                choice = int.Parse(Console.ReadLine());
            } while (choice < 1 || choice > 4);

            switch (choice)
            {
            case 1:
                university = UniversityType.TU;
                break;

            case 2:
                university = UniversityType.SU;
                break;

            case 3:
                university = UniversityType.NBU;
                break;

            case 4:
                university = UniversityType.UNSS;
                break;
            }

            return(university);
        }
예제 #18
0
 public Student(string firstName,
                string middleName,
                string lastName,
                int ssn,
                string permanentAddress,
                int mobilePhone,
                string eMail,
                int course,
                SpecialtyType specialty,
                UniversityType university,
                FacultyType faculty)
 {
     this.FirstName        = firstName;
     this.MiddleName       = middleName;
     this.LastName         = lastName;
     this.SSN              = ssn;
     this.PermanentAddress = permanentAddress;
     this.MobilePhone      = mobilePhone;
     this.EMail            = eMail;
     this.Course           = course;
     this.Specialty        = specialty;
     this.University       = university;
     this.Faculty          = faculty;
 }
예제 #19
0
 public Student(string firstName, string middleName, string lastName, Address addres, UniversityType university, FacultyType faculty, SpecialtyType specialty, CourseType course)
 {
     this.FirstName        = firstName;
     this.MiddleName       = middleName;
     this.LastName         = lastName;
     this.PermanentAddress = addres;
     this.University       = university;
     this.Faculty          = faculty;
     this.Specialty        = specialty;
     this.Course           = course;
 }
예제 #20
0
 public Student(string firstName, string middleName, string lastName, Address addres, UniversityType university, FacultyType faculty, SpecialtyType specialty, CourseType course, int ssn, string email)
     : this(firstName, middleName, lastName, addres, university, faculty, specialty, course)
 {
     this.SSN   = ssn;
     this.Email = email;
 }
예제 #21
0
 public Student(string name, UniversityType university,
                int rankingPlace, int[] array) : base(name)
 {
     University   = university;
     RankingPlace = rankingPlace;
 }