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

C# Grade类代码示例

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

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



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


示例16: AddNewCourseRecordAndSTS

        public bool AddNewCourseRecordAndSTS(short studentID, short sectionID, Grade g)
        {
            String grade = CourseRecord.GetGradeString(g);
            var newCR = _studentRecords.CRsAndSsToSs.NewCRsAndSsToSsRow();
            newCR.StudentID = studentID;
            newCR.SectionID = sectionID;
            newCR.Grade = grade;

            try
            {
                _studentRecords.CRsAndSsToSs.AddCRsAndSsToSsRow(newCR);
            }
            catch (Exception e) { return false; }

            UpdateXml();
            return true;
        }
开发者ID:HenryDorsettCase,项目名称:CS5700_-_Object-Oriented_Software_Development,代码行数:17,代码来源:XMLDataSet_Adds.cs


示例17: addGrade

 public bool addGrade(Int32 level)
 {
     trans = session.BeginTransaction();
     try
     {
         Grade g = new Grade();
         g.Dtime = DateTime.Now;
         g.Level = level;
         session.Save(g);
         trans.Commit();
         return true;
     }
     catch (Exception)
     {
         throw new Exception();
     }
 }
开发者ID:kutang,项目名称:mobile,代码行数:17,代码来源:GradeDao.cs


示例18: ProcessRequest

        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "application/json";//

            int Year = Convert.ToInt32(context.Request.QueryString["Year"]);

            try
            {
                Grade grade = new Grade();
                grade.Year = Year;
                grade.Save();
                context.Response.Write("{success:true,msg:'新增成功。',YearId:'" + grade.Id + "'}");
            }
            catch (Exception ex)
            {
                context.Response.Write("{success:false,msg:'" + ex.Message + "'}");
            }
        }
开发者ID:dalinhuang,项目名称:ume-v3,代码行数:18,代码来源:GradeAdd.ashx.cs


示例19: Grade

        public Grade Grade(OnlineExam toBeGradedExam)
        {
            UnitOfWork work = new UnitOfWork();
            Question thE = toBeGradedExam.Questions[0];
            List<Question> theQuestion = work.QuestionRepository.Get(a => a.QuestionID == thE.QuestionID).ToList();
            Question theQuestio = theQuestion[0];

            List<OnlineExam> theExam = work.OnlineExamRepository.Get(a => a.OnlineExamID == theQuestio.OnlineExamID).ToList();
            OnlineExam persistedExam = new OnlineExam();
            persistedExam = theExam[0];
            IList<Question> theQs = new ExamService().GetQuestions(theExam[0]);
            persistedExam.AddQuestion(theQs);

            var grade = new Grade() { Exam = persistedExam };

            foreach (var question in toBeGradedExam.Questions)
            {
                var persistedQuestion = (from q in persistedExam.Questions
                                         where q.QuestionID == question.QuestionID
                                         select q).SingleOrDefault();

                if (persistedQuestion != null)
                {
                    grade.TotalPoints += persistedQuestion.Point;
                    foreach (var choice in question.Choices)
                    {
                        var persistedChoice = (from c in persistedQuestion.Choices
                                               where c.ChoiceID == choice.ChoiceID
                                               select c).SingleOrDefault();

                        // sets the user choice in the actual exam fetched from database!
                        persistedChoice.IsSelected = true;

                       // grade.TotalPoints += persistedQuestion.Point;
                        if (persistedChoice.IsAnswer)
                        {
                            grade.Score += persistedQuestion.Point;
                        }
                    }
                }
            }

            return grade;
        }
开发者ID:kazeemkz,项目名称:silverdale,代码行数:44,代码来源:ExamService.cs


示例20: GasPurchase

 public GasPurchase(
     int id, 
     DateTime when, 
     decimal price, 
     int amount, 
     int distance, 
     Grade grade,
     string note,
     MilageType type = MilageType.LitersPerKm)
 {
     _id = id;
     _type = type;
     _when = when;
     _price = price;
     _amount = amount;
     _distance = distance;
     _grade = grade;
     _note = note;
 }
开发者ID:Petrik7,项目名称:Prototypes,代码行数:19,代码来源:GasPurchase.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Gradient类代码示例发布时间:2022-05-24
下一篇:
C# Grace类代码示例发布时间: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