Beispiel #1
0
        protected void _initModel()
        {
            Productions.Properties.Settings setting = new Productions.Properties.Settings();

            ProductParser newParser = new ProductParser();

            dataModel = new ProductModel(
                                this.gvProducts,
                                setting.DB_HOST,
                                setting.DB_PORT,
                                setting.DB_NAME,
                                setting.DB_USER,
                                setting.DB_PASS,
                                "Production.Products",
                                newParser);

            //dataModel = new ProductModel(this.gvProducts, ".\\SQL2008", setting.DB_PORT, setting.DB_NAME, setting.DB_USER, setting.DB_PASS, "Production.Products", newParser);

            newParser.DataModel = dataModel;

            dataModel.resetControl();
        }
        protected void _initModel()
        {
            Productions.Properties.Settings setting = new Productions.Properties.Settings();

            ProductParser newParser = new ProductParser();

            dataModel = new ProductModel(
                                this.gvProducts,
                                setting.DB_HOST,
                                setting.DB_PORT,
                                setting.DB_NAME,
                                setting.DB_USER,
                                setting.DB_PASS,
                                "Production.Products",
                                newParser);

            dataModel = new ProductModel(this.gvProducts, ".\\SQL2008", setting.DB_PORT, setting.DB_NAME, setting.DB_USER, setting.DB_PASS, "Production.Products", newParser);

            newParser.DataModel = dataModel;

            dataModel.resetControl();

            this.cbxCaID.Items.Add("");
            this.cbxCaID.Items.AddRange(dataModel.getIDItemList("Production.Categories", 0, 1, " deactive=0").ToArray());
            this.cbxSupID.Items.Add("");
            this.cbxSupID.Items.AddRange(dataModel.getIDItemList("Production.Suppliers", 0, 1, " deactive=0").ToArray());
        }