public JsonResult GetActivityById(string ActivityId)
 {
     try
     {
         BCBSClient client = new BCBSClient();
         string result = client.GetActivityById(Convert.ToInt64(ActivityId));
         //List<ContractModel> ContractList = JsonConvert.DeserializeObject<List<ContractModel>>(result);
         ActivityModel activity = JsonConvert.DeserializeObject<ActivityModel>(result);
         return Json(activity, JsonRequestBehavior.AllowGet);
     }
     catch (Exception ex)
     {
         return Json(ex.Message, JsonRequestBehavior.AllowGet);
     }
 }
        public ActionResult EditActivity(string Id)
        {
            BCBSClient client = new BCBSClient();
            ActivityModel activity = new ActivityModel();
            if (!string.IsNullOrEmpty(Id))
            {
                if (Convert.ToInt64(Id) > 0)
                {
                    string ActivityData = client.GetActivityById(Convert.ToInt64(Id));
                    if (!string.IsNullOrEmpty(ActivityData))
                    {
                        activity = JsonConvert.DeserializeObject<ActivityModel>(ActivityData);
                        ViewBag.AvailableBalance = client.GetContractAvailableBalance(activity.ContractId);
                    }
                    else
                    {
                        TempData["Error"] = "Requested Activity not available!!";
                        return RedirectToAction("Index", "Contract");
                    }
                }
                else
                {
                    TempData["Error"] = "Requested Activity not available!!";
                    return RedirectToAction("Index", "Contract");

                }
            }
            else
            {
                TempData["Error"] = "Requested Activity not available!!";
                return RedirectToAction("Index", "Contract");
            }
            return View(activity);
        }