Ejemplo n.º 1
0
 /********* Customer Interaction *********/
 public void GetPricing(int customerID = 0, string key = "")
 {
     try {
         CustomerPricing pricing = new CustomerPricing { cust_id = customerID };
         Response.ContentType = "application/json";
         Response.Write(JsonConvert.SerializeObject(pricing.GetAll(key)));
         Response.End();
     } catch (Exception e) {
         Response.StatusCode = (int)System.Net.HttpStatusCode.InternalServerError;
         Response.StatusDescription = e.Message;
         Response.ContentType = "application/json";
         Response.Write(JsonConvert.SerializeObject(e.Message, Formatting.Indented));
         Response.End();
     }
 }