////////////////////////////////////////////////////////////////////////////////
 ///////////////////MESSAGES SERVICES../////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////////////////
 public JsonResult PostMessage(int EncounterID, int CreatedUserID, string MessageDescription)
 {
     string meg = "";
     try
     {
         Encounter_Messages enc = new Encounter_Messages();
         enc.Message_Desc = MessageDescription;
         enc.Created_Date = DateTime.Now;
         enc.Encounter_ID = EncounterID;
         int UserID = CreatedUserID;
         enc.Posted_By = UserID;
         enc.Status_ID = 8;
         enc.Modified_Date = null;
         objDBContext.Enc_Msg.Add(enc);
         objDBContext.SaveChanges();
         meg = "Success";
     }
     catch (Exception ex)
     {
         meg = "Failed";
         meg = ex.Message;
     }
     return Json(new { result = meg }, JsonRequestBehavior.AllowGet);
 }
 public ActionResult SaveMessage(int Encounter_ID, string Message_Desc)
 {
     Encounter_Messages enc = new Encounter_Messages();
      enc.Message_Desc = Message_Desc;
      enc.Created_Date = DateTime.Now;
      enc.Encounter_ID = Encounter_ID;
      int UserID =Convert.ToInt32(Session["sesuserid"]);
      enc.Posted_By = UserID;
      enc.Status_ID = 8;
      enc.Modified_Date = null;
      db.Enc_Msg.Add(enc);
      db.SaveChanges();
      return Json("Success");
 }