コード例 #1
0
        private void insertNewCust()
        {
            BusinessAppDataContext badc = new BusinessAppDataContext();
            tblCustomer cust = new tblCustomer();

            cust.First_Name_OR_Company = txtBxNameCompany.Text;

            try {cust.Middle_Initial = Convert.ToChar(txtBxMiddleInit.Text);}
            catch (FormatException) { cust.Middle_Initial = null; }

            try {cust.Last_Name = txtBxLastName.Text;}
            catch (FormatException) { cust.Last_Name = null; }

            try {cust.Email = txtBxEmail.Text;}
            catch (FormatException) { cust.Email = null; }

            cust.Phone_Number = txtBxPhoneNum.Text;

            badc.tblCustomers.InsertOnSubmit(cust);
            badc.SubmitChanges();

            form.updateCmbBx();
        }
コード例 #2
0
 partial void UpdatetblCustomer(tblCustomer instance);
コード例 #3
0
 partial void DeletetblCustomer(tblCustomer instance);
コード例 #4
0
 partial void InserttblCustomer(tblCustomer instance);