/// <summary>
 /// 修改移动客户端设置
 /// </summary>
 /// <returns></returns>
 public static bool SaveMoveWebAppSetting(MoveWebAppSetting model)
 {
     IWCFService.ISeatManageService seatService = WcfAccessProxy.ServiceProxy.CreateChannelSeatManageService();
     try
     {
         return(seatService.SaveMoveWebAppSetting(model));
     }
     catch (Exception ex)
     {
         SeatManageComm.WriteLog.Write("保存移动客户端设置失败:" + ex.Message);
         return(false);
     }
     finally
     {
         ICommunicationObject ICommObjectService = seatService as ICommunicationObject;
         try
         {
             if (ICommObjectService.State == CommunicationState.Faulted)
             {
                 ICommObjectService.Abort();
             }
             else
             {
                 ICommObjectService.Close();
             }
         }
         catch
         {
             ICommObjectService.Abort();
         }
     }
 }
 /// <summary>
 /// 修改移动客户端设置
 /// </summary>
 /// <returns></returns>
 public static bool SaveMoveWebAppSetting(MoveWebAppSetting model)
 {
     IWCFService.ISeatManageService seatService = new WcfServiceForSeatManage.SeatManageDateService();
     try
     {
         return(seatService.SaveMoveWebAppSetting(model));
     }
     catch (Exception ex)
     {
         SeatManageComm.WriteLog.Write("保存移动客户端设置失败:" + ex.Message);
         return(false);
     }
 }
 /// <summary>
 /// 获取移动管理平台的配置
 /// </summary>
 /// <returns></returns>
 public MoveWebAppSetting GetMoveWebAppSetting()
 {
     try
     {
         DataSet ds = t_sm_service.GetList(" ServiceSetID = 10", null);
         if (ds.Tables[0].Rows.Count > 0)
         {
             MoveWebAppSetting model = new MoveWebAppSetting();
             return(model.ToModel(ds.Tables[0].Rows[0]["ServiceSet"].ToString()));
         }
         else
         {
             return(null);
         }
     }
     catch
     {
         throw;
     }
 }
 /// <summary>
 /// 保存移动管理平台配置
 /// </summary>
 /// <returns></returns>
 public bool SaveMoveWebAppSetting(MoveWebAppSetting model)
 {
     try
     {
         string  strSet = model.ToString();
         DataSet ds     = t_sm_service.GetList(" ServiceSetID = 10", null);
         if (ds.Tables[0].Rows.Count > 0)
         {
             SqlParameter[] parameters =
             {
                 new SqlParameter("@ServiceSet",   SqlDbType.Text),
                 new SqlParameter("@ServiceSetID", SqlDbType.Int, 4)
             };
             parameters[0].Value = strSet;
             parameters[1].Value = 8;
             return(t_sm_service.Update(strSet, parameters));
         }
         else
         {
             SqlParameter[] parameters =
             {
                 new SqlParameter("@ServiceSet",   SqlDbType.Text),
                 new SqlParameter("@SetName",      SqlDbType.NVarChar,20),
                 new SqlParameter("@ServiceSetID", SqlDbType.Int, 4)
             };
             parameters[0].Value = strSet;
             parameters[1].Value = "移动客户端设置";
             parameters[2].Value = 8;
             return(t_sm_service.Add(strSet, parameters));
         }
     }
     catch
     {
         throw;
     }
 }