protected override void update()
        {
            Guid?Customers_Id = null;
            Guid?Vendors_Id   = null;

            if (rbVendor.Checked)
            {
                Vendors_Id = (Guid?)iddl_Vendors.SelectedValue;
            }
            else
            {
                Customers_Id = (Guid?)iddl_Customers.SelectedValue;
            }

            FakturPajak.update(selectedRowID(), (DateTime)idtp_Timestamp.ValueAsStartDateFilter, Customers_Id, Vendors_Id, itxt_No.ValueText, in_DPP.ValueDecimal, in_PPN.ValueDecimal, itxt_Notes.ValueText);
        }
        private void btnSubmit_Click(object sender, EventArgs e)
        {
            if (isInputValid())
            {
                VendorInvoice.update(_vendorInvoice.ID, (DateTime)idtp_Timestamp.ValueAsStartDateFilter, itxt_InvoiceNo.ValueText, in_Amount.ValueDecimal, in_TOP.ValueInt, itxt_Notes.ValueText);

                if (_fakturPajak != null) //edit assigned FP
                {
                    FakturPajak.update(_fakturPajak.Id, (DateTime)idtp_Timestamp.ValueAsStartDateFilter, null, _vendorInvoice.Vendors_Id, itxt_FakturPajak_No.ValueText, in_FakturPajak_DPP.ValueDecimal, in_FakturPajak_PPN.ValueDecimal, itxt_FakturPajak_Notes.ValueText);
                }
                else if (!itxt_FakturPajak_No.isEmpty()) //add new FP
                {
                    Guid FakturPajaks_Id = FakturPajak.add((DateTime)idtp_Timestamp.ValueAsStartDateFilter, null, _vendorInvoice.Vendors_Id, itxt_FakturPajak_No.ValueText, in_FakturPajak_DPP.ValueDecimal, in_FakturPajak_PPN.ValueDecimal, itxt_FakturPajak_Notes.ValueText);
                    VendorInvoice.update_FakturPajaks_Id(_vendorInvoice.ID, FakturPajaks_Id);
                }

                this.Close();
            }
        }