public JsonResult UpdateTransaction(int Id, string Description, decimal Amount)
 {
     var trans = new Transaction(Id);
     trans.Comment = Description;
     if (Description.ToLower().IndexOf("cheque") > -1)
     {
         trans.Cheque = Amount;
     }
     trans.Amount = Amount;
     trans.Save();
     return Json(new
     {
         Status = 1
     });
 }
        public JsonResult ToggleEntryType(int TransId, int EntryType)
        {
            var t = new Transaction(TransId);
            t.EnteredBy = EntryType == 0 ? 1 : 0;
            t.Save();

            return Json(new
            {
                Status = 0,
                t.EnteredBy
            });
        }