Beispiel #1
0
        private void InitializeCategories()
        {
            var getCategories = new GetCategoriesOperation();

            var categories = OperationManager.Instance.ExecuteOp(getCategories).Data as List <CategoryDto>;

            foreach (var cat in categories)
            {
                this.categoriesCheckBox.Items.Add(cat);
            }
        }
Beispiel #2
0
        private void InitializeFormItems()
        {
            var opSuppliers = new GetSuppliersOperation();
            var suppliers   = OperationManager.Instance.ExecuteOp(opSuppliers).Data as List <SupplierDto>;

            ddlSupplier.ValueMember   = "Id";
            ddlSupplier.DisplayMember = "Name";
            ddlSupplier.DataSource    = suppliers;

            var categoriesOp = new GetCategoriesOperation();
            var categories   = OperationManager.Instance.ExecuteOp(categoriesOp).Data as List <CategoryDto>;

            ddlCategory.ValueMember   = "Id";
            ddlCategory.DisplayMember = "Name";
            ddlCategory.DataSource    = categories;
        }
Beispiel #3
0
        private void InitializeFormItems()
        {
            name.Text      = dto.Name;
            price.Value    = dto.Price;
            quantity.Value = dto.Quantity;

            var opSuppliers = new GetSuppliersOperation();
            var suppliers   = OperationManager.Instance.ExecuteOp(opSuppliers).Data as List <SupplierDto>;

            ddlSupplier.ValueMember   = "Id";
            ddlSupplier.DisplayMember = "Name";
            ddlSupplier.DataSource    = suppliers;

            ddlSupplier.SelectedValue = dto.SupplierId;

            var categoriesOp = new GetCategoriesOperation();
            var categories   = OperationManager.Instance.ExecuteOp(categoriesOp).Data as List <CategoryDto>;

            ddlCategory.ValueMember   = "Id";
            ddlCategory.DisplayMember = "Name";
            ddlCategory.DataSource    = categories;

            ddlSupplier.SelectedValue = dto.CategoryId;
        }