コード例 #1
0
ファイル: PublicDate.cs プロジェクト: PaulaUpb/ProjectPaula
 public PublicDate(ExamDate date)
 {
     From       = date.From;
     To         = date.To;
     Room       = "";
     Instructor = date.Instructor;
 }
コード例 #2
0
        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());
        }
コード例 #3
0
        private void LoadFromModel(ExamDate model)
        {
            SessionId   = model.SessionId;
            Duration    = model.Duration;
            SittingDate = model.SittingDate;

            if (model.Session != null)
            {
                Session = new ExamSessionModel(model.Session);
            }
        }
コード例 #4
0
        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));
        }
コード例 #5
0
 public ExamDateModel(ExamDate model) : base(model)
 {
     LoadFromModel(model);
 }
コード例 #6
0
ファイル: Exam.cs プロジェクト: BenAvleck/CSharp-2
 //Переопределенная(Override) версия виртуального метода string ToString():
 public override string ToString()
 {
     return($"Предмет: {SubjectName}\nОценка: {Mark}\nДата провидения: {ExamDate.ToShortDateString()}\n");
 }
コード例 #7
0
ファイル: Exam.cs プロジェクト: joeyave/cs-university-app
 // Methods
 public override string ToString()
 {
     return("\nSubject: " + Subject +
            "\nMark: " + Mark +
            "\nExam Date: " + ExamDate.ToShortDateString());
 }