/// <summary> /// 添加阅览室使用记录 /// </summary> /// <param name="model"></param> /// <returns></returns>] public static bool AddRoomUsageStatistics(RoomUsageStatistics model) { IWCFService.ISeatManageService seatService = WcfAccessProxy.ServiceProxy.CreateChannelSeatManageService(); bool error = false; try { return(seatService.AddRoomUsageStatistics(model)); } catch (Exception ex) { error = true; 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> /// <param name="model"></param> /// <returns></returns> public bool AddRoomUsageStatistics(RoomUsageStatistics model) { try { return(t_sm_RoomUsageStatistics.Add(model) > 0); } catch (Exception ex) { WriteLog.Write("WCF数据服务:执行遇到异常" + ex.Message); throw ex; } }
/// <summary> /// 添加阅览室使用记录 /// </summary> /// <param name="model"></param> /// <returns></returns>] public static bool AddRoomUsageStatistics(RoomUsageStatistics model) { IWCFService.ISeatManageService seatService = new WcfServiceForSeatManage.SeatManageDateService(); bool error = false; try { return(seatService.AddRoomUsageStatistics(model)); } catch (Exception ex) { error = true; WriteLog.Write("添加阅览室使用记录失败:" + ex.Message); return(false); } }