protected override void EditRecord()
        {
            try
            {
                Data_Supplier record = Utils.GetCurrentRecord <Data_Supplier>(bsRecords);

                if (record != null)
                {
                    Data_Supplier supplier = Data_Supplier.GetSupplier(record.SupplierID);

                    if (supplier != null)
                    {
                        SupplierDialogFrm frm = new SupplierDialogFrm(Common.FormMode.Edit, supplier);

                        if (frm.ShowDialog() == DialogResult.OK)
                        {
                            GetRecords();
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                Utils.ShowException(ex);
            }
        }
Exemple #2
0
        private void btnViewSupplier_Click(object sender, EventArgs e)
        {
            try
            {
                Data_Payment payment = Utils.GetCurrentRecord <Data_Payment>(bsRecords);

                if (payment != null)
                {
                    Data_Supplier supplier = Data_Supplier.GetSupplier(payment.SupplierID);

                    if (supplier != null)
                    {
                        SupplierDialogFrm frm = new SupplierDialogFrm(Common.FormMode.View, supplier);
                        frm.ShowDialog();
                    }
                }
            }
            catch (Exception ex)
            {
                Utils.ShowException(ex);
            }
        }