Ejemplo n.º 1
0
 private void button5_Click(object sender, RoutedEventArgs e)
 {
     //delete database
     using (EmployeeDataContext Empdb = new EmployeeDataContext(strConnectionString))
     {
         if (Empdb.DatabaseExists())
         {
             Empdb.DeleteDatabase();
             MessageBox.Show("Employee Database Deleted Successfully!!!");
         }
     }
 }
Ejemplo n.º 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!!!");
         }
     }
 }
Ejemplo n.º 3
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!!!");
         }
     }
 }
Ejemplo n.º 4
0
 private void button5_Click(object sender, RoutedEventArgs e)
 {
     //delete database
     using (EmployeeDataContext Empdb = new EmployeeDataContext(strConnectionString))
     {
         if (Empdb.DatabaseExists())
         {
             Empdb.DeleteDatabase();
             MessageBox.Show("Employee Database Deleted Successfully!!!");
         }
     }
 }