• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Instructor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Instructor的典型用法代码示例。如果您正苦于以下问题:C# Instructor类的具体用法?C# Instructor怎么用?C# Instructor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Instructor类属于命名空间,在下文中一共展示了Instructor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: InstructorAssignment

        public InstructorAssignment(Instructor teacher, SubjectDelivery subject)
        {
            Instructor = teacher as Teacher;
            Subject = subject;
            Role = InstructorAssignmentRole.All;

        }
开发者ID:sasa333,项目名称:course-fantastic,代码行数:7,代码来源:InstructorAssignment.cs


示例2: Main

        static void Main(string[] args)
        {
            Instructor John = new Instructor("John", "Smith", "English");

            John.PrintInfo();

               Instructor Mike = new Instructor("Mike", "Jones", "Math");
            Mike.PrintInfo();

            Student Jane = new Student("Jane", "Adams", John, 0);
            Student Joe = new Student("Joe", "Jenkins", John, 0);
            Student Melissa = new Student("Melissa", "King", Mike, 0);
            Student Matt = new Student("Matt", "Sanchez", Mike, 0);

            John.SetStudentGrade(Jane, 95);
            John.SetStudentGrade(Joe, 85);
            Mike.SetStudentGrade(Melissa, 90);
            Mike.SetStudentGrade(Matt, 92);

            Jane.PrintNameTeacherCourse();

            Joe.PrintNameTeacherCourse();

            Melissa.PrintNameTeacherCourse();

            Matt.PrintNameTeacherCourse();

            System.Console.ReadKey();
        }
开发者ID:aasante0619,项目名称:Class-IT1050,代码行数:29,代码来源:Program.cs


示例3: Main

        static void Main(string[] args)
        {
            var john = new Instructor("John", "English");
            var mike = new Instructor("Mike", "Math");

            var jane = new Student("Jane", john);
            var joe = new Student("Joe", john);
            var melissa = new Student("Melissa", mike);
            var matt = new Student("Matt", mike);

            john.SetStudentGrade(jane, 95);
            john.SetStudentGrade(joe, 85);

            mike.SetStudentGrade(melissa, 90);
            mike.SetStudentGrade(matt, 92);

            Show.Divider();
            Show.Header();

            jane.PrintStudentInfo();
            joe.PrintStudentInfo();
            melissa.PrintStudentInfo();
            matt.PrintStudentInfo();

            Show.Divider();
            Show.ProgEnd();
        }
开发者ID:LaurenMazzoli,项目名称:IT-1050,代码行数:27,代码来源:Program.cs


示例4: Main

        static void Main(string[] args)
        {
            //Create Instructor 
            Instructor John = new Instructor("John", "English");
            Instructor Mike = new Instructor("Mike", "Math");

            //Create Students
            Student Jane = new Student("Jane", John);
            Student Joe = new Student("Joe", John);
            Student Melissa = new Student("Melissa", Mike);
            Student Matt = new Student("Matt", Mike);

            //Instructor Set Student Grade
            John.StudentGrade(Jane, 95);
            John.StudentGrade(Joe, 85);
            Mike.StudentGrade(Melissa, 90);
            Mike.StudentGrade(Matt, 92);

            //Print Instructor Information
            John.PrintInstructorInfo();
            Mike.PrintInstructorInfo();

            //Print Student Information
            Jane.PrintStudentInfo();
            Joe.PrintStudentInfo();
            Melissa.PrintStudentInfo();
            Matt.PrintStudentInfo();

            System.Console.ReadKey();

        }
开发者ID:jeanne27king,项目名称:IT1050,代码行数:31,代码来源:Program.cs


