Ejemplo n.º 1
0
 public void ResetToMap(string key = "", int customerID = 0, int partID = 0)
 {
     try {
         CustomerPricing pricing = new CustomerPricing {
             cust_id = customerID,
             partID = partID
         };
         Response.ContentType = "application/json";
         Response.Write(JsonConvert.SerializeObject(pricing.SetToMap(key)));
     } catch (Exception e) {
         Response.StatusCode = (int)System.Net.HttpStatusCode.BadRequest;
         Response.StatusDescription = e.Message;
         Response.ContentType = "application/json";
         Response.Write(JsonConvert.SerializeObject(e.Message + e.StackTrace, Formatting.Indented));
         Response.End();
     }
 }