Пример #1
0
 private void dgvHistoryReport_RowPrePaint(object sender, DataGridViewRowPrePaintEventArgs e)
 {
     if (e.RowIndex >= 0 && bsHistoryReport.DataSource != null && bsHistoryReport.Count > e.RowIndex)
     {
         HistoryMoving row = (HistoryMoving)bsHistoryReport[e.RowIndex];
         dgvHistoryReport.Rows[e.RowIndex].DefaultCellStyle.ForeColor          = row.Color;
         dgvHistoryReport.Rows[e.RowIndex].DefaultCellStyle.SelectionBackColor = row.Color;
     }
 }
Пример #2
0
        private void dtpDateTo_ValueChanged(object sender, EventArgs e)
        {
            if (cboxCargo.SelectedItem != null)
            {
                Cargo cargo = (Cargo)cboxCargo.SelectedItem;

                bsHistoryReport.DataSource = HistoryMoving.LoadList(Database, dtpDateFrom.Value, dtpDateTo.Value, tboxVehicleMask.Text, cargo);
            }
        }
Пример #3
0
 private void bsHistoryReport_CurrentChanged(object sender, EventArgs e)
 {
     if (bsHistoryReport.Current != null && panelHistoryReport.Visible)
     {
         HistoryMoving historyMoving = (HistoryMoving)bsHistoryReport.Current;
         ShowComment(historyMoving.GetComment(Database));
         ShowCreator(historyMoving.GetPlanAppointCreator(Database));
     }
     else
     {
         ShowComment("");
         ShowCreator("");
     }
 }