Пример #1
0
 private void Chart_Shipping_MouseDoubleClick_1(object sender, MouseEventArgs e)
 {
     try
     {
         HitTestResult hit = chart_Shipping.HitTest(e.X, e.Y, ChartElementType.DataPoint);
         Series        s = null; string strseri = "";
         if (hit != null)
         {
             s = hit.Series;
         }
         if (s != null)
         {
             strseri = s.LegendText != "" ? s.LegendText : s.Name;
         }
         if (hit.PointIndex >= 0 && hit.Series != null && hit.PointIndex < chart_shipped.Series[0].Points.Count())
         {
             DataPoint dp     = chart_shipped.Series[0].Points[hit.PointIndex];
             string    label  = dp.AxisLabel;
             string    Label2 = dp.LegendText;
             var       dr     = listShipingResult.Where(d => d.ClientsRequestDate.ToString("MMM") == label && d.Status == strseri).ToList();
             dtDisplay = ConvertToDataTable(dr);
             CrisisReport.DisplayDetail display = new CrisisReport.DisplayDetail(dtDisplay);
             display.ShowDialog();
         }
     }
     catch (Exception)
     {
     }
 }
Пример #2
0
        private void Dgv_show_CellContentDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (dgv_show.RowCount == 0)
            {
                return;
            }
            int i = e.RowIndex;
            int j = e.ColumnIndex;

            string[] OrderCode = dgv_show.Rows[i].Cells["OrderCode"].Value.ToString().Split('-');
            if (OrderCode.Count() != 2)
            {
                return;
            }

            dtDisplay = new DataTable();
            if (dgv_show.Rows[i].Cells["Status"].Selected || dgv_show.Rows[i].Cells["OrderCode"].Selected)
            {
                DataRow[] dr = dtShipping.Select(string.Format("Code_No ='{0}' ", OrderCode[1]) + " and Code_Type = '" + OrderCode[0] + "'");
                dtDisplay = dr.CopyToDataTable();

                CrisisReport.DisplayDetail display = new CrisisReport.DisplayDetail(dtDisplay);

                display.ShowDialog();
            }
        }
Пример #3
0
        private void Chart_Quantity_MouseDoubleClick(object sender, MouseEventArgs e)
        {
            HitTestResult hit = chart_Quantity.HitTest(e.X, e.Y, ChartElementType.DataPoint);

            if (hit.PointIndex >= 0 && hit.Series != null)
            {
                DataPoint dp    = chart_Quantity.Series[0].Points[hit.PointIndex];
                string    label = dp.AxisLabel;
                var       dr    = listShipingResult.Where(d => d.Status == label).ToList();
                dtDisplay = ConvertToDataTable(dr);
                CrisisReport.DisplayDetail display = new CrisisReport.DisplayDetail(dtDisplay);
                display.ShowDialog();
            }
        }