예제 #1
0
 private void buttonSpecAny1_Click(object sender, EventArgs e)
 {
     try
     {
         this.Cursor = Cursors.WaitCursor;
         gridData.Rows.Clear();
         IList records = r_soinv.Search(searchText.Text.Trim());
         loadResult(records);
         this.Cursor = Cursors.Default;
     }
     catch (Exception x)
     {
         KryptonMessageBox.Show(x.Message, "Message", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
     finally
     {
         this.Cursor = Cursors.Default;
     }
 }
예제 #2
0
        private void searchToolStripButton_Click(object sender, EventArgs e)
        {
            IList result = searchToolStripTextBox.Text == string.Empty ? new ArrayList() : r_soinv.Search(searchToolStripTextBox.Text);

            if (result.Count == 1)
            {
                m_prn          = (SupplierOutStandingInvoice)result[0];
                m_prn          = (SupplierOutStandingInvoice)r_soinv.Get(m_prn.ID);
                m_prn.EMPLOYEE = (Employee)r_employee.GetById(m_prn.EMPLOYEE);
                // m_prn.VENDOR = (Supplier)r_sup.GetById(m_prn.VENDOR);
                setEditMode(EditMode.View);
                loadData();
                setEnableForm(false);
            }
            else
            {
                using (SearchSupplierOSInvoiceForm frm = new SearchSupplierOSInvoiceForm(searchToolStripTextBox.Text, result, m_mainForm.CurrentUser))
                {
                    frm.ShowDialog();
                    if (frm.SUPPLIER_OS_INVOICE == null)
                    {
                        return;
                    }
                    else
                    {
                        m_prn          = frm.SUPPLIER_OS_INVOICE;
                        m_prn          = (SupplierOutStandingInvoice)r_soinv.Get(m_prn.ID);
                        m_prn.EMPLOYEE = (Employee)r_employee.GetById(m_prn.EMPLOYEE);
                        // m_prn.VENDOR = (Supplier)r_sup.GetById(m_prn.VENDOR);
                        setEditMode(EditMode.View);
                        loadData();
                        setEnableForm(false);
                    }
                }
            }
        }