Esempio n. 1
0
 public string Add(Stock model)
 {
     try
     {
         var newmodel = new Stock();
         model.CopyTo(newmodel);
         _app.AddOrUpdate(newmodel);
     }
     catch (Exception ex)
     {
         BjuiResponse.statusCode = "300";
         BjuiResponse.message    = ex.Message;
     }
     return(JsonHelper.Instance.Serialize(BjuiResponse));
 }
Esempio n. 2
0
 public string Add(Stock model)
 {
     try
     {
         var newmodel = new Stock();
         model.CopyTo(newmodel);
         _app.AddOrUpdate(newmodel);
     }
     catch (Exception ex)
     {
         Result.Status  = false;
         Result.Message = ex.Message;
     }
     return(JsonHelper.Instance.Serialize(Result));
 }