Esempio n. 1
0
        private void filterToolStripMenuItem_Click(object sender, EventArgs e)
        {
            dataView = new DataView(AuthorsDataSet.Tables["notebook"]);
            WorkWithDataBase notebook = new WorkWithDataBase();
            string           finding  = textBox2.Text;

            notebook.filter(dataView, finding);
        }
Esempio n. 2
0
        private void deleteRecordToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //delete row
            dataView = new DataView(AuthorsDataSet.Tables["notebook"]);
            WorkWithDataBase notebook = new WorkWithDataBase();

            notebook.deleterow(dataView, currentRow);
        }
Esempio n. 3
0
        private void sortToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //sort on surname
            WorkWithDataBase notebook = new WorkWithDataBase();

            dataView = new DataView(AuthorsDataSet.Tables["notebook"]);
            notebook.sort(dataView);
        }
Esempio n. 4
0
        private void button1_Click(object sender, EventArgs e)
        {
            WorkWithDataBase notebook = new WorkWithDataBase();
            MyNotebook       form     = new MyNotebook();

            dataView = new DataView(form.AuthorsDataSet.Tables["notebook"]);
            string fileName = "notebook.xml";

            notebook.AddNewDataRowView(dataView);
        }
Esempio n. 5
0
        private void findToolStripMenuItem_Click(object sender, EventArgs e)
        {
            //find on name
            WorkWithDataBase notebook = new WorkWithDataBase();

            dataView = new DataView(AuthorsDataSet.Tables["notebook"]);
            string propertyForFind;

            propertyForFind = textBox1.Text;
            notebook.find(propertyForFind, dataView);
        }