Пример #1
0
        public static Commons.FileDetailValidationData GetValidationData(Int32?IdFileDetail)
        {
            Commons.FileDetailValidationData obj = new Commons.FileDetailValidationData();
            using (IndexEntities db = new IndexEntities())
            {
                spg_FileDetailValidationData_Result x = db.spg_FileDetailValidationData(IdFileDetail).FirstOrDefault();
                obj.HasMove   = x.HasMove;
                obj.IdState   = x.IdState;
                obj.StateName = x.StateName;
            }

            return(obj);
        }
Пример #2
0
        public HttpResponseMessage GetValidationData(Int32?IdFileDetail)
        {
            HttpResponseMessage respuesta = null;

            try
            {
                Commons.FileDetailValidationData result = Dal.FileDetail.GetValidationData(IdFileDetail);
                respuesta = Request.CreateResponse(HttpStatusCode.OK, result);
            }
            catch (Exception ex)
            {
                respuesta = Request.CreateErrorResponse(HttpStatusCode.Conflict, (ex.InnerException == null) ? ex.Message : ex.InnerException.Message);
            }
            return(respuesta);
        }