Ejemplo n.º 1
0
 public ActionResult ReplaceFavorit(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.ReplaceFavorit(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.ReplaceFavorit", ControllerName + "[Message]:" + ex.Message + " [StackTrace]:" + ex.StackTrace);
         return(Content(ControllerName + "[Message]:" + ex.Message + " [StackTrace]:" + ex.StackTrace, "text/html"));
     }
 }