Ejemplo n.º 1
0
        public void loadSelector()
        {
            clearDataSourceSelector();
            int limit = Configuration.defaultLimit;

            authorList.AddRange(SqlObjectLoader.getSqlObjectsFromDataTable(typeof(BookAuthor), getDataTableWithOffsetAndLimit("getTacGia", 0, limit)));
            nxbList.AddRange(SqlObjectLoader.getSqlObjectsFromDataTable(typeof(BookNXB), getDataTableWithOffsetAndLimit("getNXB", 0, limit)));
            locationList.AddRange(SqlObjectLoader.getSqlObjectsFromDataTable(typeof(BookLocation), getDataTableWithOffsetAndLimit("getVitri", 0, limit)));
            typeList.AddRange(SqlObjectLoader.getSqlObjectsFromDataTable(typeof(BookType), getDataTableWithOffsetAndLimit("getLoaiSach", 0, limit)));
            Program.MainForm.BookForm.clearSearchInput();
        }
Ejemplo n.º 2
0
 public void refreshSelector(DataTable dataTable)
 {
     if (needRefreshSelector())
     {
         this.Invoke(new Action(delegate()
         {
             selectorBindingSource.DataSource = SqlObjectLoader.getSqlObjectsFromDataTable(selectorClass, dataTable);
             selectorBindingSource.ResetBindings(true);
         }));
     }
 }
Ejemplo n.º 3
0
        public void initSelector()
        {
            int        limit      = Configuration.defaultLimit;
            ReaderForm readerForm = Program.MainForm.ReaderForm;

            setBindingSource(readerForm.khoaBindingSource,
                             SqlObjectLoader.getSqlObjectsFromDataTable(
                                 typeof(NameableObject),
                                 getDataTable("getKhoa")));
            setBindingSource(readerForm.classBindingSource,
                             SqlObjectLoader.getSqlObjectsFromDataTable(
                                 typeof(NameableObject),
                                 getDataTable("getLop")));
        }