/// <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; }
public bool InsertNotice(NoticeInfo notice) { return Insert(notice).boolValue; }
public bool RemoveNotice(NoticeInfo notice) { return RemoveNotice(notice); }
public ReturnValueInfo AddNotic(NoticeInfo notic) { throw new NotImplementedException(); }
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; }