本文整理汇总了C#中Grade.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# Grade.ToString方法的具体用法?C# Grade.ToString怎么用?C# Grade.ToString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Grade
的用法示例。
在下文中一共展示了Grade.ToString方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TeaDownSync
//.........这里部分代码省略.........
catalog.OrderNO = catalogs[i].OrderNO;
this.RaiseChanged(string.Format("【开始装载年级[{0}]下科目[{1}]数据..】", grade.GradeName, catalogs[i].CatalogName));
#region 知识要点。
Impl.KnowledgePoint[] points = catalogs[i].Points;
if (points != null && points.Length > 0)
{
this.RaiseChanged(string.Format("【开始装载年级[{0}]下科目[{1}]下知识要点数据..】", grade.GradeName, catalogs[i].CatalogName));
for (int j = 0; j < points.Length; j++)
{
KnowledgePoint point = new KnowledgePoint();
point.PointID = points[j].PointID;
point.PointCode = points[j].PointCode;
point.PointName = points[j].PointName;
point.Description = points[j].Description;
point.OrderNO = points[j].OrderNO;
catalog.Points.Add(point);
}
}
#endregion
g.Catalogs.Add(catalog);
}
}
#endregion
#region 班级。
Impl.Class[] classes = grade.Classes;
if (classes != null && classes.Length > 0)
{
for (int i = 0; i < classes.Length; i++)
{
Class c = new Class();
c.ClassID = classes[i].ClassID;
c.ClassCode = classes[i].ClassCode;
c.ClassName = classes[i].ClassName;
c.OrderNO = classes[i].OrderNO;
this.RaiseChanged(string.Format("【开始装载年级[{0}]下班级[{1}]数据..】", grade.GradeName, classes[i].ClassName));
#region 学生。
Impl.Student[] students = classes[i].Students;
if (students != null && students.Length > 0)
{
for (int k = 0; k < students.Length; k++)
{
Student s = new Student();
s.StudentID = students[k].StudentID;
s.StudentCode = students[k].StudentCode;
s.StudentName = students[k].StudentName;
c.Students.Add(s);
this.RaiseChanged(string.Format("{0}.{1}[{2},{3}]", k + 1, s.StudentName, classes[i].ClassName, grade.GradeName));
}
}
#endregion
g.Classes.Add(c);
}
}
#endregion
sync.School.Teacher.Grades.Add(g);
this.RaiseChanged("【已装载完成年级数据:" + g.ToString() + "】");
}
}
else
this.RaiseChanged("同步年级信息失败!");
#endregion
}
else
this.RaiseChanged("同步教师信息失败!");
#endregion
}
else
this.RaiseChanged("同步学校信息失败!");
#endregion
this.RaiseChanged("【已完成装载数据,保存数据到本地存储...】");
TeaSyncData.Serialize(sync, FolderStructure.UserSyncDataFile(callback.AsyncState.ToString()));
this.RaiseChanged("【完成数据同步!】");
if (complete != null)
complete(null, EventArgs.Empty);
}
else
{
this.RaiseChanged("【数据发生异常:" + result.ResultMessage + "】");
}
}
}), teacherID);
}
catch (Exception e)
{
this.RaiseChanged("【下载同步数据发生异常】" + e.Message);
}
}
}
示例2: ToFileSizeString
public static string ToFileSizeString(this long sizeByte, Grade gradeToConverter = Grade.MB)
{
long convertedSize = sizeByte.ToFileSize(gradeToConverter);
return convertedSize.ToString("0.00") + gradeToConverter.ToString();
}