示例#1
0
        private void UpdateDispatchInfo()
        {
            Settlement settlement = SettlementsRepo.GetById((int)gridExSettlementsList.GetCheckedRows()[0].Cells["id"].Value);
            Licensor   licensor   = LicensorsRepo.GetById((int)gridExSettlementsDetails.GetDataRows()[0].Cells["tLicencjodawcaCafreOfId"].Value);

            settlement.Email        = licensor.Email;
            settlement.DispatchDate = DateTime.Now;
            SettlementsRepo.Update(settlement);
        }
示例#2
0
        private void ShowSettlementEditForm()
        {
            int        agreementId   = (int)gridExSettlementsList.CurrentRow.Cells["Umowa"].Value;
            int        settlemenetId = (int)gridExSettlementsList.CurrentRow.Cells["id"].Value;
            Settlement settlement    = SettlementsRepo.GetById(settlemenetId);

            FrmSettlementEdit frmSettlementEdit = new FrmSettlementEdit(settlement, agreementId);

            frmSettlementEdit.ShowDialog();

            int currentRowId = (int)gridExSettlementsList.CurrentRow.RowIndex;

            this.LoadSettlementsList();
            gridExSettlementsList.MoveToRowIndex(currentRowId);
        }
示例#3
0
        private void SaveSettlement()
        {
            this.settlement.IsLocked       = chkIsLocked.Checked;
            this.settlement.Period         = dtPeriod.Value;
            this.settlement.GenerationDate = dtGeneration.Value;
            this.settlement.InvoiceNumber  = txtInvoiceName.Text;
            this.settlement.Email          = txtEmail.Text;
            this.settlement.InvoiceAmount  = numInvoiceAmount.Value;
            this.settlement.TaxPercent     = numTaxPercent.Value;
            this.settlement.PurchaseOrder  = txtPurchaseOrder.Text;

            this.settlement.CertificateDate = dtCerificate.Checked ? dtCerificate.Value : (DateTime?)null;
            this.settlement.DispatchDate    = dtDispatch.Checked ? dtDispatch.Value : (DateTime?)null;

            SettlementsRepo.Update(this.settlement);
        }
 public void RecalculateSettlements()
 {
     SettlementsRepo.RecalculateSettlements();
     this.Close();
 }