Exemplo n.º 1
0
        /// <summary>
        /// 取得更新的log字串
        /// </summary>
        /// <param name="recUid"></param>
        /// <param name="studentNumber"></param>
        /// <returns></returns>
        public string ComposeUpdateLogString(ClubScorePair pair, string studentNumber)
        {
            //檢查與確認資料是否被修改
            StringBuilder sb = new StringBuilder();

            sb.Append(Global._ColScholYear).Append("「").Append(pair._NewRec.SchoolYear).Append("」");
            sb.Append(Global._ColSemester).Append("「").Append(pair._NewRec.Semester).Append("」");
            sb.Append(Global._ColClubName).Append("「").Append(pair._NewRec.ClubName).Append("」");
            sb.Append(Global.NewLine);

            sb.Append(Global._ColStudentNumber).Append("「").Append(studentNumber).Append("」");
            sb.Append(Global.NewLine);


            if (pair._OldRec.ResultScore != pair._NewRec.ResultScore)
            {
                sb.AppendLine(ByOne(Global._ColClubScore, pair._OldRec.ResultScore, pair._NewRec.ResultScore));
            }

            if (pair._OldRec.CadreName != pair._NewRec.CadreName)
            {
                sb.AppendLine(ByOne(Global._ColCadreName, pair._OldRec.CadreName, pair._NewRec.CadreName));
            }

            return(sb.ToString());
        }
        /// <summary>
        /// 取得更新的log字串
        /// </summary>
        /// <param name="recUid"></param>
        /// <param name="studentNumber"></param>
        /// <returns></returns>
        public string ComposeUpdateLogString(ClubScorePair pair, string studentNumber)
        {
            //檢查與確認資料是否被修改
            StringBuilder sb = new StringBuilder();

            sb.Append(Global._ColScholYear).Append("「").Append(pair._NewRec.SchoolYear).Append("」");
            sb.Append(Global._ColSemester).Append("「").Append(pair._NewRec.Semester).Append("」");
            sb.Append(Global._ColClubName).Append("「").Append(pair._NewRec.ClubName).Append("」");
            sb.Append(Global.NewLine);

            sb.Append(Global._ColStudentNumber).Append("「").Append(studentNumber).Append("」");
            sb.Append(Global.NewLine);


            if (pair._OldRec.ResultScore != pair._NewRec.ResultScore)
                sb.AppendLine(ByOne(Global._ColClubScore, pair._OldRec.ResultScore, pair._NewRec.ResultScore));

            if (pair._OldRec.CadreName != pair._NewRec.CadreName)
                sb.AppendLine(ByOne(Global._ColCadreName, pair._OldRec.CadreName, pair._NewRec.CadreName));
            
            return sb.ToString();
            
        }