private List<int> Duration_Values = new List<int>(); // T private int Duration; // T private string Predecessor; private List<string> Predecessor_Values = new List<string>(); private string Proj_name; private List<string> Proj_name_Values = new List<string>(); private int Earlystart; private List<int> EarlyStart_value = new List<int>(); private List<string> Predecessor_Number = new List<string>(); private int FindES; private List<int> FindES_Value = new List<int>(); // this is all what i create to use this for (int X = 0; X <= dataGridView1.RowCount - 1; X++) { Proj_name = Convert.ToString(dataGridView1.Rows[X].Cells[0].Value); Proj_name_Values.Add(Convert.ToString(Proj_name)); } for (int X = 0; X <= dataGridView1.RowCount - 1; X++) { Duration = Convert.ToInt32(dataGridView1.Rows[X].Cells[1].Value); Duration_Values.Add(Convert.ToInt32(Duration)); } for (int X = 0; X <= dataGridView1.RowCount - 1; X++) { Predecessor = Convert.ToString(dataGridView1.Rows[X].Cells[2].Value); String[] Word = Predecessor.Split(' '); Predecessor_Number.Add(Convert.ToString(Word.Length)); Predecessor_Values.Add(Convert.ToString(Predecessor)); }
for (int i = 0; i < Proj_name_Values.Count - 1; i++) { if (Predecessor_Number[i] == "1") { if (Predecessor_Values[i] == "-") { Earlystart = 0; EarlyStart_value.Add(Convert.ToInt32(Earlystart)); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)