private void cmbYear_TextChanged(object sender, EventArgs e)
        {
            technovisionDataSetTableAdapters.spectaclesTableAdapter ta = new technovisionDataSetTableAdapters.spectaclesTableAdapter();
            technovisionDataSet.spectaclesDataTable dt = new technovisionDataSet.spectaclesDataTable();
            ta.FillByYearSpectacles(dt, cmbYear.Text);
            this.SpecGrid.DataSource = dt;

            //load contact lenses
            technovisionDataSetTableAdapters.contactlenseTableAdapter co = new technovisionDataSetTableAdapters.contactlenseTableAdapter();
            technovisionDataSet.contactlenseDataTable tb = new technovisionDataSet.contactlenseDataTable();
            co.FillByYearContactlenses(tb, cmbYear.Text);
            this.LenseGrid.DataSource = tb;
        }
        private void loadData()
        {
            try
            {
                technovisionDataSetTableAdapters.spectaclesTableAdapter  ta  = new technovisionDataSetTableAdapters.spectaclesTableAdapter();
                technovisionDataSetTableAdapters.spec_ordersTableAdapter taa = new technovisionDataSetTableAdapters.spec_ordersTableAdapter();

                //technovisionDataSet.spectaclesDataTable dt = new technovisionDataSet.spectaclesDataTable();
                //ta.FillByYearSpectacles(dt, cmbYear.Text);
                this.SpecGrid.DataSource = taa.GetDataByYear(cmbYear.Text);
                //this.SpecGrid.DataSource = ta.GetDataByYear(cmbYear.Text);

                //load contact lenses
                technovisionDataSetTableAdapters.contactlenseTableAdapter co = new technovisionDataSetTableAdapters.contactlenseTableAdapter();
                technovisionDataSet.contactlenseDataTable tb = new technovisionDataSet.contactlenseDataTable();
                co.FillByYearContactlenses(tb, cmbYear.Text);
                this.LenseGrid.DataSource = tb;
            }
            catch (Exception ex)
            {
                CommonFunctions.ShowError(this, ex.Message.ToString());
            }
        }