示例#1
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
示例#2
0
        private void ShowResult()
        {
            if (context != null)
            {
                context.Dispose();
                context = new BankEntities();
            }
            //step2
            var q = from t in context.EmployeeInfo
                    select t;

            //step 3
            this.dataGrid.ItemsSource = q.ToList();
        }
示例#3
0
 void DayQuery_Unloaded(object sender, RoutedEventArgs e)
 {
     context.Dispose();
 }
示例#4
0
 void EmployeeBase_Unloaded(object sender, RoutedEventArgs e)
 {
     context.Dispose();
 }
示例#5
0
 void ratePage_Unloaded(object sender, RoutedEventArgs e)
 {
     context.Dispose();
 }
 void ChangePay_Unloaded(object sender, RoutedEventArgs e)
 {
     context.Dispose();
 }