Beispiel #1
0
        private void lblSupplier_Click(object sender, EventArgs e)
        {
            SupplierCustomerMaintenaceForm sDialog = new SupplierCustomerMaintenaceForm(_supplierService,
                                                                                        _customerService, Operation.Search, _param.SC);

            sDialog.ShowDialog();

            if (sDialog.HasSelectedSupplier)
            {
                if (_param.ReceiptType == ReceiptType.SDR)
                {
                    _selectedSupplier = sDialog.SelectedSupplier;
                    if (_selectedSupplier != null)
                    {
                        lblSupplier.Text = _selectedSupplier.Name;
                    }
                }
                else if (_param.ReceiptType == ReceiptType.DR)
                {
                    _selectedCustomer = sDialog.SelectedCustomer;
                    if (_selectedCustomer != null)
                    {
                        lblSupplier.Text = _selectedCustomer.Name;
                    }
                }
            }
        }
Beispiel #2
0
        private void LoadMaintenance(SupplierOrCustomer supplierOrCustomer)
        {
            SupplierService supplierService = new SupplierService(_context);
            CustomerService customerService = new CustomerService(_context);

            var f = new SupplierCustomerMaintenaceForm(supplierService, customerService,
                                                       Operation.Add, supplierOrCustomer);

            f.ShowDialog();
        }
Beispiel #3
0
        private void lblSupplier_Click(object sender, EventArgs e)
        {
            SupplierCustomerMaintenaceForm sDialog =
                new SupplierCustomerMaintenaceForm(_supplierService, null, Operation.Search, SupplierOrCustomer.Supplier);

            sDialog.ShowDialog();
            _selectedSupplier = sDialog.SelectedSupplier;

            if (sDialog.HasSelectedSupplier)
            {
                if (_selectedSupplier != null)
                {
                    lblSupplier.Text = _selectedSupplier.Name;
                }
            }
        }