Exemplo n.º 1
0
        void InsertNewNote_Click(object sender, EventArgs e)
        {
            CustomerNotesTableAdapter adapter =
                new CustomerNotesTableAdapter();

            adapter.Insert(Customer, DateTime.Now, NewNoteText.Text);

            BindGrid();
        }
Exemplo n.º 2
0
        void BindGrid()
        {
            EnsureChildControls();

            CustomerNotesTableAdapter adapter =
                new CustomerNotesTableAdapter();

            if (Customer.Equals(string.Empty))
            {
                CustomerNotesGrid.DataSource = adapter.GetDataAll();
            }
            else
            {
                CustomerNotesGrid.DataSource = adapter.GetDataByCustomer(Customer);
            }
        }