/// <summary> /// Map order from string, performs check and normalizations /// </summary> /// <param name="idOrder"></param> /// <param name="orderLine"></param> public void LoadOrder(int idOrder, string orderLine) { string[] orderParts = orderLine.Split(','); if (orderParts.Length != fieldDesc.Count) { logger.AddInvalidDataError("Order line malformed, item counts: " + orderParts.Length); } else { // Check all data, to know all the errors at the end of the mapping process for (int i = 0; i < fieldDesc.Count; i++) { check.FieldDataCheck(fieldDesc[i], orderParts[i]); } } }