コード例 #1
0
        //public static void AjustPriceData(string code, DateTime toDate, decimal weight)
        //{
        //    if (weight == 0) return;
        //    //Load main  pricedata
        //    databases.baseDS.priceDataDataTable priceTbl = new databases.baseDS.priceDataDataTable();
        //    databases.DbAccess.LoadData(priceTbl,AppTypes.MainDataTimeScale.Code, DateTime.MinValue, DateTime.MaxValue, code);
        //    if (priceTbl == null) return;
        //    AjustPriceData(priceTbl, toDate, weight);
        //    databases.DbAccess.UpdateData(priceTbl);
        //    //Delete all summ pricedata
        //    databases.DbAccess.DeletePriceSumData(code);

        //    CultureInfo stockCulture = application.AppLibs.GetStockCulture(code);
        //    //??Imports.AggregatePriceData(priceTbl,stockCulture,null);
        //}


        public static CultureInfo GetCulture(string countryCode)
        {
            if (countryCode == null)
            {
                return(null);
            }
            databases.baseDS.countryRow countryRow = databases.AppLibs.FindAndCache_Country(countryCode);
            if (countryRow == null)
            {
                return(null);
            }
            return(common.language.GetCulture((!countryRow.IscultureNull() ? countryRow.culture : Consts.constDefaultCultureCode)));
        }
コード例 #2
0
ファイル: AppLibs.cs プロジェクト: oghenez/trade-software
 public static databases.baseDS.countryRow FindAndCache_Country(string code)
 {
     databases.baseDS.countryRow row = myCachedDS.country.FindBycode(code);
     if (row != null)
     {
         return(row);
     }
     databases.baseDSTableAdapters.countryTA dataTA = new databases.baseDSTableAdapters.countryTA();
     dataTA.ClearBeforeFill = false;
     dataTA.Fill(myCachedDS.country);
     row = myCachedDS.country.FindBycode(code);
     if (row != null)
     {
         return(row);
     }
     return(null);
 }