示例#1
0
        private void btnPyNew_Click(object sender, EventArgs e)
        {
            var editor = new PaymentsView();

            editor.Invoicedetail = this;
            editor.ShowObject(null);
            editor.ShowDialog();
        }
示例#2
0
 public void OpenSelected()
 {
     if (_paymentRecord != null)
     {
         var paymentdetail = new PaymentsView();
         paymentdetail.ShowObject(_paymentRecord);
         paymentdetail.Dock = DockStyle.Fill;
         paymentdetail.ShowDialog();
     }
 }
示例#3
0
        private void btnPyNew_Click(object sender, EventArgs e)
        {
            var paymenteditor = new PaymentsView();
            var pmt           = new PaymentRecord();

            paymenteditor.ShowObject(pmt);
            paymenteditor.InvoiceTotal = GetInvoiceTotal();
            paymenteditor.PaymentTotal = GetPaymentTotal();
            var result = paymenteditor.ShowDialog();

            if (result == DialogResult.OK)
            {
                _invoice.PaymentRecord.Add(paymenteditor.CurrentObject);
            }
        }
示例#4
0
        private void gridControl2_DoubleClick(object sender, EventArgs e)
        {
            var selectedpayment = paymentbindingSource.Current as PaymentRecord;
            var editpayment     = new PaymentsView();

            //var pay = _context.PaymentRecords.FirstOrDefault(pr => pr.PaymentId == selectedpayment.PaymentId);
            editpayment.InvoiceTotal = GetInvoiceTotal();
            editpayment.PaymentTotal = GetPaymentTotal();
            editpayment.ShowObject(selectedpayment);
            var result = editpayment.ShowDialog();

            if (result == DialogResult.Cancel)
            {
                return;
            }
            if (result == DialogResult.OK)
            {
                _invoice.PaymentRecord.Add(editpayment.CurrentObject);
            }
        }