Пример #1
0
 private void ShowStateView(StateCondition sc, string categoryName, string databaseName)
 {
     var root = Application.Current.RootVisual as FrameworkElement;
     ViewStateData c = new ViewStateData();
     c.StateCondition = sc;
     c.Width = root.ActualWidth * 0.98;
     c.Height = root.ActualHeight * 0.98;
     c.HorizontalAlignment = HorizontalAlignment.Center;
     c.VerticalAlignment = VerticalAlignment.Center;
     c.Show();
     service.LogAsync(new OperationLog
     {
         AccountName = Data.AdminConfigurationItem.UserName,
         AccountRealName = Data.AdminConfigurationItem.RealName,
         CategoryName = categoryName,
         DatabaseName = databaseName,
         TableName = sc.TableName,
         Action = "查看状态视图",
         ActionMemo = "",
     });
 }
Пример #2
0
 /// <summary>
 /// 状态方式呈现数据
 /// </summary>
 private void StateView()
 {
     string categoryName = "";
     string databaseName = "";
     var databasePrefix = GetDatabasePrefix(ref categoryName, ref databaseName);
     if (databasePrefix != null)
     {
         var tableNames = GetTableNames(false);
         if (tableNames != null)
         {
             if (tableNames.Count > 1)
             {
                 MessageBox.Show("对于状态方式呈现请只选择一个表");
                 return;
             }
             var filters = GetFilters();
             var sc = new StateCondition
             {
                 DatabasePrefix = databasePrefix,
                 TableName = tableNames.First(),
                 Filters = filters,
             };
             ShowStateView(sc, categoryName, databaseName);
         }
     }
 }