コード例 #1
0
 private void GridVendorInvoicePayments_CellContentClick(object sender, DataGridViewCellEventArgs e)
 {
     if (Util.isColumnMatch(sender, e, col_gridVendorInvoicePayments_Approved))
     {
         VendorInvoicePayment.update_Approved(Util.getClickedRowValue <Guid>(sender, e, col_gridVendorInvoicePayments_Id), !Util.getCheckboxValue(sender, e));
         populateGridVendorInvoicePayments();
     }
     else if (Util.isColumnMatch(sender, e, col_gridVendorInvoicePayments_Cancelled))
     {
         VendorInvoicePayment.update_Cancelled(Util.getClickedRowValue <Guid>(sender, e, col_gridVendorInvoicePayments_Id), !Util.getCheckboxValue(sender, e));
         populateGridVendorInvoicePayments();
     }
 }
コード例 #2
0
        /*******************************************************************************************************/
        #region EVENT HANDLERS

        private void GridVendorInvoicePayments_CellDoubleClick(object sender, DataGridViewCellEventArgs e)
        {
            if (Util.isColumnMatch(sender, e, col_gridVendorInvoicePayments_Notes, col_gridVendorInvoicePayments_Timestamp))
            {
                pnlUpdateVendorInvoicePayment.Visible = true;
                _updateitem_Id = Util.getClickedRowValue <Guid>(sender, e, col_gridVendorInvoicePayments_Id);
                VendorInvoicePayment obj = new VendorInvoicePayment(_updateitem_Id);
                idtp_Timestamp.Value = obj.Timestamp;
                itxt_Notes.ValueText = obj.Notes;
                idtp_Timestamp.focus();
            }
            else if (e.RowIndex > -1)
            {
                DataTable data = VendorInvoicePaymentItem.get(null, Util.getSelectedRowID(sender, col_gridVendorInvoicePayments_Id));
                Util.setGridviewDataSource(gridVendorInvoicePaymentItems, false, false, data);
                lblRowInfoHeader.Text = string.Format("Payment No: {0}", Util.getSelectedRowValue(sender, col_gridVendorInvoicePayments_No));
            }
        }
コード例 #3
0
        private void BtnSubmitVendorPayments_Click(object sender, EventArgs e)
        {
            decimal paymentAmount;
            Dictionary <Guid, decimal> paymentData = new Dictionary <Guid, decimal>();
            string VendorId = iddl_Vendors.SelectedValue.ToString();

            foreach (DataGridViewRow row in gridvendorinvoice.Rows)
            {
                if (Util.getRowValue(row, col_gridvendorinvoice_Vendors_Id).ToString() == VendorId)
                {
                    paymentAmount = Util.wrapNullable <decimal>(Util.getRowValue(row, col_gridVendorInvoice_PaymentAmount));
                    if (paymentAmount != 0)
                    {
                        paymentData.Add(Util.wrapNullable <Guid>(Util.getRowValue(row, col_gridvendorinvoice_id)), paymentAmount);
                    }
                }
            }
            VendorInvoicePayment.add((DateTime)idtp_VendorInvoicePaymentDate.ValueAsStartDateFilter, (Guid)iddl_Vendors.SelectedValue, null, paymentData);

            createVendorInvoicePaymentMode(false);
            populateGridVendorInvoices();
        }
コード例 #4
0
 public void populateGridVendorInvoicePayments()
 {
     Util.setGridviewDataSource(gridVendorInvoicePayments, true, true, VendorInvoicePayment.get(null, itxt_QuickSearch.ValueText, itxt_VendorInvoiceNo.ValueText, chkShowOnlyLast3Months.Checked, chkShowUnapprovedOnly.Checked));
     pbLog.Enabled = (gridVendorInvoicePayments.Rows.Count > 0);
 }
コード例 #5
0
 private void btnUpdateVendorInvoicePayment_Click(object sender, EventArgs e)
 {
     VendorInvoicePayment.update(_updateitem_Id, (DateTime)idtp_Timestamp.ValueAsStartDateFilter, itxt_Notes.ValueText);
     pnlUpdateVendorInvoicePayment.Visible = false;
     populateGridVendorInvoicePayments();
 }