Ejemplo n.º 1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (PaginationParamsAreSet())
            {
                var size  = Convert.ToInt32(Page.RouteData.Values["size"]);
                var index = Convert.ToInt32(Page.RouteData.Values["index"]);
                Model = CatalogService.GetCatalogItemsPaginated(size, index);
                //_log.Info($"Now loading... /Default.aspx?size={size}&index={index}");
            }
            else
            {
                Model = CatalogService.GetCatalogItemsPaginated(DefaultPageSize, DefaultPageIndex);
                //_log.Info($"Now loading... /Default.aspx?size={DefaultPageSize}&index={DefaultPageIndex}");
            }

            PeopleGrid.DataSource = new List <People>()
            {
                new People("Andy", "Wayne", "PG"),
                new People("Bill", "Johnson", "SD"),
                new People("Caroline", "Barry", "Manager")
            };
            PeopleGrid.DataBind();

            productList.DataSource = Model.Data;
            productList.DataBind();
            ConfigurePagination();
        }
Ejemplo n.º 2
0
        private void Reader_click(object sender, RoutedEventArgs e)
        {
            var cds = new PeopleGrid(_connectionSettings, true);

            cds.Owner = this;
            cds.ShowDialog();
            if (TemporaryStorage.Holder.TryGetValue("ID", out string ID))
            {
                Reader.Text = ID.ToString();
            }
            TemporaryStorage.Holder.Remove("ID");
        }
Ejemplo n.º 3
0
        private void Ord_click(object sender, RoutedEventArgs e)
        {
            var cds = new PeopleGrid(_connectionSettings, true);

            cds.Owner = this;
            cds.ShowDialog();
            if (TemporaryStorage.Holder.TryGetValue("ID", out string ID))
            {
                SetFiltersToNull();
                Filter.ReaderNumFilterText = ID;
                CountPages();
                var _connection = new SqlConnection(_connectionSettings.ConnectionString);
                listSortDirection          = Order.SelectedIndex == 0 ? ListSortDirection.Ascending : ListSortDirection.Descending;
                _BufCommand                = new SqlCommand(DBHelper.FormSqlGrid(displayIndex, listSortDirection, Filter._filters, Filter.TableSourceForSort, SqlCommands.GridPart1, SqlCommands.GridByPagePart2), _connection);
                _BufCommand.CommandTimeout = 30;
                UpdateGrid();
            }
            TemporaryStorage.Holder.Remove("ID");
        }
Ejemplo n.º 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            EventsTriggered += 1;

            Model       = CatalogService.GetCatalogItemsPaginated(DefaultPageSize, DefaultPageIndex);
            PeopleModel = new List <People>()
            {
                new People("Andy", "Wayne", "PG"),
                new People("Bill", "Johnson", "SD"),
                new People("Caroline", "Barry", "Manager")
            };

            PeopleGrid.DataSource = PeopleModel;
            PeopleGrid.DataBind();

            productList.DataSource = Model.Data;
            productList.DataBind();

            DataBind();
        }
Ejemplo n.º 5
0
 protected void AddPerson(object sender, EventArgs e)
 {
     PeopleModel.Add(new People("New", "New", "New"));
     PeopleGrid.DataBind();
 }