コード例 #1
0
        public InjetaItemCompleto(string endereco, string idioma, string pais, string conexao)
        {
            _conexao  = conexao;
            _endereco = endereco;
            _idioma   = idioma;
            _pais     = pais;

            string nomeCatalogo = _endereco.Split('\\').Last().Split('.').First();

            _catalogo = DefineCatalogo(nomeCatalogo);

            ConexaoSQLite.BuildConnectionString(endereco);
        }
コード例 #2
0
        public CriaItensEngPlant3d(string endereco)
        {
            _engineeringItemsService = new EngineeringItemsService();
            var config = new MapperConfiguration(cfg => cfg.CreateMap <EngineeringItems, ItemEngenhariaP3D>());

            //teste
            //config.AssertConfigurationIsValid();

            _mapper = config.CreateMapper();

            ConexaoSQLite.BuildConnectionString(endereco);

            _engineeringItemsService = new EngineeringItemsService();
        }
コード例 #3
0
        public TabelasPlant3dServices(string endereco)
        {
            _pnpTablesService = new PnPTablesService();
            var config = new MapperConfiguration(cfg => cfg.CreateMap <PnPTables, TabelaP3D>());

            //teste
            //config.AssertConfigurationIsValid();

            _mapper = config.CreateMapper();

            ConexaoSQLite.BuildConnectionString(endereco);

            _pnpTablesService = new PnPTablesService();
        }
コード例 #4
0
ファイル: Form1.cs プロジェクト: rico3d2001/Repos
        private void Form1_Load(object sender, EventArgs e)
        {
            _conectionString = "Local";//"name=DataBaseContext";
            //_endereco = @"C:\AutoCAD Plant 3D 2020 Content\CPak ASME\ASME Valves Catalog.pcat";
            //txtBoxCatalogo.Text = _endereco;
            _idioma = "Inglês";
            _pais   = "USA";

            CmboxBanco.SelectedText  = "Local";
            cmboxIdioma.SelectedText = _idioma;
            cmboxPais.SelectedText   = _pais;

            ConexaoSQLite.BuildConnectionString(_endereco);
        }
コード例 #5
0
        public void Insere_GUID_ITEM()
        {
            string endereco = @"C:\Trabalho\CatalogosPlant3d\BRASS_ASME Pipes and Fittings Catalog.pcat";

            //string conexao = "name=DataBaseContext";
            ConexaoSQLite.BuildConnectionString(endereco);

            var config = new MapperConfiguration(cfg => cfg.CreateMap <EngineeringItems, ItemEngenhariaP3D>());

            //teste
            config.AssertConfigurationIsValid();

            List <ItemEngenhariaP3D> itemEngenhariaP3Ds;

            using (var dominioService = DIContainer.Instance.AppContainer.Resolve <DominioService <EngineeringItems> >())
            {
                dominioService.Start(Storage.ConnectionString);

                itemEngenhariaP3Ds = (List <ItemEngenhariaP3D>)dominioService.GetAll();
            }

            Assert.IsTrue(itemEngenhariaP3Ds.Count > 0);
        }
コード例 #6
0
        public void Tabelas_Teste()
        {
            string endereco = @"C:\Trabalho\CatalogosPlant3d\BRASS_ASME Pipes and Fittings Catalog.pcat";

            //string conexao = "name=DataBaseContext";

            ConexaoSQLite.BuildConnectionString(endereco);

            var config = new MapperConfiguration(cfg => cfg.CreateMap <PnPTables, TabelaP3D>());

            //teste
            config.AssertConfigurationIsValid();

            List <TabelaP3D> tabelas;

            using (var dominioService = DIContainer.Instance.AppContainer.Resolve <DominioService <PnPTables> >())
            {
                dominioService.Start(Storage.ConnectionString);

                tabelas = (List <TabelaP3D>)dominioService.GetAll();
            }

            Assert.IsTrue(tabelas.Count > 0);
        }
コード例 #7
0
        public async Task <List <usuarios> > EmailSearch(string _email)
        {
            ConexaoSQLite clsConexao = new ConexaoSQLite();

            return(await clsConexao.Database.QueryAsync <usuarios>("SELECT * FROM usuarios WHERE email = '" + _email + "'"));
        }
コード例 #8
0
 public async Task LocalDelete()
 {
     ConexaoSQLite clsConexao = new ConexaoSQLite();
     await clsConexao.Database.ExecuteAsync("DELETE FROM usuarios");
 }
コード例 #9
0
        public async Task <List <usuarios> > LocalGet()
        {
            ConexaoSQLite clsConexao = new ConexaoSQLite();

            return(await clsConexao.Database.QueryAsync <usuarios>("SELECT * FROM usuarios"));
        }
コード例 #10
0
        public async Task <int> LocalPut()
        {
            ConexaoSQLite clsConexao = new ConexaoSQLite();

            return(await clsConexao.Database.UpdateAsync(this));
        }
コード例 #11
0
        //public DateTime created { get; set; }
        //public DateTime modified { get; set; }


        public async Task <int> LocalPost()
        {
            ConexaoSQLite clsConexao = new ConexaoSQLite();

            return(await clsConexao.Database.InsertAsync(this));
        }