Exemplo n.º 1
0
        private void WriteToAttributeModel_Lang(DataTable dt)
        {
            foreach (DataRow _row in dt.Rows)
            {
                Model_Lang _model_lang = new Model_Lang();

                _model_lang.Description  = (string)(_row["MODEL_DESC"] + "");
                _model_lang.Introduction = (string)(_row["EXTENDED_DESC"] + "");
                _model_lang.Language     = MyExtension.GetLanguageCodeByPISLanguageID((string)_row["LANGID"]);
                this._Model_Langs.Add(_model_lang);
            }
        }
Exemplo n.º 2
0
 private void WriteToAttributeFeatures(DataTable dt)
 {
     foreach (DataRow _row in dt.Rows)
     {
         Feature _feature = new Feature();
         _feature.FEATURE_ID   = (int)_row["FEATURE_ID"];
         _feature.FEATURE_SEQ  = (long)_row["FEATURE_SEQ"];
         _feature.FEATURE_DESC = (string)_row["FEATURE_DESC"];
         _feature.Language     = MyExtension.GetLanguageCodeByPISLanguageID((string)_row["LANG_ID"]);
         if (this.AllFeatures == null)
         {
             this.AllFeatures = new List <Feature>();
         }
         this.AllFeatures.Add(_feature);
     }
     this._Features = this.GetFeaturesByDefault();
 }
Exemplo n.º 3
0
        private void WriteToAttributeLiteratures(DataTable dt)
        {
            PISLiteratureType _pislittype;

            foreach (DataRow _row in dt.Rows)
            {
                switch ((string)_row["LIT_TYPE"])
                {
                case "Product - Photo(Main)":
                    _pislittype = PISLiteratureType.Product_Photo_Main;
                    break;

                case "Product - Photo(Main) - Thumbnail":
                    _pislittype = PISLiteratureType.Product_Photo_Main_Thumbnail;
                    break;

                case "Product - Photo(B)":
                    _pislittype = PISLiteratureType.Product_Photo_Big;
                    break;

                case "Product - Photo(S)":
                    _pislittype = PISLiteratureType.Product_Photo_Small;
                    break;

                case "Product - Datasheet":
                    _pislittype = PISLiteratureType.Product_Datasheet;
                    break;

                default:
                    continue;
                }

                Literature _literaturel = new Literature();
                _literaturel.LIT_TYPE        = _pislittype;
                _literaturel.LITERATURE_ID   = (string)_row["LITERATURE_ID"];
                _literaturel.HTTP_URL        = "http://downloadt.advantech.com/download/downloadlit.aspx?LIT_ID=" + (string)_row["LITERATURE_ID"];
                _literaturel.LIT_NAME        = (string)_row["LIT_NAME"];
                _literaturel.FILE_NAME       = (string)_row["FILE_NAME"];
                _literaturel.LAST_UPDATED_BY = (string)_row["LAST_UPDATED_BY"];
                _literaturel.FILE_EXT        = (string)_row["FILE_EXT"];
                _literaturel.Language        = MyExtension.GetLanguageCodeByPISLanguageID((string)_row["LANG"]);

                this._Literatues.Add(_literaturel);
            }
        }