Beispiel #1
0
        /// <summary>
        /// 增加一條通知內容
        /// </summary>
        /// <param name="notic"></param>
        /// <returns></returns>
        public ReturnValueInfo AddNotic(NoticeInfo noticInfo)
        {
            throw new NotImplementedException();
            //ReturnValueInfo returnValue = new Common.Entity.ReturnValueInfo();

            //returnValue.boolValue = inda.InsertNotice(noticInfo);
            //return returnValue;
        }
Beispiel #2
0
 public bool InsertNotice(NoticeInfo notice)
 {
     return Insert(notice).boolValue;
 }
Beispiel #3
0
 public bool RemoveNotice(NoticeInfo notice)
 {
     return RemoveNotice(notice);
 }
Beispiel #4
0
 public ReturnValueInfo AddNotic(NoticeInfo notic)
 {
     throw new NotImplementedException();
 }
Beispiel #5
0
        public List<NoticeInfo> GetNoticeInfoList(string machineID,DateTime nowTime)
        {
            List<NoticeInfo> infoList = new List<NoticeInfo>();
            try
            {
                using (MainDBDataContext db = new MainDBDataContext())
                {
                    var ret = from not in db.NoticeManage_not
                              join nol in db.NoticeList_nol
                              on not.not_RecordID equals nol.nol_NOTID
                              where (nol.nol_iMMTID == machineID) &&
                                    (nol.nol_dStartDate <= nowTime) &&
                                    (nol.nol_dEndData >= nowTime) &&
                                    (not.not_lValid == true)
                              select new
                              {
                                    ID= nol.nol_iRecordID,
                                    Content = not.not_cContent,
                                    StartDate = nol.nol_dStartDate,
                                    EndDate = nol.nol_dEndData,
                                    //Valid = not.not_lValid,
                                    //Sync = not.not_lSync,
                                    ScrollSpeed = not.not_iScrollSpeed
                              };

                    foreach (var item in ret)
                    {
                        NoticeInfo info = new NoticeInfo();
                        info.RecordID = item.ID;
                        info.Content = item.Content;
                        info.EndDate = (DateTime)item.EndDate;
                        info.ScrollSpeed = item.ScrollSpeed;
                        info.StartDate = (DateTime)item.StartDate;
                        //info.Sync = item.Sync;
                        //info.Valid = item.Valid;

                        infoList.Add(info);
                    }
                }
            }
            catch
            {

            }
            return infoList;
        }