public PublicDate(ExamDate date) { From = date.From; To = date.To; Room = ""; Instructor = date.Instructor; }
public override string ToString() { //string questionsDetails=""; //foreach (var item in Questions) // questionsDetails += item.ToString(); return("Exam date: " + ExamDate.ToString() + "\nStudent: " + StudentId + "\nCorrect Implementations: " + ImplementationsWithoutErrors + "\nQuestions details:\n---------------------" + Questions.ToString()); }
private void LoadFromModel(ExamDate model) { SessionId = model.SessionId; Duration = model.Duration; SittingDate = model.SittingDate; if (model.Session != null) { Session = new ExamSessionModel(model.Session); } }
protected void Page_Load(object sender, EventArgs e) { tbscore = "{" + "\"DataInfo\": [" + "{" + "\"ExamCategory\": \"C1\"," + "\"Egroup\": \"AAA\"," + "\"Ename\": \"dennis\"," + "\"Emobile\": \"0919xxxx\"," + "\"EScore\": \"100\"," + "\"CreateDate\": \"2017/03/17 00:00:00\"" + "}," + "{" + "\"ExamCategory\": \"C212\"," + "\"Egroup\": \"BBB\"," + "\"Ename\": \"mary\"," + "\"Emobile\": \"0928xxxx\"," + "\"EScore\": \"90\"," + "\"CreateDate\": \"2017/03/16 00:00:00\"" + "}" + "]" + "}"; PageData PageData = new PageData(); DataTable dt = score.QueryAllUserScore(); if (dt != null && dt.Rows.Count > 0) { foreach (DataRow dr in dt.Rows) { ScoreData ScoreData = new ScoreData(); ScoreData.USID = dr["USID"].ToString(); ScoreData.ExamCategory = dr["ExamCategory"].ToString(); ScoreData.Egroup = dr["Egroup"].ToString(); ScoreData.Ename = dr["Ename"].ToString(); ScoreData.Emobile = dr["Emobile"].ToString(); ScoreData.EScore = dr["EScore"].ToString(); ScoreData.CreateDate = dr["CreateDate"].ToString(); PageData.DataInfo.Add(ScoreData); } } #region 取得考試日期 DataTable dtexamdate = score.Getexamdate(); if (dtexamdate != null && dtexamdate.Rows.Count > 0) { foreach (DataRow dr in dtexamdate.Rows) { ExamDate ExamDate = new ExamDate(); ExamDate.Edate = dr["CreateDate"].ToString(); PageData.ExamDate.Add(ExamDate); } } #endregion tbscore = JsonConvert.SerializeObject(PageData); //Response.Write(JsonConvert.SerializeObject(PageData)); }
public ExamDateModel(ExamDate model) : base(model) { LoadFromModel(model); }
//Переопределенная(Override) версия виртуального метода string ToString(): public override string ToString() { return($"Предмет: {SubjectName}\nОценка: {Mark}\nДата провидения: {ExamDate.ToShortDateString()}\n"); }
// Methods public override string ToString() { return("\nSubject: " + Subject + "\nMark: " + Mark + "\nExam Date: " + ExamDate.ToShortDateString()); }