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; }
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; }