public GeneralStorage(string PathToLogFile) : base(PathToLogFile) { // Sorting = new SortingOfList(); }
// Creating List Of Products protected ArrayList CreatingListOfProducts(DataTable Products) { //Console.WriteLine("CL"); // // Initializing Of List Products // ArrayList ListOfProducts = new ArrayList(); // // Filling Of List Products // foreach (DataRow CurrentProduct in Products.Rows) { if (!(CurrentProduct["Name"] is DBNull) && (CurrentProduct["Name"] != null) && (CurrentProduct["Name"].GetType() == typeof(string))) { if (((string)CurrentProduct["Name"]).Length > 0) { ListOfProducts.Add(new ElementOfSorting(CurrentProduct)); } } } // // Addition Of Symbols Of Marking // string CurrentChar = ""; SortingOfList Sorting = new SortingOfList(); // // Addition Of Marking Of Names // Sorting.TypeOfSorting = "N"; ListOfProducts.Sort(Sorting); // for (int i = 0; i < ListOfProducts.Count; i++) { // string NewChar = ((ElementOfSorting)ListOfProducts[i]).Name[0].ToString(); // if (CurrentChar != NewChar) { // CurrentChar = NewChar; // ListOfProducts.Insert(i, new ElementOfSorting(CurrentChar, "N")); } } // // Addition Of Marking Of MNN // Sorting.TypeOfSorting = "M"; ListOfProducts.Sort(Sorting); // CurrentChar = ""; // for (int i = 0; i < ListOfProducts.Count; i++) { // // !!! // string NewChar = "", MNN = ((ElementOfSorting)ListOfProducts[i]).MNN; if (MNN.Length > 1) { NewChar = MNN[0].ToString(); } // if (CurrentChar != NewChar) { // CurrentChar = NewChar; // ListOfProducts.Insert(i, new ElementOfSorting(CurrentChar, "M")); } } // // Sorting Of List Of Products // Sorting.TypeOfSorting = "N"; ListOfProducts.Sort(Sorting); // // Return // return(ListOfProducts); }
public GeneralStorage() : base() { // Sorting = new SortingOfList(); }