Esempio n. 1
0
        private void btnAddAnalizeControl_Click(object sender, EventArgs e)
        {
            CheckUslugiForm form = new CheckUslugiForm();
            if (form.ShowDialog() == DialogResult.OK)
            {
                uslugiCategoryBindingSource.DataSource = listUslugi=form.uslugiListCheced;
                gridViewSelectUslugi.BestFitColumns();

            }
            form.Hide();
        }
        private void btnAddAnalizeControl_Click(object sender, EventArgs e)
        {
            List<UslugiCategory> lait = null;
            if ((uslugiCategoryBindingSource.DataSource != null) &&
                (uslugiCategoryBindingSource.DataSource is List<UslugiCategory>))
            {
                lait = (List<UslugiCategory>)uslugiCategoryBindingSource.DataSource;
            }
            CheckUslugiForm form = new CheckUslugiForm(lait);
            if (form.ShowDialog() == DialogResult.OK)
            {

                if (lait!=null)
                   lait.AddRange(form.uslugiListCheced);
                else
                 lait=form.uslugiListCheced;
                uslugiCategoryBindingSource.DataSource =lait;
                gridViewSelectUslugi.BestFitColumns();

            }
            form.Hide();
        }