public ActionResult AddText(DiaryText DiaryText, int id)
        {
            iDiary iDiary = new iDiary();

            try
            {
                DiaryText.LeadTypeID = iDiary.GetLeadTypeIDbyLeadID(DiaryText.LeadTypeID);
                DiaryText.AddDiaryText();
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return Redirect(Request.UrlReferrer.ToString());
        }
        public ActionResult GetDiaryTexts(int ID, int LeadID)
        {
            iDiary Diary = new iDiary();
            try
            {
                int LeadTypeID = Diary.GetLeadTypeIDbyLeadID(LeadID);
                Diary.GetAllDiaryTexts(ID, LeadTypeID);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return Json(Diary.DiaryTexts.AllDiaryTexts.ToArray(), JsonRequestBehavior.AllowGet);
        }