static void Main(string[] args) { Console.WriteLine("Enter faculty number: "); String facultyNumber = Console.ReadLine(); StudentData.CreateReferences(@"C:\Users\Elly\IdeaProjects\TU_C_Sharp\UniversitySystem\StudentRepository\ReferenceLog.txt", facultyNumber); /*DateTime date = new DateTime(2017, 9, 15, 10, 30, 0); * Console.WriteLine("Year: "+date.Year); * Console.WriteLine("Day: "+date.Day); * Console.WriteLine("Hour: "+date.Hour); * Console.WriteLine("Now: "+DateTime.Now.Hour); * Console.WriteLine("Today: "+DateTime.Today); * //Date in 12 Hours: * Console.WriteLine("Date in 12 Hours: "+DateTime.Now.AddHours(12)); * Console.WriteLine("Enter Year: "); * int year = int.Parse(Console.ReadLine()); * Console.WriteLine("Enter Month: "); * int month = int.Parse(Console.ReadLine()); * Console.WriteLine("Enter Day: "); * int day = int.Parse(Console.ReadLine()); * DateTime Date = new DateTime(year, month, day); * Console.WriteLine(Date);*/ Console.ReadLine(); }
static void Main(string[] args) { Console.Write("Enter fac number: "); string facNumber = Console.ReadLine(); StudentData.AddSomeStudents(); StudentData.SaveCertificate(facNumber); }
public static Student GetStudentDataByUser(User u) { if (u.fNumber == 0 || StudentData.GetStudent(u.fNumber) == null) { Console.WriteLine("Не е открит такъв студент."); return(null); } return(StudentData.GetStudent(u.fNumber)); }
public Student GetStudentDataByUser(User user) { Student student = StudentData.IsThereStudent(user.facultyNumber); if (student == null) { throw new NoStudentFoundException(user.facultyNumber); } return(student); }
public Student GetStudentDataByUser(User user) { if (user.number == null || StudentData.GetStudent(user.number) == null) { throw new Exception(); } else { return(StudentData.GetStudent(user.number)); } }
public static Student GetStudentDataByUser(User user) { Student student = StudentData.FindStudentByFacultyNumber(user.facultyNumber); if (user.facultyNumber == null || student == null) { Console.WriteLine("There is no student with this user's faculty number"); return(null); } return(student); }
static void Main(string[] args) { Console.WriteLine("Enter faculty number"); string fn = Console.ReadLine(); if (StudentData.IsThereStudent(fn)) { Student student = StudentData.TestStudents.Where(s => s.FacultyNumber == fn).First(); string certificate = StudentData.PrepareCertificate(student); StudentData.SaveCertificate(certificate, student.Firstname + " " + student.Lastname + " " + student.FacultyNumber + ".txt"); } }
static void Main(string[] args) { // The code provided will print ‘Hello World’ to the console. // Press Ctrl+F5 (or go to Debug > Start Without Debugging) to run your app. //Console.WriteLine("Hello World!"); //Console.ReadKey(); // Go to http://aka.ms/dotnet-get-started-console to continue learning how to build a console app! StudentData.PrepareCertificate(); Console.ReadKey(); }
public static Student GetStudentDataByUser(User user) { if (user.facNumber == null) { Student s = StudentData.IsThereStudent(user.facNumber); if (s != null) { return(s); } } System.Console.WriteLine("No Student found for the user"); return(null); }
static void Main(string[] args) { StudentData.InitTestStudents(); Console.Write("Enter fac number: "); string facNumber = Console.ReadLine(); Student student = StudentData.IsThereStudent(facNumber); string cert = StudentData.PrepareCertificate(student); Console.WriteLine(cert); StudentData.SaveCertificate(cert); }
static void Main(string[] args) { Console.WriteLine("Enter faculty number"); String fNumber = Console.ReadLine(); Console.WriteLine("Enter file name number"); String fileName = Console.ReadLine(); String certificate = StudentData.PrepareCertificate(fNumber); Console.WriteLine(certificate); StudentData.SaveCertificate(certificate, fileName); Console.ReadLine(); }
public static Student GetStudentDataByUser(User user) { if (user == null || user.FakNum == null) { Console.WriteLine("No such student!"); return(null); } Student student = StudentData.foundStudentByNumber(user.FakNum); if (student == null) { Console.WriteLine("No such student!"); return(null); } return(student); }
public static void Main(string[] args) { StudentData obj = new StudentData(); obj.DataFill(); Console.WriteLine("Enter FNumber: "); String fakultetennomer = Console.ReadLine(); Student T = StudentData.IsThereStudent(fakultetennomer); Console.WriteLine(T); Console.Write("Press any key to continue . . . "); Console.ReadKey(true); }
static void Main(string[] args) { String fnom; String cer; Student stud; StudentData.addTestStudents(); Console.WriteLine("StudentRepository"); Console.WriteLine("F.Nom to print"); fnom = Console.ReadLine(); stud = StudentData.IsThereStudent(fnom); cer = StudentData.PrepareCertificate(ref stud); Console.WriteLine(cer); StudentData.SaveCertificate(cer); }
static void Main(string[] args) { Console.OutputEncoding = Encoding.UTF8; Console.WriteLine("Моля, въведете факултетен номер: "); int fN = int.Parse(Console.ReadLine()); string c = StudentData.PrepareCertificate(fN); if (c != null) { Console.WriteLine(c); Console.WriteLine("Моля, въведете директория, в която да запишете сертификата: "); string fL = Console.ReadLine(); StudentData.WriteCertificate(c, fL); } }
static void Main(string[] args) { Console.Write("Enter faculty number: "); string facultyNumber = Console.ReadLine(); Student student = StudentData.FindStudentByFacultyNumber(facultyNumber); if (student != null) { Console.WriteLine(student); } else { Console.WriteLine("There is no student with this faculty number. "); } Console.ReadKey(); }
static void Main(string[] args) { string facultyNum; StudentData.InitTestStudents(); Console.WriteLine("Search user by faculty num"); facultyNum = Console.ReadLine(); Student studentMatching = StudentData.IsThereStudent(facultyNum); if (studentMatching != null) { File.AppendAllText("../../testFacultyNumber.txt", studentMatching.ToString()); } else { Console.WriteLine("No matching student"); } }
static void Main(string[] args) { StudentData data = new StudentData(); Console.WriteLine("Enter faculty number:"); string facNumber = Console.ReadLine(); var result = data.IsThereStudent(facNumber); if (result != null) { Console.WriteLine(result.FirstName); Console.WriteLine(result.LastName); Console.WriteLine(result.Course); } else { Console.WriteLine("No such user"); } }
public Student GetStudentDataByUser(User u) { Student st = null; if (u.FakNum != null) { long fakNum = long.Parse(u.FakNum); st = StudentData.isThereSudent(fakNum); if (st == null) { Console.WriteLine("Студент с такъв факултетен номер не беше намерен!"); } } else { Console.WriteLine("В подадения от Вас потребител не присъстваше факултетен номер, чрез който да намерите студент!"); } return(st); }
public static void Main(string[] args) { long fakultetenN; Console.Write("Моля въведете факултетен номер: "); String fakNum = Console.ReadLine(); fakultetenN = long.Parse(fakNum); String uverenie = StudentData.prepareSertificate(fakultetenN); Console.WriteLine("\n\nУверение: "); Console.WriteLine(uverenie); Console.WriteLine("\nМоля, натиснете произволен клавиш, за да запазите документа на Вашия компютър! "); Console.ReadLine(); StudentData.SaveCertificate(uverenie, "C:/Users/yovo_user/Desktop/uverenie.txt"); Console.WriteLine("Документът е запазен успешно!\n"); Console.ReadLine(); }
public Student GetStudentDataByUser(User user) { return(StudentData.GetStudent(user.FacNumber)); }