Beispiel #1
0
        public void callSearch(DataTable t, DAL.GridColumns cols)
        {
            foreach (DAL.ColMap col in cols)
            {
                grd.addColumn(col.title, col.datafield, col.width);
            }

            grd.AutoGenerateColumns   = false;
            bindingSource1.DataSource = t;
            grd.DataSource            = bindingSource1;
            ucGridSearch.setGrid(grd);
        }
Beispiel #2
0
        public static searchResult showSearchBox(DataTable t, string strTitle = "Search", DAL.GridColumns cols = null)
        {
            return(null);

            /*
             * var frm1 = new frmSearchBox();
             * frm1.Text = strTitle;
             *
             * if (cols == null)
             * {
             *  frm1.callSearch(t);
             * }
             * else
             *  frm1.callSearch(t, cols);
             *
             *
             * frm1.ShowDialog();
             *
             * var result = new searchResult(frm1.row);
             *
             * if (cols != null) result.PrimaryKeyField = cols.PrimaryKeyField;
             *
             * frm1.Dispose();
             *
             * return result;
             */
        }