Example #1
0
        public frmJournal()
        {
            InitializeComponent();
            this.WindowState = FormWindowState.Maximized;
            this.Text        = "Журнал";

            DataTable dtRoutes = sql.getSRoutes();

            cbRoutes.DataSource    = dtRoutes;
            cbRoutes.DisplayMember = "name";
            cbRoutes.ValueMember   = "id";

            DataTable dtDrivers = sql.getListDriver();

            cbDriver.DataSource    = dtDrivers;
            cbDriver.DisplayMember = "name";
            cbDriver.ValueMember   = "id";

            DataTable dtAuto = sql.getListAuto(Convert.ToInt32(cbDriver.SelectedValue));

            cbAuto.DataSource    = dtAuto;
            cbAuto.DisplayMember = "name";
            cbAuto.ValueMember   = "id";

            if (config.mode == "АДМ" || config.mode == "МН")
            {
                pButton.Visible = true;
            }
            else
            {
                pButton.Visible = false;
            }

            bw.RunWorkerAsync();
        }
Example #2
0
        private void setData()
        {
            dtData = sql.getSRoutes();
            filter();

            dgvData.DataSource = dtData.DefaultView;
        }