示例#1
0
 public ResultInfo.Result SubmitInput(Guid endPointKeyPass, string value, DateTime?execTime)
 {
     ResultInfo.Result result = Result.GenerateFailedResult();
     try
     {
         //if (!execTime.HasValue)
         //{
         //    List<Endpoint> ends = db.Endpoints.Include("Device").Where(e => e.GUID == endPointKeyPass).ToList();
         //    if (ends.Count > 0)
         //    {
         //        execTime = DateTime.UtcNow.AddHours(ends[0].Device.UTC_Diff);
         //    }
         //    else
         //    {//endPointKeyPass not Exist
         //        result = Result.GenerateFailedResult("EndPoint KeyPass not Exist");
         //    }
         //}
         db.SubmitEndPointInput(endPointKeyPass, value, execTime);
         result = Result.GenerateOKResult();
     }
     catch (Exception ex)
     {
         result.Message = ex.InnerException.ToString();
     }
     return(result);
 }