private void AddSupplierBtn_Click(object sender, EventArgs e)
        {
            OrderAddSupplier AddSupplier = new OrderAddSupplier();

            AddSupplier.FormClosing += (object sender2, FormClosingEventArgs e2) =>
            {
                if (AddSupplier.ReturnSupplierId() != null)
                {
                    this.IdSupplierTxt.Text   = AddSupplier.ReturnSupplierId();
                    this.NameSupplierTxt.Text = AddSupplier.ReturnSupplierName();
                    this.AfmSupplierTxt.Text  = AddSupplier.ReturnSupplierAfm();
                }
            };
            AddSupplier.FormClosed += new FormClosedEventHandler(FormClose);
            this.Enabled            = false;
            AddSupplier.ShowDialog();
        }
Beispiel #2
0
        private void AddSupplierBtn_Click(object sender, EventArgs e)
        {
            OrderAddSupplier AddSupplier = new OrderAddSupplier();

            AddSupplier.FormClosing += (object sender2, FormClosingEventArgs e2) =>
            {
                if (AddSupplier.ReturnSupplierId() != null)
                {
                    ClearValues();
                    if (Convert.ToInt16(ProdItemsTxt.Text.ToString()) > 1)
                    {
                        ClearProds();
                    }
                    this.IdSupplierTxt.Text        = AddSupplier.ReturnSupplierId();
                    this.NameSupplierTxt.Text      = AddSupplier.ReturnSupplierName();
                    this.AfmSupplierTxt.Text       = AddSupplier.ReturnSupplierAfm();
                    this.PrevDebitSupplierTxt.Text = AddSupplier.ReturnSupplierDebit();
                }
            };
            AddSupplier.FormClosed += new FormClosedEventHandler(FormClose);
            this.Enabled            = false;
            AddSupplier.ShowDialog();
        }