当前位置: 首页>>代码示例>>C#>>正文


C# Grade类代码示例

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


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

示例1: IsHonours

 public bool IsHonours(Grade value)
 {
     if (value == Grade.A)
         return true;
     else
         return false;
 }
开发者ID:mmayo2,项目名称:DMIT2018InClass,代码行数:7,代码来源:AdHoc.cs

示例2: AddGrades

 public void AddGrades(int grade, string subject)
 {
     Grade gradeToAdd = new Grade();
     gradeToAdd.grade = grade;
     gradeToAdd.subject = subject;
     this.grades.Add(gradeToAdd);
 }
开发者ID:bogdanuifalean,项目名称:JuniorMind,代码行数:7,代码来源:Pupil.cs

示例3: AddGrade

        public ActionResult AddGrade(int studentId, int subjectId, string gradeValue)
        {
            try
            {
                Grade grade = new Grade();
                grade.GradeValue = double.Parse(gradeValue);
                grade.StudentId = studentId;
                grade.SubjectId = subjectId;

                if (grade.GradeValue < 2 || grade.GradeValue > 6)
                {
                    TempData.FlashMessage("Grade must be between 2.00 and 6.00!", null, FlashMessageTypeEnum.Red);
                    return RedirectToAction("Index", "Teacher");
                }

                unitOfWork.GradeRepository.Insert(grade);
                unitOfWork.Save();
            }
            catch (FormatException)
            {
                TempData.FlashMessage("Grade must be a number!", null, FlashMessageTypeEnum.Red);
            }

            return RedirectToAction("Index", "Teacher");
        }
开发者ID:bobi95,项目名称:UniSystemMVC,代码行数:25,代码来源:GradeController.cs

示例4: SetPulse

	public void SetPulse(int playerNumber, Grade grade)
	{
		Sprite img = sprites[(int)grade];
		var pulse = pulses[playerNumber];
		pulse.GetComponent<Image>().sprite = img;
		pulse.DoIt();
	}
开发者ID:PinkRodeo,项目名称:GGJ2016,代码行数:7,代码来源:Floater.cs

示例5: GetAccounts

 public static List<Account> GetAccounts(
     string name,
     int gender,
     string bloodType,
     int birthYear,
     int birthMonth,
     int birthDate,
     City hometownCity,
     Province homwtownProvince,
     City resideCity,
     Province resideProvince,
     ClassInfo classInfo,
     Grade grade,
     Major major,
     College college,
     University university,
     string code,
     bool? hasAvatar,
     string nickName,
     bool? isProtected,
     int minViewCount,
     int maxViewCount,
     bool? isPublic,
     int minYear,
     int maxYear,
     string interest,
     PagingInfo pagingInfo)
 {
     return provider.GetAccounts(
         name,
         gender,
         bloodType,
         birthYear,
         birthMonth,
         birthDate,
         hometownCity,
         homwtownProvince,
         resideCity,
         resideProvince,
         classInfo,
         grade,
         major,
         college,
         university,
         code,
         hasAvatar,
         nickName,
         isProtected,
         minViewCount,
         maxViewCount,
         isPublic,
         minYear,
         maxYear,
         interest,
         pagingInfo);
 }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:56,代码来源:AccountService.cs