示例5: RegisterButton_Click

        private void RegisterButton_Click(object sender, RoutedEventArgs e)
        {
            try
            {
                if (PasswordBox.Password != PasswordRepeatBox.Password)
                    throw new Exception("Паролі не співпадають");
                Instructor instructor = new Instructor(LoginBox.Text, PasswordBox.Password, FirstNameBox.Text, LastNameBox.Text,
                    SecondNameBox.Text);
                Configuration config = (App.Current as App).config;
                using (TcpClient eClient = new TcpClient(config.IP.ToString(), config.Port))
                {
                    using (NetworkStream writerStream = eClient.GetStream())
                    {
                        MSG message = new MSG();
                        message.stat = STATUS.ADD_INSTRUCTOR;
                        BinaryFormatter formatter = new BinaryFormatter();
                        formatter.Serialize(writerStream, message);
                        formatter.Serialize(writerStream, instructor);
                        bool fl = (bool)formatter.Deserialize(writerStream);
                        if (!fl)
                            MessageBox.Show("Помилка додавання облікового запису");
                        else
                        {
                            NavigationService nav = NavigationService.GetNavigationService(this);
                            nav.Navigate(new System.Uri("StartPage.xaml", UriKind.RelativeOrAbsolute));
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

        }
开发者ID:senioroman4uk,项目名称:courseWork,代码行数:35,代码来源:RegisterPage.xaml.cs


示例6: Main

        static void Main(string[] args)
        {
            Instructor John = new Instructor("John", "English");
            Instructor Mike = new Instructor("MIKE", "Math");

            Student Jane = new Student("Jane", John);
            Student Joe = new Student("Joe", John);

            Student Melissa = new Student("Melissa", Mike);
            Student Matt = new Student("Matt", Mike);

            John.SetStudentGrade(Jane, 95);
            John.SetStudentGrade(Joe, 85);
            Mike.SetStudentGrade(Melissa, 90);
            Mike.SetStudentGrade(Matt, 92);

            Jane.PrintStudentInfo();
            Joe.PrintStudentInfo();
            Melissa.PrintStudentInfo();
            Matt.PrintStudentInfo();

            System.Console.WriteLine();
            System.Console.ReadKey();


        }
开发者ID:Madhunayak,项目名称:IT1050,代码行数:26,代码来源:Program.cs


示例7: Main

        static void Main(string[] args)
        {

            //     INSTUCTOR CREATION     //
            Instructor john = new Instructor("John", "English");
            Instructor mike = new Instructor("Mike", "Math");
            
            //     STUDENT CREATION     //
            Student jane = new Student("Jane", john);
            Student joe = new Student("Joe", john);
            Student melissa = new Student("Melissa", mike);
            Student matt = new Student("Matt", mike);

            //     GRADE ASSIGNMENT     //
            john.SetGrade(jane, 95);
            john.SetGrade(joe, 85);
            mike.SetGrade(melissa, 90);
            mike.SetGrade(matt, 92);

            jane.Print();
            joe.Print();
            melissa.Print();
            matt.Print();
            System.Console.Read();

        }
开发者ID:hannah-purgar,项目名称:IT-1025,代码行数:26,代码来源:Program.cs


示例8: Create

 // GET: Instructor/Create
 public ActionResult Create()
 {
     var instructor = new Instructor();
     instructor.Courses = new List<Course>();
     PopulateAssignedCourseData(instructor);
     return View();
 }
开发者ID:dplavcic,项目名称:Contoso_University_v5,代码行数:8,代码来源:InstructorController.cs


示例9: Main

        static void Main(string[] args)
        {
            Instructor EnglishInstructor = new Instructor("John", "English");

            Instructor MathInstructor = new Instructor("Mike", "Math");

            Student Student1 = new Student("Jane", EnglishInstructor);

            Student Student2 = new Student("Joe", EnglishInstructor);

            Student Student3 = new Student("Melissa", MathInstructor);

            Student Student4 = new Student("Matt", MathInstructor);

            EnglishInstructor.SetStudentGrade(Student1, 95);
            EnglishInstructor.SetStudentGrade(Student2, 85);
            MathInstructor.SetStudentGrade(Student3, 90);
            MathInstructor.SetStudentGrade(Student4, 92);

            System.Console.WriteLine("    Student Information    ");
            System.Console.WriteLine(" ");
            Student1.Print();
            Student2.Print();
            Student3.Print();
            Student4.Print();
            System.Console.ReadKey();
        }
开发者ID:kcbwilson,项目名称:IT-1050,代码行数:27,代码来源:Program.cs


示例10: Main

        static void Main(string[] args)
        {
            Instructor johnh = new Instructor("johnh", "english");
            Instructor mike = new Instructor("Mike", "Math");
            Student jane = new Student("Jane", johnh,0);
            Student joe = new Student("Joe", johnh,0);
            Student melissa = new Student("Melisa", mike,0);
            Student matt = new Student("Matt", mike,0);
            /////////////////////////////////////////////////////////

            johnh.SetStudetGrade(jane, 95);
            johnh.SetStudetGrade(joe, 85);
            mike.SetStudetGrade(melissa, 90);
            mike.SetStudetGrade(matt, 92);
            /////////////////////////////////////////////////////////
            melissa.PrintNameGradeTeacher();
            jane.PrintNameGradeTeacher();
            joe.PrintNameGradeTeacher();
            matt.PrintNameGradeTeacher();
            //////////////////////////////////////////////////
            //johnh.PrintTeacherInformation();
            //mike.PrintTeacherInformation();
            System.Console.WriteLine("press any key to end.. ");
            System.Console.ReadKey();
        }
开发者ID:MaximSBolocan,项目名称:1050-homework,代码行数:25,代码来源:Program.cs


示例11: WarriorTrainer

        /// <summary>
        /// Prevents a default instance of the <see cref="WarriorTrainer" /> class from being created.
        /// </summary>
        /// <param name="i2">The i2.</param>
        private WarriorTrainer(Instructor i2)
        {
            i = i2;

            a = 1;
            d = 1;
            h = 1;
        }
开发者ID:philippdolder,项目名称:CleanCode.Academy,代码行数:12,代码来源:WarriorTrainer.cs


示例12: Student

 public Student(string studentFirstName, string studentLastName, Instructor Teacher, int Grade)
 {
     this.FirstName = studentFirstName;
     this.LastName = studentLastName;
     this.fullname = this.FirstName + " " + this.LastName;
     this.Teacher = Teacher;
     this.Grade = Grade;
 }
开发者ID:aasante0619,项目名称:Class-IT1050,代码行数:8,代码来源:Student.cs


示例13: Awake

 void Awake()
 {
     effects = GameObject.FindObjectOfType<EffectPlayer>();
     pieces = GameObject.FindObjectsOfType<MoveForward>().ToList();
     player = GameObject.FindObjectOfType<Player>();
     music = GetComponent<MusicManager>();
     score = GetComponent<ScoreManager>();
     instructor = GameObject.FindObjectOfType<Instructor>();
     obstacles = GameObject.Find("Obstacle");
 }
开发者ID:ChrisMaire,项目名称:surfenstein,代码行数:10,代码来源:GameManager.cs


示例14: UpdateInstructor

 public void UpdateInstructor(Instructor instructor)
 {
     //try
     //{
         context.Entry(instructor).State = EntityState.Modified;
     //}
     //catch
     //{
     //    throw;
     //}
 }
开发者ID:DanielSwistowski,项目名称:ContosoUniversityRepo,代码行数:11,代码来源:InstructorRepository.cs


示例15: Create

        public ActionResult Create(Instructor instructor)
        {
            if (RepositoryFactory.InstructorRepository.Queryable.Any(i => i.Identifier == instructor.Identifier))
            {
                Message =
                    string.Format(
                        "Instructor could not be created because an instructor with the identifier {0} already exists",
                        instructor.Identifier);
                return RedirectToAction("Index");
            }

            var instructorToCreate = new Instructor();

            TransferValues(instructor, instructorToCreate);

            if (ModelState.IsValid)
            {
                //if the instructor doesn't exist as a user account, create them an account and profile
                var existingUser =
                    RepositoryFactory.UserRepository.Queryable.SingleOrDefault(
                        x => x.Identifier == instructorToCreate.Identifier);

                if (existingUser == null)
                {
                    var profile = new Profile
                        {
                            FirstName = instructorToCreate.FirstName,
                            LastName = instructorToCreate.LastName,
                            Email = instructorToCreate.Identifier,
                            ImageUrl = WebConfigurationManager.AppSettings["DefaultProfilePictureUrl"]
                        };

                    var user = new User {Identifier = instructorToCreate.Identifier};
                    user.AssociateProfile(profile);
                    user.Roles.Add(RepositoryFactory.RoleRepository.GetById(RoleNames.Instructor));
                    existingUser = user;
                    RepositoryFactory.UserRepository.EnsurePersistent(user);
                }

                instructorToCreate.User = existingUser;
                RepositoryFactory.InstructorRepository.EnsurePersistent(instructorToCreate);

                Message = "Instructor Created Successfully";

                return RedirectToAction("Index");
            }
            else
            {
                var viewModel = InstructorViewModel.Create(Repository);
                viewModel.Instructor = instructor;

                return View(viewModel);
            }
        }
开发者ID:ucdavis,项目名称:Badges,代码行数:54,代码来源:InstructorController.cs


示例16: Create

        public ActionResult Create(Instructor instructor)
        {
            if (ModelState.IsValid)
            {
                db.Instructors.Add(instructor);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.CourseId = new SelectList(db.Courses, "CourseID", "CourseName", instructor.CourseId);
            return View(instructor);
        }
开发者ID:kevincos,项目名称:DIplomaBot,代码行数:12,代码来源:InstructorController.cs


示例17: Create

        public ActionResult Create(Instructor instructor)
        {
            if (ModelState.IsValid)
            {
                db.Instructors.Add(instructor);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            ViewBag.PersonID = new SelectList(db.OfficeAssignments, "PersonID", "Location", instructor.PersonID);
            return View(instructor);
        }
开发者ID:joeya,项目名称:MVCDEMO,代码行数:12,代码来源:InstructorController.cs


示例18: Main

        static void Main(string[] args)
        {
            //Class objects creation from base and derived classes
            Person myPerson = new Person("Tony", "Rosella" ,"123 way St.", "444-5555");
            Student myStudent = new Student("Joe", "Bob", "321 North Ave.", "321-123-4567", 3.45, "Computer Science", "11/10/16");
            Employee myEmployee = new Employee("Jake", "Smith", "456 Sea Dr.", "321-867-5309", "42345", "Health");
            Instructor myInstructor = new Instructor("Shela", "Roberts", "323 Fruit way", "323-456-3412", "333", "8-4 pm");

            //Displays info for each class
            Console.WriteLine(myPerson);
            Console.WriteLine(myStudent);
            Console.WriteLine(myEmployee);
            Console.WriteLine(myInstructor);
        }
开发者ID:killingerr,项目名称:Rosella,代码行数:14,代码来源:Program.cs


示例19: Create

        public static EntityStateWrapperContainer Create(IQueryRepository queryRepository, CreateInstructorWithCourses.CommandModel commandModel)
        {
            // could use Course.CreatePartial here and attachEntities using EntityStateWrapperContainer
            var courses = commandModel.SelectedCourses == null
                ? new Course[0].ToList()
                : queryRepository.GetEntities<Course>(new FindByIdsSpecificationStrategy<Course>(p => p.CourseID, commandModel.SelectedCourses)).ToList();

            var instructor = new Instructor
            {
                HireDate = commandModel.HireDate,
                FirstMidName = commandModel.FirstMidName,
                LastName = commandModel.LastName,
                Courses = courses,
                OfficeAssignment = new OfficeAssignment { Location = commandModel.OfficeLocation },
            };

            return new EntityStateWrapperContainer().AddEntity(instructor);
        }
开发者ID:NRepository,项目名称:ContosoUniversity,代码行数:18,代码来源:InstructorFactory.cs


示例20: AddInstructor

 public static void AddInstructor(Instructor instructor)
 {
     using (var conn = new SQLiteConnection(ConnectionString))
     {
         conn.Open();
         var cmd = new SQLiteCommand("insert into Instructors" + Instparam, conn);
         cmd.Parameters.AddWithValue("@1", instructor.FullName);
         cmd.Parameters.AddWithValue("@2", instructor.Sex);
         cmd.Parameters.AddWithValue("@3", instructor.Address);
         cmd.Parameters.AddWithValue("@4", instructor.Phone);
         cmd.Parameters.AddWithValue("@5", instructor.Email);
         cmd.Parameters.AddWithValue("@6", instructor.Education);
         cmd.Parameters.AddWithValue("@7", instructor.Department);
         cmd.Parameters.AddWithValue("@8", instructor.Post);
         cmd.Parameters.AddWithValue("@9", instructor.Start);
         cmd.Parameters.AddWithValue("@10", instructor.Other);
         cmd.ExecuteNonQuery();
     }
 }
开发者ID:Timothyyy,项目名称:ICS_MSHRC,代码行数:19,代码来源:DBProvider.cs



注:本文中的Instructor类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# Instrument类代码示例发布时间:2022-05-24
下一篇:
C# InstructionsForm类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap