Esempio n. 1
0
 public void LoadSystemVariable()
 {
     try
     {
         List <core_variable> list = dbContext_0.Fetch <core_variable>("", new object[0]);
         foreach (core_variable item in list)
         {
             if (!string.IsNullOrEmpty(item.VariableName))
             {
                 if (!string.IsNullOrEmpty(item.VariableValue))
                 {
                     SysContext.SetVariableValue(item.VariableName, item.VariableValue);
                 }
                 else if (!string.IsNullOrEmpty(item.VariableExpression))
                 {
                     try
                     {
                         string value = dbContext_0.ExecuteScalar <string>(item.VariableExpression, new object[1]
                         {
                             SysContext.WanJiangUserID
                         });
                         SysContext.SetVariableValue(item.VariableName, value);
                     }
                     catch (Exception)
                     {
                     }
                 }
             }
         }
     }
     catch (Exception)
     {
     }
 }