Exemplo n.º 1
0
        private void FormOpsRules_Load(object sender, EventArgs e)
        {
            klonsDataSet ds = MyData.DataSetKlons;

            cbIINien.DataSource  = new BindingSource(ds, ds.Acp23.TableName);
            cbIINizd.DataSource  = new BindingSource(ds, ds.Acp23.TableName);
            cbPVNien.DataSource  = new BindingSource(ds, ds.Acp25.TableName);
            cbPVNizd.DataSource  = new BindingSource(ds, ds.Acp25.TableName);
            cbPVNdeb.DataSource  = new BindingSource(ds, ds.Acp25.TableName);
            cbPVNkred.DataSource = new BindingSource(ds, ds.Acp25.TableName);
            cbPVN5.DataSource    = new BindingSource(ds, ds.Acp25.TableName);

            LoadParams();

            CheckEnabledIIN();
            CheckEnabledPVN();

            Control[][] cc = new Control[][]
            {
                new Control[] { cbIINizd },
                new Control[] { cbIINien },
                new Control[] { cbPVNien },
                new Control[] { cbPVNizd },
                new Control[] { cbPVNdeb },
                new Control[] { cbPVNkred },
                new Control[] { cbPVN5 }
            };

            SetControlsUpDownOrder(cc);
            WindowState = FormWindowState.Maximized;
        }
Exemplo n.º 2
0
        private void LinkToData()
        {
            klonsDataSet ds = KlonsData.St.DataSetKlons;

            cbClid.DataSource  = new BindingSource(ds, "Persons");
            cbAC11.DataSource  = new BindingSource(ds, "AcP21");
            cbAC12.DataSource  = new BindingSource(ds, "AcP21");
            cbAC21.DataSource  = new BindingSource(ds, "AcP21");
            cbAC22.DataSource  = new BindingSource(ds, "AcP21");
            cbAC13.DataSource  = new BindingSource(ds, "Acp23");
            cbAC23.DataSource  = new BindingSource(ds, "Acp23");
            cbAC14.DataSource  = new BindingSource(ds, "AcP24");
            cbAC24.DataSource  = new BindingSource(ds, "AcP24");
            cbAC15.DataSource  = new BindingSource(ds, "Acp25");
            cbAC25.DataSource  = new BindingSource(ds, "Acp25");
            cbDocGr.DataSource = new BindingSource(ds, "DocTypA");

            (cbClid.DataSource as BindingSource).Sort  = "clid";
            (cbAC11.DataSource as BindingSource).Sort  = "Ac";
            (cbAC12.DataSource as BindingSource).Sort  = "Ac";
            (cbAC13.DataSource as BindingSource).Sort  = "idx";
            (cbAC14.DataSource as BindingSource).Sort  = "idx";
            (cbAC15.DataSource as BindingSource).Sort  = "idx";
            (cbAC21.DataSource as BindingSource).Sort  = "Ac";
            (cbAC22.DataSource as BindingSource).Sort  = "Ac";
            (cbAC23.DataSource as BindingSource).Sort  = "idx";
            (cbAC24.DataSource as BindingSource).Sort  = "idx";
            (cbAC25.DataSource as BindingSource).Sort  = "idx";
            (cbDocGr.DataSource as BindingSource).Sort = "id";

            cbClid.SelectedIndex  = -1;
            cbAC11.SelectedIndex  = -1;
            cbAC12.SelectedIndex  = -1;
            cbAC21.SelectedIndex  = -1;
            cbAC22.SelectedIndex  = -1;
            cbAC13.SelectedIndex  = -1;
            cbAC23.SelectedIndex  = -1;
            cbAC14.SelectedIndex  = -1;
            cbAC24.SelectedIndex  = -1;
            cbAC15.SelectedIndex  = -1;
            cbAC25.SelectedIndex  = -1;
            cbDocGr.SelectedIndex = -1;
        }