Пример #1
0
 public ResponseFuncGet FuncGet([FromBody] RequestFuncGet request)
 {
     try
     {
         FunctionBLL bll = new FunctionBLL();
         return(bll.FuncGet(request));
     }
     catch (Exception ex)
     {
         throw new HttpResponseException(
                   Request.CreateErrorResponse(HttpStatusCode.InternalServerError, ex.Message));
     }
 }
Пример #2
0
        public ResponseFuncGet FuncGet(RequestFuncGet request)
        {
            ResponseFuncGet response = new ResponseFuncGet();

            using (cnn = GetConnection())
            {
                try
                {
                    var user = cnn.QuerySingle <TKS_FAS_Function>("select * from tks_fas_function where id=@Id", new
                    {
                        Id = request.Data.Id
                    });

                    response.IsSuccess = true;
                    response.Message   = "加载完毕";
                    response.Data      = user;
                    return(response);
                }
                catch (Exception ex)
                {
                    return(this.DealException(response, ex) as ResponseFuncGet);
                }
            }
        }