コード例 #1
0
 public HttpResponseMessage GetProductPrice(string productId, string IOCodeId)
 {
     try
     {
         CatProductPriceDT priceDT = new CatProductPriceDT();
         DataTable         dt      = priceDT.GetByCond("ProductID=" + productId + " AND IOCodeID =" + IOCodeId);
         return(Request.CreateResponse <string>(HttpStatusCode.OK, JsonConvert.SerializeObject(dt)));
     }
     catch (Exception e)
     {
         ExceptionHandler.Log(e);
         return(null);
     }
 }
コード例 #2
0
 public CatProductPriceRule IsExits(string cond, string message)
 {
     try
     {
         DataTable dt = dta.GetByCond(cond);
         if (dt != null && dt.Rows.Count > 0)
         {
             IsPassed    = false;
             ErrMessage += message;
         }
         return(this);
     }
     catch (Exception e)
     {
         IsPassed = false;
         throw e;
     }
 }