Esempio n. 1
0
        private void grid_entradas_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            if (e.RowIndex == -1)
            {
                return;
            }
            rollid = grid_entradas.Rows[e.RowIndex].Cells[3].Value.ToString();
            grid_salidas.DataSource = manager.LoadMoveSalidasMaster(rollid);
            int    rowsal        = 0;
            double totlenght_sal = 0;

            for (int i = 0; i <= grid_salidas.Rows.Count - 1; i++)
            {
                grid_salidas.Rows[i].Cells["msi"].Value = Convert.ToDouble(grid_salidas.Rows[i].Cells["width"].Value) *
                                                          Convert.ToDouble(grid_salidas.Rows[i].Cells["lenght"].Value) * R.CONSTANTES.FACTOR_CALCULO_MSI;

                grid_salidas.Rows[i].Cells["msi2"].Value = Convert.ToDouble(grid_salidas.Rows[i].Cells["width2"].Value) *
                                                           Convert.ToDouble(grid_salidas.Rows[i].Cells["lenght2"].Value) * R.CONSTANTES.FACTOR_CALCULO_MSI;

                totlenght_sal += Convert.ToDouble(grid_salidas.Rows[i].Cells["tot_consumo"].Value) +
                                 Convert.ToDouble(grid_salidas.Rows[i].Cells["tot_consumo2"].Value);
                rowsal += 1;
            }
            TXT_COUNT_SAL.Text  = rowsal.ToString();
            TXT_LENGHT_SAL.Text = totlenght_sal.ToString();
        }