Exemple #1
0
        public void DeleteLog <T>(List <T> entitys)
        {
            if (!islog)
            {
                return;
            }
            mes_log meslog = new mes_log();

            meslog.czlx = Enum.GetName(typeof(PubEnum.CZLX), PubEnum.CZLX.批量删除);
            meslog.rznr = JsonConvert.SerializeObject(entitys);
            using (var db = new OracleBaseFixture().DB)
            {
                db.Insert <mes_log>(meslog);
            }
        }
Exemple #2
0
        public void UpdateLogJson <T>(T entity, T orginalobj)
        {
            if (!islog)
            {
                return;
            }
            mes_log meslog = new mes_log();

            meslog.czlx = Enum.GetName(typeof(PubEnum.CZLX), PubEnum.CZLX.修改);
            meslog.rznr = "{\"oldobj\":" + JsonConvert.SerializeObject(orginalobj) + ",\"newobj\":" + JsonConvert.SerializeObject(entity) + "}";
            using (var db = new OracleBaseFixture().DB)
            {
                db.Insert <mes_log>(meslog);
            }
        }
Exemple #3
0
 public void LogoutLog(sys_user entity)
 {
     try
     {
         mes_log meslog = new mes_log();
         meslog.user_code = entity.code;
         meslog.user_name = entity.name;
         meslog.czlx      = "退出";
         meslog.rznr      = JsonConvert.SerializeObject(entity);
         using (var db = new OracleBaseFixture().DB)
         {
             db.Insert <mes_log>(meslog);
         }
     }
     catch (Exception e)
     {
         log.Error(e.Message);
         throw;
     }
 }