示例#1
0
 public CommonResult <List <VDeviceInfo> > GetVDeviceInfoPagedList(string sessionId, Tuple <string, List <object> > tFilter, int PageSize, int CurrPage)
 {
     try
     {
         return(ForDeviceServices.GetInstance(sessionId).GetVDeviceInfoPagedList(tFilter, PageSize, CurrPage));
     }
     catch (Exception ex)
     {
         throw new FaultException <CustomFaultMessage>(new CustomFaultMessage()
         {
             ErrorCode  = ex.HResult,
             Message    = ex.Message,
             StackTrace = ex.StackTrace
         }, ex.Message);
     }
 }
示例#2
0
 public Server.Utility.CommonResult <List <DeviceParameter> > GetDevParByCodePaging(string sessionId, int PageSize, int CurrPage, ref int TotalNum, string strCode)
 {
     try
     {
         return(ForDeviceServices.GetInstance(sessionId).GetDevParByCodePaging(PageSize, CurrPage, ref TotalNum, strCode));
     }
     catch (Exception ex)
     {
         throw new FaultException <CustomFaultMessage>(new CustomFaultMessage()
         {
             ErrorCode  = ex.HResult,
             Message    = ex.Message,
             StackTrace = ex.StackTrace
         }, ex.Message);
     }
 }
示例#3
0
 public Server.Utility.CommonResult <Device> UpdateDevice(string sessionId, Device model)
 {
     try
     {
         return(ForDeviceServices.GetInstance(sessionId).UpdateDevice(model));
     }
     catch (Exception ex)
     {
         throw new FaultException <CustomFaultMessage>(new CustomFaultMessage()
         {
             ErrorCode  = ex.HResult,
             Message    = ex.Message,
             StackTrace = ex.StackTrace
         }, ex.Message);
     }
 }
示例#4
0
 public Server.Utility.CommonResult <bool> DelDeviceByCode(string sessionId, string strCode)
 {
     try
     {
         return(ForDeviceServices.GetInstance(sessionId).DelDeviceByCode(strCode));
     }
     catch (Exception ex)
     {
         throw new FaultException <CustomFaultMessage>(new CustomFaultMessage()
         {
             ErrorCode  = ex.HResult,
             Message    = ex.Message,
             StackTrace = ex.StackTrace
         }, ex.Message);
     }
 }
示例#5
0
 public Server.Utility.CommonResult <List <DeviceClass> > GetDeviceClassList(string sessionId)
 {
     try
     {
         var       result = new Server.Utility.CommonResult <List <DeviceClass> >();
         Stopwatch ww     = new Stopwatch();
         ww.Start();
         result = ForDeviceServices.GetInstance(sessionId).GetDeviceClassList();
         ww.Stop();
         long l = ww.ElapsedMilliseconds;
         Utils.Logger.Debug("时长:" + l.ToString());
         return(result);
     }
     catch (Exception ex)
     {
         throw new FaultException <CustomFaultMessage>(new CustomFaultMessage()
         {
             ErrorCode  = ex.HResult,
             Message    = ex.Message,
             StackTrace = ex.StackTrace
         }, ex.Message);
     }
 }