public void GenerateArrListParts() { if (ArrayListParts == null) { ArrayListParts = new List <ListRChPClass>(); } foreach (MarkaKMDClass marka in ArrayMarks) { foreach (PartKMDClass part in marka.GetArrayParts()) { ListRChP s_ListPart = new ListRChP(); bool b_s = false; int i = 0; if (!(ArrayListParts == null)) { foreach (ListRChPClass l in ArrayListParts) { if (l.cl_List.NameList == ("Деталь " + part.getPosInMarka().ToString("000"))) { s_ListPart = l.cl_List; b_s = true; s_ListPart.KolParts = s_ListPart.KolParts + marka.getKolTInMS() * (part.getKolTInMarka() + part.getKolNInMarka()); break; } i = i + 1; } } if (!b_s) { s_ListPart.DesignList = this.getDesignMS() + "-" + part.getPosInMarka().ToString("0000"); s_ListPart.NameList = "Деталь " + part.getPosInMarka().ToString("000"); s_ListPart.Format = "А4"; s_ListPart.KolParts = marka.getKolTInMS() * (part.getKolTInMarka() + part.getKolNInMarka()); s_ListPart.MassPart = part.getMassPart(); ArrayListParts.Add(new ListRChPClass(s_ListPart)); } else { ArrayListParts[i] = new ListRChPClass(s_ListPart); } } } }
public ListRChPClass(ListRChP k_list) { cl_List = k_list; }