Example #1
0
        public DataTable loadData(string createQuery, string execQuery, string server, string name)
        {
            dbmanager manager = new dbmanager();

            manager.create(createQuery, server, name);
            return(manager.execQuery(execQuery));
        }
        void populate()
        {
            dbmanager manager = new dbmanager();

            manager.create(Lcreate, "supportfiles.db3", "location");
            DataTable Dt = manager.execQuery("SELECT * FROM location ");

            listBox1.DisplayMember = "Location";
            listBox1.DataSource    = Dt;
        }
        private void Button2_Click(object sender, EventArgs e)
        {
            String    value   = listBox1.GetItemText(listBox1.SelectedItem);
            dbmanager manager = new dbmanager();

            manager.create(Lcreate, "supportfiles.db3", "location");
            DataTable Dt = manager.execQuery("Delete From location Where Location like '%" + value + "%'");

            populate();
        }
Example #4
0
        public Add()
        {
            InitializeComponent();

            dbmanager manager = new dbmanager();

            manager.create(Lcreate, "supportfiles.db3", "location");
            DataTable Dt = manager.execQuery("SELECT * FROM location ");

            location.DisplayMember = "Location";
            location.DataSource    = Dt;
        }
        private void Button1_Click(object sender, EventArgs e)
        {
            dbmanager manager = new dbmanager();

            manager.create(Lcreate, "supportfiles.db3", "location");
            String input = Interaction.InputBox("Enter Location", "", "", -1, -1);

            if (input != "")
            {
                DataTable Dt = manager.execQuery("Insert Into location(Location) Values('" + input + "')");
                populate();
            }
            else
            {
            }
        }