Exemplo n.º 1
0
 protected override void CleanData()
 {
     demo.pivotGrid.DataSource = null;
     if (dataContext != null)
     {
         dataContext.Dispose();
         dataContext = null;
     }
 }
Exemplo n.º 2
0
        public static PivotGridDemoDBDataContext GetContext()
        {
            PivotGridDemoDBDataContext context = new PivotGridDemoDBDataContext(ServerParameters.GetDBConnectionString());
            bool databaseOK = false;

            try {
                databaseOK = context.DatabaseExists();
            }
            finally {
                if (!databaseOK)
                {
                    context.Dispose();
                    context = null;
                }
            }
            return(context);
        }