private string SaveData(string nodeJson, int ptn_pk) { string result = string.Empty; ResponseType ObjResponse = new ResponseType(); try { HIVCE.Common.Entities.TreatmentPreparation treatmentpreparation = SerializerUtil.ConverToObject <HIVCE.Common.Entities.TreatmentPreparation>(nodeJson); BLTreatmentPreparation blTP = new BLTreatmentPreparation(); treatmentpreparation.Ptn_pk = ptn_pk; bool flag = blTP.SaveUpdateTreatmentPreparation(treatmentpreparation); if (flag) { ObjResponse.Success = EnumUtil.GetEnumDescription(Success.True); } else { ObjResponse.Success = EnumUtil.GetEnumDescription(Success.False); } } catch (Exception ex) { ObjResponse.Success = EnumUtil.GetEnumDescription(Success.False); } finally { } result = SerializerUtil.ConverToJson <ResponseType>(ObjResponse); return(result); }
private string GetTreatmentPreparation(int ptn_pk) { string result = string.Empty; try { BLTreatmentPreparation blTP = new BLTreatmentPreparation(); HIVCE.Common.Entities.TreatmentPreparation objTP = blTP.GetTreatmentPreparation(ptn_pk); result = SerializerUtil.ConverToJson <HIVCE.Common.Entities.TreatmentPreparation>(objTP); } catch (Exception ex) { ///CLogger.WriteLog(ELogLevel.ERROR, "GetAnnouncements() exception: " + ex.ToString()); ResponseType response = new ResponseType() { Success = EnumUtil.GetEnumDescription(Success.False) }; result = SerializerUtil.ConverToJson <ResponseType>(response); } finally { } return(result); }