コード例 #1
0
        // Translate ScreenHlp table:
        private int WrTrlScreenHlp(int MaxCnt, string DefCulture, string CultureId, string CultureName, string dbConnectionString, string dbPassword)
        {
            int       cnt = 0;
            DataTable dt;

            using (Access3.WebAccess dac = new Access3.WebAccess())
            {
                dt = dac.WrGetScreenHlp(CultureId, dbConnectionString, dbPassword);
            }
            foreach (DataRow dr in dt.Rows)
            {
                dr["DefaultHlpMsg"] = WrGetTranslation(DefCulture, CultureId, CultureName, dr["DefaultHlpMsg"].ToString().Trim(), dbConnectionString, dbPassword);
                dr["FootNote"]      = WrGetTranslation(DefCulture, CultureId, CultureName, dr["FootNote"].ToString().Trim(), dbConnectionString, dbPassword);
                dr["ScreenTitle"]   = WrGetTranslation(DefCulture, CultureId, CultureName, dr["ScreenTitle"].ToString().Trim(), dbConnectionString, dbPassword);
                dr["AddMsg"]        = WrGetTranslation(DefCulture, CultureId, CultureName, dr["AddMsg"].ToString().Trim(), dbConnectionString, dbPassword);
                dr["UpdMsg"]        = WrGetTranslation(DefCulture, CultureId, CultureName, dr["UpdMsg"].ToString().Trim(), dbConnectionString, dbPassword);
                dr["DelMsg"]        = WrGetTranslation(DefCulture, CultureId, CultureName, dr["DelMsg"].ToString().Trim(), dbConnectionString, dbPassword);
                using (Access3.WebAccess dac = new Access3.WebAccess())
                {
                    dac.WrInsScreenHlp(dr, CultureId, dbConnectionString, dbPassword);
                }
                cnt = cnt + 1; if (cnt >= MaxCnt)
                {
                    break;
                }
            }
            return(cnt);
        }