private void Log() { DBGeneral dbg = new DBGeneral(); dgvLOG.Columns.Clear(); dgvLOG.AutoGenerateColumns = true; dgvLOG.DataSource = dbg.GetLog(); dgvLOG.Columns["time"].HeaderText = "Время"; dgvLOG.Columns["time"].Width = 80; dgvLOG.Columns["bar"].HeaderText = "Штрихкод"; dgvLOG.Columns["bar"].Width = 80; dgvLOG.Columns["tit"].HeaderText = "Издание"; dgvLOG.Columns["tit"].Width = 600; dgvLOG.Columns["idr"].HeaderText = "Читатель"; dgvLOG.Columns["idr"].Width = 80; dgvLOG.Columns["st"].HeaderText = "Действие"; dgvLOG.Columns["st"].Width = 100; dgvLOG.Columns["fund"].HeaderText = "Фонд"; dgvLOG.Columns["fund"].Width = 80; dgvLOG.Columns["IsAtHome"].HeaderText = "Тип выдачи"; dgvLOG.Columns["IsAtHome"].Width = 80; foreach (DataGridViewColumn c in dgvLOG.Columns) { c.SortMode = DataGridViewColumnSortMode.NotSortable; } foreach (DataGridViewRow r in dgvLOG.Rows) { int idr = Convert.ToInt32(r.Cells["idr"].Value); ReaderVO reader = new ReaderVO(idr); if ((reader.ReaderRights & Rights.EMPL) == Rights.EMPL) { r.Cells["idr"].Value += " (сотрудник)"; } } }
private void Log() { DBGeneral dbg = new DBGeneral(); dgvLOG.Columns.Clear(); dgvLOG.AutoGenerateColumns = true; dgvLOG.DataSource = dbg.GetLog(); dgvLOG.Columns["time"].HeaderText = "Время"; dgvLOG.Columns["time"].Width = 80; dgvLOG.Columns["bar"].HeaderText = "Штрихкод"; dgvLOG.Columns["bar"].Width = 80; dgvLOG.Columns["tit"].HeaderText = "Издание"; dgvLOG.Columns["tit"].Width = 600; dgvLOG.Columns["idr"].HeaderText = "Читатель"; dgvLOG.Columns["idr"].Width = 80; dgvLOG.Columns["st"].HeaderText = "Действие"; dgvLOG.Columns["st"].Width = 100; dgvLOG.Columns["fund"].HeaderText = "Фонд"; dgvLOG.Columns["fund"].Width = 80; dgvLOG.Columns["IsAtHome"].HeaderText = "Тип выдачи"; dgvLOG.Columns["IsAtHome"].Width = 80; foreach (DataGridViewColumn c in dgvLOG.Columns) { c.SortMode = DataGridViewColumnSortMode.NotSortable; } }
private void Log() { DBGeneral dbg = new DBGeneral(); dgvLOG.Columns.Clear(); dgvLOG.AutoGenerateColumns = true; dgvLOG.DataSource = dbg.GetLog(); dgvLOG.Columns["time"].HeaderText = "�����"; dgvLOG.Columns["time"].Width = 80; dgvLOG.Columns["bar"].HeaderText = "��������"; dgvLOG.Columns["bar"].Width = 80; dgvLOG.Columns["tit"].HeaderText = "�������"; dgvLOG.Columns["tit"].Width = 600; dgvLOG.Columns["idr"].HeaderText = "��������"; dgvLOG.Columns["idr"].Width = 80; dgvLOG.Columns["st"].HeaderText = "��������"; dgvLOG.Columns["st"].Width = 100; foreach (DataGridViewColumn c in dgvLOG.Columns) { c.SortMode = DataGridViewColumnSortMode.NotSortable; } }