private void AddDataItems(ASPxDataView dvMaster, List <ProductionItem> items, int sectionId)
        {
            List <DotWeb.Models.Station> stations = new List <DotWeb.Models.Station>();

            stations = ProductionRepository.GetStationsByAssemblySection(sectionId);

            if (stations.Any())
            {
                foreach (var station in stations)
                {
                    DataViewItem dvItem = new DataViewItem();

                    var  historyId    = string.Empty;
                    var  model        = string.Empty;
                    var  variant      = string.Empty;
                    var  finNo        = string.Empty;
                    var  statusId     = string.Empty;
                    bool isSubAssy    = ProductionRepository.IsSubAssemblyStation(station.Id);
                    var  subAssyCount = ProductionRepository.CountSubAssyPerSection(sectionId);

                    var prodItem = items.Where(x => x.StationId == station.Id).FirstOrDefault();
                    if (prodItem != null)
                    {
                        historyId = prodItem.ItemId.ToString();
                        model     = prodItem.ModelName;
                        variant   = prodItem.VariantName;
                        finNo     = prodItem.FINNumber;
                        statusId  = prodItem.StatusId.ToString();
                    }

                    dvItem.DataItem = new
                    {
                        HistoryId   = historyId,
                        ModelName   = model,
                        VariantName = variant,
                        FINNumber   = finNo,
                        StatusId    = statusId,
                        StationId   = station.Id,
                        StationName = station.StationName,
                        IsQGate     = station.IsQualityGate,

                        SectionId  = sectionId,
                        IsSubAssy  = isSubAssy,
                        NumSubAssy = subAssyCount
                    };

                    dvMaster.Items.Add(dvItem);
                }

                dvMaster.SettingsTableLayout.ColumnCount = stations.Count;
            }
            else
            {
                foreach (var item in items)
                {
                    DataViewItem dvItem = new DataViewItem();

                    dvItem.DataItem = new
                    {
                        HistoryId   = item.ItemId,
                        ModelName   = item.ModelName,
                        VariantName = item.VariantName,
                        FINNumber   = item.FINNumber,
                        StatusId    = item.StatusId,
                        StationId   = item.StationId,
                        StationName = item.StationName,
                        IsQGate     = false,

                        SectionId  = sectionId,
                        IsSubAssy  = false,
                        NumSubAssy = 0
                    };

                    dvMaster.Items.Add(dvItem);
                }

                dvMaster.SettingsTableLayout.ColumnCount = items.Count > 0 ? items.Count : 1;
            }
        }