コード例 #1
0
        public static void UpdatetoMinuteImport()
        {
            AlsiDBDataContext dc = new AlsiDBDataContext();
            dc.Connection.ConnectionString = GlobalObjects.CustomConnectionString;
            dc.ClearImportTable();
            decimal progress = 0;
            decimal totProgress = GlobalObjects.Points.Count;

            foreach (Price price in GlobalObjects.Points)
            {
                int open = (int)price.Open;
                int high = (int)price.High;
                int low = (int)price.Low;
                int close = (int)price.Close;
                int volume = (int)price.Volume;

                ImportMinute c = new ImportMinute
                {
                    Stamp = price.TimeStamp,
                    O = open,
                    H = high,
                    L = low,
                    C = close,
                    V = volume,
                    Instrument = price.InstrumentName
                };


                dc.ImportMinutes.InsertOnSubmit(c);
                dc.SubmitChanges();
                progress++;

                int p = Convert.ToInt16(100 * (progress / totProgress));
                
            }
            GlobalObjects.Points.Clear();
             dc.UpadteImport();
            dc.CleanUp();
        }
コード例 #2
0
 partial void UpdateImportMinute(ImportMinute instance);
コード例 #3
0
 partial void DeleteImportMinute(ImportMinute instance);
コード例 #4
0
 partial void InsertImportMinute(ImportMinute instance);