private void bBrigade_Click(object sender, EventArgs e) { frmStructure f = new frmStructure(); f.CatalogMode = CatalogMode.Select; f.ShowDialog(); if (f.ctrlStructure.SelectedBrigadeId != 0) { Brigade brigade = Databases.Tables.Brigades[f.ctrlStructure.SelectedBrigadeId]; bBrigade.Text = String.Format("{0} / {1}", brigade.Area.Code.ToString("D2"), brigade.Code.ToString("D2")); if (bBrigade.Tag != null) { if (!(bBrigade.Tag as Brigade).Equals(brigade)) { this.ctrlExecutors.dgvItems.Rows.Clear(); this.ctrlLabors.dgvItems.Rows.Clear(); } } bBrigade.Tag = brigade; this.ctrlExecutors.BrigadeId = brigade.Id; this.ctrlExecutors.Enabled = true; } }
private void bBrigade_Click(object sender, EventArgs e) { frmStructure f = new frmStructure(); f.CatalogMode = CatalogMode.Select; f.ShowDialog(); if (f.ctrlStructure.SelectedBrigadeId != 0) { Brigade brigade = Databases.Tables.Brigades[f.ctrlStructure.SelectedBrigadeId]; bBrigade.Text = String.Format("{0} / {1}", brigade.Area.Code.ToString("D2"), brigade.Code.ToString("D2")); bBrigade.Tag = brigade; } if (this.bBrigade.Tag != null) { Calculate(); } }