Example #1
0
        private void LoadSelection()
        {
            G.SelectionWell.QUERRY()
            .SHOW
            .WHERE
            .ARC(C.SelectionWell.Sample, C.Sample.YM).EQUI.BV(YM - 1)
            .DO();
            calcs = new calc[G.SelectionWell.Rows.Count];
            load_sw openFile = new load_sw(calcs.Length, new Func <int, bool>(
                                               IndexRow =>
            {
                calcs[IndexRow] = new calc(G.SelectionWell.Rows.GetID(IndexRow));
                return(true);
            }));

            _progress = new Progress_Form(openFile);
            _progress.ShowDialog();
        }
Example #2
0
        public override bool StartLoad()
        {
            G.NormDoc.QUERRY()
            .SHOW
            .WHERE
            .ARC(C.NormDoc.Volume, C.Volume.Sample, C.Sample.YM).EQUI.BV(YM - 1)
            .DO();
            NormDoc[] normDocs = new NormDoc[G.NormDoc.Rows.Count];
            for (int i = 0; i < normDocs.Length; i++)
            {
                normDocs[i] = new NormDoc(G.NormDoc.Rows.GetID(i));
            }
            show[]  _temp = shows.ToArray();
            load_sw load  = new load_sw(_temp.Length, new Func <int, bool>(
                                            IndexRow =>
            {
                show temp = _temp[IndexRow];
                if (temp.VolumeID > 0)
                {
                    if (normDocs.FirstOrDefault(x => temp.act == x.Act && temp.invoces == x.Invoces && temp.score == x.Score) == null)
                    {
                        MyTools.AddRowFromTable(G.NormDoc,
                                                new KeyValuePair <int, object>(C.NormDoc.Act, temp.act),
                                                new KeyValuePair <int, object>(C.NormDoc.Score, temp.score),
                                                new KeyValuePair <int, object>(C.NormDoc.Invoces, temp.invoces),
                                                new KeyValuePair <int, object>(C.NormDoc.Volume, temp.VolumeID),
                                                new KeyValuePair <int, object>(C.NormDoc.Date, temp._date),
                                                new KeyValuePair <int, object>(C.NormDoc.Summ, temp.summ),
                                                new KeyValuePair <int, object>(C.NormDoc.Resolution, PollutionBase_Class.AllResolution.First(x => x.CurtName.Contains(temp.type_calc)).ID)
                                                );
                    }

                    shows.Remove(temp);
                }

                return(true);
            }));

            _progress = new Progress_Form(load);
            _progress.ShowDialog();
            DG.ItemsSource = null;
            DG.ItemsSource = shows;
            return(true);
        }