示例6: Edit

 public ActionResult Edit(Grade grade)
 {
     if (ModelState.IsValid)
     {
         _context.Entry(grade).State = EntityState.Modified;
         _context.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(grade);
 }
开发者ID:om471987,项目名称:PedagogyWorld,代码行数:10,代码来源:GradeController.cs

示例7: createGrade

        private Grade createGrade(GradeType gradeType, SchoolYearType schoolYear, string sectionId, string studentId, string studentSectionAssocation)
        {
            Grade grade = new Grade();
            grade.gradeType = gradeType;
            grade.schoolYear = schoolYear;
            grade.sectionId = sectionId;
            grade.studentId = studentId;
            grade.studentSectionAssociationId = studentSectionAssocation;

            return grade;
        }
开发者ID:jatpannu,项目名称:cookbook,代码行数:11,代码来源:Recipe11.cs

示例8: Create

        public ActionResult Create(Grade grade)
        {
            if (ModelState.IsValid)
            {
                _context.Grades.Add(grade);
                _context.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(grade);
        }
开发者ID:om471987,项目名称:PedagogyWorld,代码行数:11,代码来源:GradeController.cs

示例9: postGrade

        private RestResponse postGrade(string token, Grade grade)
        {
            var client = new RestClient(WebConfigurationManager.AppSettings["inBloomRestURL"]);
            var endpoint = "grades";

            var request = inBloomRestRequest(token, endpoint, Method.POST);
            request.AddBody(grade);
            RestResponse response = (RestResponse)client.Execute(request);

            return response;
        }
开发者ID:jatpannu,项目名称:cookbook,代码行数:11,代码来源:Recipe11.cs

示例10: IsHonours

        public bool IsHonours(Grade value)
        {
            if (value == Grade.A)
            {
                return true;
            }//end if

            else
            {
                return false;
            }//end else

        }
开发者ID:mklause1,项目名称:DMIT2018-In-Class,代码行数:13,代码来源:AdHoc.cs

示例11: GradeTabPage

 public GradeTabPage(Grade grade)
 {
     _grade = grade;
     int i = 0;
     foreach (CoursePanel panel in grade.Select(course => new CoursePanel(course)))
     {
         // TODO: Initialize size, coordinates here, not in the panel itself
         panel.Top = ((i + 1) * panel.Margin.Top + i * (panel.Height + panel.Margin.Bottom));
         panel.GpaUpdated += OnGpaUpdated;
         Controls.Add(panel);
         i++;
     }
 }
开发者ID:apsun,项目名称:EzGPA,代码行数:13,代码来源:GradeTabPage.cs

示例12: ToFileSize

 public static long ToFileSize(this long sizeByte, Grade gradeToConverter = Grade.MB)
 {
     switch (gradeToConverter)
     {
         case Grade.GB:
             return sizeByte / 1024 / 1024 / 1024;
         case Grade.MB:
             return sizeByte / 1024 / 1024;
         case Grade.KB:
             return sizeByte / 1024;
         default:
             return sizeByte;
     }
 }
开发者ID:ckkwing,项目名称:CSharpLibrary,代码行数:14,代码来源:FileSizeExtension.cs

示例13: SetNewAssessmentTitleValue

        protected void SetNewAssessmentTitleValue()
        {
            _sessionObject = (SessionObject)Page.Session["SessionObject"];
            string grade = _sessionObject.AssessmentBuildParms["Grade"];
            Grade gradeOrdinal = new Grade(grade);
            string subject = _sessionObject.AssessmentBuildParms["Subject"];
            int courseID = DataIntegrity.ConvertToInt(_sessionObject.AssessmentBuildParms["Course"]);
            Base.Classes.Course assessmentCourse = CourseMasterList.GetCurrCourseById(courseID);
            string courseName = assessmentCourse != null ? assessmentCourse.CourseName : "";
            string type = _sessionObject.AssessmentBuildParms["Type"];
            string term = _sessionObject.AssessmentBuildParms["Term"];

            courseName = courseName == subject ? "" : courseName;
            newAssessmentTitle.Value = "Term " + term + " " + type + " - " + gradeOrdinal.GetFriendlyName() + " Grade " + subject + " " + courseName;
        }
开发者ID:ezimaxtechnologies,项目名称:ASP.Net,代码行数:15,代码来源:AssessmentWizardOptions.aspx.cs

示例14: GetGradeString

 public static String GetGradeString(Grade g)
 {
     switch (g)
     {
         case Grade.A: return "A";
         case Grade.B: return "B";
         case Grade.C: return "C";
         case Grade.D: return "D";
         case Grade.F: return "F";
         case Grade.P: return "P";
         case Grade.W: return "W";
         case Grade.None: return "None";
         default: System.Console.WriteLine("Bad Grade"); return "Bad";
     }
 }
开发者ID:HenryDorsettCase,项目名称:CS5700_-_Object-Oriented_Software_Development,代码行数:15,代码来源:CourseRecord.cs

示例15: init

 public override void init()
 {
     A = new Grade(0, 0);
     B = new Grade(0, 0);
     C = new Grade(0, 0);
     D = new Grade(0, 0);
     E = new Grade(0, 0);
     F = new Grade(0, 0);
     boundaries.Add("0-5-1");
     boundaries.Add("6-9-2");
     boundaries.Add("10-15-3");
     boundaries.Add("16-21-4");
     boundaries.Add("22-28-5");
     boundaries.Add("29-32-6");
     boundaries.Add("33-36-7");
 }
开发者ID:topazz,项目名称:MYP-GL,代码行数:16,代码来源:Technology.cs


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