Пример #1
0
    private GetPointFileInfoResp GetPointFileInfo()
    {
        #region GetPointFileInfo

        GetPointFileInfoReq  req  = new GetPointFileInfoReq();
        GetPointFileInfoResp resp = new GetPointFileInfoResp();

        try
        {
            ServiceManager sm = new ServiceManager();
            using (LP2ServiceClient service = sm.StartServiceClient())
            {
                req.FileId = iFileID;
                req.hdr    = new ReqHdr()
                {
                    UserId = loginUser.iUserID
                };

                resp = service.GetPointFileInfo(req);

                if (resp == null)
                {
                    return(new GetPointFileInfoResp());
                }

                return(resp);
            }
        }
        catch (System.ServiceModel.EndpointNotFoundException)
        {
            string sExMsg = string.Format("reason: Point Manager is not running.");
            LPLog.LogMessage(LogType.Logerror, sExMsg);

            return(new GetPointFileInfoResp());
        }
        catch (Exception ex)
        {
            string sExMsg = string.Format("error: {0}", ex.Message);
            LPLog.LogMessage(LogType.Logerror, sExMsg);
            return(new GetPointFileInfoResp());
        }

        #endregion
    }