示例#1
0
        /// <summary>
        /// 更新Md5播放列表
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public static Model.Enum.HandleResult UpdateMd5PlayList(AdvertManage.Model.AMS_PlayListMd5Model model)
        {
            IWCFService.IAdvertManageService advertService = WcfAccessProxy.AMS_ServiceProxy.CreateChannelAdvertManageService();
            bool error = false;

            try
            {
                return(advertService.UpdateMd5PlayList(model));
            }
            catch (Exception ex)
            {
                error = true;
                SeatManage.SeatManageComm.WriteLog.Write(string.Format("更新播放列表遇到异常,异常模块:{0};信息:{1}", ex.Source, ex.Message));
                throw ex;
            }
            finally
            {
                ICommunicationObject ICommObjectService = advertService as ICommunicationObject;
                try
                {
                    if (ICommObjectService.State == CommunicationState.Faulted)
                    {
                        ICommObjectService.Abort();
                    }
                    else
                    {
                        ICommObjectService.Close();
                    }
                }
                catch
                {
                    ICommObjectService.Abort();
                }
            }
        }
示例#2
0
 /// <summary>
 /// 获取MD5播放列表
 /// </summary>
 /// <returns></returns>
 public List <Model.AMS_PlayListMd5Model> GetMd5Playlist()
 {
     try
     {
         List <Model.AMS_PlayListMd5Model> modelList = new List <Model.AMS_PlayListMd5Model>();
         DataSet ds = playListDal.GetList(null, null);
         for (int i = 0; i < ds.Tables[0].Rows.Count; i++)
         {
             AdvertManage.Model.AMS_PlayListMd5Model model = AdvertManage.Model.AMS_PlayListMd5Model.Parse(ds.Tables[0].Rows[i]["PlayList"].ToString());
             model.ReleaseDate = DateTime.Parse(ds.Tables[0].Rows[i]["ReleaseDate"].ToString());
             model.Id          = ds.Tables[0].Rows[i]["id"].ToString();
             modelList.Add(model);
         }
         return(modelList);
     }
     catch (Exception ex)
     {
         throw ex;
     }
 }