public IHttpActionResult GetPatientPeriodentalChart(int periodentalChartId, long dentalAdultMainId, long?patientId) { try { perioDentalChart = new PatientPerioDentalChart(); var result = perioDentalChart.GetPatientPeriodentalChart(periodentalChartId, dentalAdultMainId, patientId); return(Ok(result)); } catch (Exception ex) { throw; } }
public IHttpActionResult SavePeriodentalChart(dynamic obj) { try { perioDentalChart = new PatientPerioDentalChart(); dynamic data = obj; perioDentalChart.PeriodontalChartId = Convert.ToInt32(JsonConvert.DeserializeObject(data["periodentalChartId"].ToString()));//((Newtonsoft.Json.Linq.JObject)data).ChildrenTokens[0] perioDentalChart.DentalAdultMainId = Convert.ToInt64(JsonConvert.DeserializeObject(data["dentalAdultMainId"].ToString())); perioDentalChart.PatientId = JsonConvert.DeserializeObject(data["patientId"].ToString()) == 0 ? null : Convert.ToInt64(JsonConvert.DeserializeObject(data["patientId"].ToString())); perioDentalChart.JsonObject = Convert.ToString(JsonConvert.DeserializeObject(data["jsonObject"].ToString())); perioDentalChart.UpdatedBy = Convert.ToInt64(JsonConvert.DeserializeObject(data["updatedBy"].ToString())); var result = perioDentalChart.SavePeriodentalChart(); if (result == null) { return(NotFound()); } return(Ok(result)); } catch (Exception ex) { throw; } }