public object Put(QuoteOfferDetail model) { object json; try { model = repository.Update(model); json = new { total = 1, data = model, success = true }; } catch (Exception ex) { LogManager.Write("ERROR:" + Environment.NewLine + "\tMETHOD = " + this.GetType().FullName + "." + MethodBase.GetCurrentMethod().Name + Environment.NewLine + "\tMESSAGE = " + ex.Message); json = new { message = ex.Message, success = false }; }; return(json); }
public object Delete(QuoteOfferDetail model) { object json; try { bool result = repository.Remove(model); json = new { success = result }; } catch (Exception ex) { json = new { success = false, message = ex.Message }; } return(json); }