Exemplo n.º 1
0
        private void Service_Department_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'premierServicedbDataSet.WorkRequest' table. You can move, or remove it, as needed.
            this.workRequestTableAdapter.Fill(this.premierServicedbDataSet.WorkRequest);
            // TODO: This line of code loads data into the 'premierServicedbDataSet.Employee' table. You can move, or remove it, as needed.
            this.employeeTableAdapter.Fill(this.premierServicedbDataSet.Employee);
            // TODO: This line of code loads data into the 'premierServicedbDataSet.Service' table. You can move, or remove it, as needed.
            this.serviceTableAdapter.Fill(this.premierServicedbDataSet.Service);

            work = request.ReceiveRequest();
            // metroGrid1.AutoGenerateColumns = false;
            metroGrid1.DataSource = work;
            metroGrid2.DataSource = request.UnassignedWork();
            foreach (DataGridViewColumn item in metroGrid1.Columns)
            {
                item.Visible = false;
            }
            metroGrid1.Columns["WorkRequirement"].Visible = true;
            metroGrid1.Columns["WorkDuration"].Visible    = true;

            foreach (DataGridViewColumn item in metroGrid2.Columns)
            {
                item.Visible = false;
            }

            metroGrid2.Columns["WorkRequirement"].Visible = true;
            metroGrid2.Columns["WorkDuration"].Visible    = true;
        }