public override string ToString() { StringBuilder result = new StringBuilder(); result.Append(Id.ToString()); result.Append("|"); result.Append(CourseCode.ToString()); result.Append("|"); result.Append(CourseName.ToString()); result.Append("|"); result.Append(Ects.ToString()); result.Append("|"); result.Append(CourseType.ToString()); result.Append("|"); result.Append(Zzu.ToString()); result.Append("|"); result.Append(SemesterNumber.ToString()); result.Append("|"); result.Append(StudyPlanID.ToString()); result.Append("|"); result.Append(CoursesGroupID.ToString()); result.Append("|"); result.Append(IsCoursesGroup.ToString()); return(result.ToString()); }
private static void fieldOfStudyType(Document doc, CourseType Type) { doc.Add(new Paragraph("Forma Studiów: ".ToUpper()) .Add(new Paragraph(EnumTranslator.Translate(Type.ToString())) .SetTextAlignment(iText.Layout.Properties.TextAlignment.RIGHT)) .SetFixedLeading(0.5f)); }
public static CourseBuilder Build(CourseType courseType, Provider withProvider = null) { var result = new CourseBuilder() .WithCode(courseType.ToString()) .WithProvider(withProvider) .AddCourseSite(courseType); return(result); }
/// <summary> /// 通过反射获取CourseType上的注解 /// </summary> /// <param name="course"></param> /// <returns></returns> public static String GetInfo(CourseType course) { Type type = typeof(CourseType); foreach (MemberInfo mInfo in type.GetMembers()) { if (mInfo.Name.Equals(course.ToString())) { foreach (Attribute attr in Attribute.GetCustomAttributes(mInfo)) { if (attr.GetType() == typeof(DescriptionAttribute)) { //Console.WriteLine(((DescriptionAttribute)attr).Description); return(((DescriptionAttribute)attr).Description); } } } } return(null); }
public override string ToString() { return(String.Format($"{FirstName} {LastName} subject {_subject.ToString()}")); }