Beispiel #1
0
 public JsonResult InsertAssetItem(MAssetsItems pObj)
 {
     try
     {
         string _log   = UserLog.MAIL;
         var    _asset = lIMAssetsItems.ToBinding(pObj);
         lIAssetsItems.Insert(_asset, _log);
         return(Json(new
         {
             success = true,
             message = "Add asset successfully save"
         }, JsonRequestBehavior.AllowGet));
     }
     catch (Exception ex)
     {
         return(Json(new
         {
             success = false,
             message = ex.Message
         }, JsonRequestBehavior.AllowGet));
     }
 }
Beispiel #2
0
 public HttpResponseMessage Get(DateTime pTransDate, string pName, string pPosition, string pPrepared, string pFFormat, string pObj)
 {
     try
     {
         lIReports      = new Reports();
         lIMAssetsItems = new MAssetsItems();
         var _asset  = lIMAssetsItems.ToBinding(JsonConvert.DeserializeObject <List <MAssetsItems> >(pObj));
         var _stream = lIReports.RptMR(pTransDate, pName, pPosition, pPrepared, pFFormat, _asset);
         return(ResponseMsg(_stream));
     }
     catch (Exception ex)
     {
         return(Request.CreateErrorResponse(HttpStatusCode.BadRequest, ex.Message));
     }
 }