public ActionResult AddFavorit(string tableName, string pkValue) { try { UserInfo sysUser = CacheInit.GetUserInfo(HttpContext); DataUpdate dbUpdate = new DataUpdate(); try { dbUpdate.BeginTransaction(); CacheRepository drep = new CacheRepository(); drep.DbUpdate = dbUpdate; drep.AddFavorit(pkValue, sysUser.UserId, tableName); dbUpdate.Commit(); } catch (Exception ex) { dbUpdate.Rollback(); throw new Exception(ex.Message); } finally { dbUpdate.Close(); } return(Content("0", "text/html")); } catch (Exception ex) { AppLog.WriteLog(AppMember.AppText["SystemUser"], LogType.Error, "MasterController.AddFavorit", ControllerName + "[Message]:" + ex.Message + " [StackTrace]:" + ex.StackTrace); return(Content(ControllerName + "[Message]:" + ex.Message + " [StackTrace]:" + ex.StackTrace, "text/html")); } }