本文整理汇总了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;
}
示例2: AddGrades
public void AddGrades(int grade, string subject)
{
Grade gradeToAdd = new Grade();
gradeToAdd.grade = grade;
gradeToAdd.subject = subject;
this.grades.Add(gradeToAdd);
}
示例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");
}
示例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();
}
示例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);
}
示例6: Edit
public ActionResult Edit(Grade grade)
{
if (ModelState.IsValid)
{
_context.Entry(grade).State = EntityState.Modified;
_context.SaveChanges();
return RedirectToAction("Index");
}
return View(grade);
}
示例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;
}
示例8: Create
public ActionResult Create(Grade grade)
{
if (ModelState.IsValid)
{
_context.Grades.Add(grade);
_context.SaveChanges();
return RedirectToAction("Index");
}
return View(grade);
}
示例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;
}
示例10: IsHonours
public bool IsHonours(Grade value)
{
if (value == Grade.A)
{
return true;
}//end if
else
{
return false;
}//end else
}
示例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++;
}
}
示例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;
}
}
示例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;
}
示例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");
}