Пример #1
0
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     //create database
     using (EmployeeDataContext Empdb = new EmployeeDataContext(strConnectionString))
     {
         if (Empdb.DatabaseExists() == false)
         {
             Empdb.CreateDatabase();
             MessageBox.Show("Employee Database Created Successfully!!!");
         }
         else
         {
             MessageBox.Show("Employee Database already exists!!!");
         }
     }
 }
Пример #2
0
 private void button1_Click(object sender, RoutedEventArgs e)
 {
     //create database
     using (EmployeeDataContext Empdb = new EmployeeDataContext(strConnectionString))
     {
         if (Empdb.DatabaseExists() == false)
         {
             Empdb.CreateDatabase();
             MessageBox.Show("Employee Database Created Successfully!!!");
         }
         else
         {
             MessageBox.Show("Employee Database already exists!!!");
         }
     }
 }