Example #1
0
        private void LoadItemsForReorder(bool reorderList)
        {
            AutoPartFilterModel filter = new AutoPartFilterModel()
            {
                ForReorder = true, ReorderList = reorderList
            };

            var itemsForReorder = this.autoPartController.FetchAutoPartWithSearch(filter);

            autoPartDisplayModelBindingSource.DataSource = itemsForReorder;
        }
        private void LoadItems()
        {
            if (!string.IsNullOrWhiteSpace(AltPartNumber))
            {
                AutoPartFilterModel filter = new AutoPartFilterModel()
                {
                    PartNumber = AltPartNumber
                };
                var items = this.autoPartController.FetchAutoPartWithSearch(filter);

                autoPartDisplayModelBindingSource.DataSource = items;
            }
        }
Example #3
0
        private void dataGridView1_SelectionChanged(object sender, EventArgs e)
        {
            if (dataGridView1.SelectedRows.Count > 0)
            {
                DataGridViewRow row = dataGridView1.SelectedRows[0];
                int             id  = (int)row.Cells["IdColumn"].Value;

                AutoPartFilterModel filter = new AutoPartFilterModel()
                {
                    BrandId = id
                };
                autoPartDisplayModelBindingSource.DataSource = this.autoPartController.FetchAutoPartWithSearch(filter);
            }
        }
        private AutoPartFilterModel CreateFilter()
        {
            int brandId = BrandDropdown.SelectedIndex != -1 ?
                          (int)BrandDropdown.SelectedValue : 0;

            AutoPartFilterModel filter = new AutoPartFilterModel()
            {
                AutoPartId = this.PartId,
                PartNumber = PartNumberTextbox.Text,
                BrandId    = brandId,
                Size       = SizeTextbox.Text,
                Model      = ModelTextbox.Text
            };

            return(filter);
        }
Example #5
0
        private void LoadPartsInventory(bool getPartId)
        {
            int  records     = 0;
            long elapsedTime = ClientHelper.PerformFetch(() =>
            {
                AutoPartFilterModel filter = CreateFilter(getPartId);

                var result = this.autoPartController.FetchAutoPartWithSearch(filter);
                autoPartDisplayModelBindingSource.DataSource = result;

                records = result.Count;
            });

            if (this.ParentForm.GetType() == typeof(MainForm))
            {
                ((MainForm)this.ParentForm).AttachStatus(records, elapsedTime);
            }
        }
        private void LoadPartsInventory()
        {
            AutoPartFilterModel filter = CreateFilter();

            autoPartDisplayModelBindingSource.DataSource = this.autoPartController.FetchAutoPartWithSearch(filter);
        }