Beispiel #1
0
        private void Jisuan()
        {
            double flSum = 0;
            double mlpj  = 0;

            //for (int i = 0; i < dataGridView1.Rows.Count; i++)
            //{
            //    if (dataGridView1.Rows[i].Cells[6].Value != null)
            //    {
            //    }
            //}

            for (int i = 0; i < dataGridView2.Rows.Count; i++)
            {
                if (dataGridView2.Rows[i].Cells[6].Value != null && dataGridView2.Rows[i].Cells[12].Value != null && cal.IsNumber(dataGridView2.Rows[i].Cells[12].Value.ToString()))
                {
                    flSum = flSum + Convert.ToDouble(dataGridView2.Rows[i].Cells[12].Value);
                }
            }
            FL_Sum.Text = "辅料总和:" + flSum.ToString();
        }