Added DB operation(insert,selAll).

1. Add select all data, insert new data.
2. Add progress indicator when insert.
3. Add error when no select a type.
4. Some bugfixings.