Ejemplo n.º 1
0
        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);
            }
        }
Ejemplo n.º 2
0
 protected override void AddRecord()
 {
     try
     {
         SupplierDialogFrm frm = new SupplierDialogFrm(Common.FormMode.Add, null);
         if (frm.ShowDialog() == DialogResult.OK)
         {
             GetRecords();
         }
     }
     catch (Exception ex)
     {
         Utils.ShowException(ex);
     }
 }
Ejemplo n.º 3
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);
            }
        }