Exemplo n.º 1
0
        public void FillPositionComboBox(ComboBox cbo)
        {
            PositionService positionService = new PositionService();
            var             listCompany     = positionService.GetPositionList();

            cbo.DataSource    = listCompany;
            cbo.DisplayMember = "Name";
            cbo.ValueMember   = "PositionId";
        }
Exemplo n.º 2
0
        public void FillPositionDataGridView(DataGridView dgv)
        {
            PositionService positionService = new PositionService();
            var             positionList    = positionService.GetPositionList();

            dgv.DataSource    = positionList;
            dgv.ReadOnly      = true;
            dgv.SelectionMode = DataGridViewSelectionMode.FullRowSelect;
            dgv.DefaultCellStyle.SelectionBackColor = Color.Gray;
            dgv.Columns["PositionId"].Visible       = false;
        }