Beispiel #1
0
        public void Insert(int CustomerID, string CustomerName)
        {

            using (tempdbEntities tde = new tempdbEntities())
            {
                tde.pInsCustomer(CustomerID, CustomerName);
            }
        }
Beispiel #2
0
 private void buttonInsertCustomer_Click(object sender, EventArgs e)
 {
     try
     {
         using (tempdbEntities tde = new tempdbEntities())
         {
             tde.pInsCustomer(Int32.Parse(textBoxInsertCustomerID.Text), textBoxInsertCustomerName.Text);
         }
         textBoxInsertCustomerID.Clear();
         textBoxInsertCustomerName.Clear();
     }
     catch (Exception)
     {
         MessageBox.Show("Could not insert data");
     }
 }