public Form_DocProformaInvoice_AddOn(DocProformaInvoice_AddOn x_AddOnDPI, bool bxPrint, usrc_AddOn xusrc_AddOn) { InitializeComponent(); m_AddOnDPI = x_AddOnDPI; m_bPrint = bxPrint; m_usrc_AddOn = xusrc_AddOn; this.Text = lngRPM.s_PaymentOfProformaInvoiceAndPrint.s; }
private bool Get_DocProformaInvoice_AddOn(DocProformaInvoice_AddOn m_DocProformaInvoice_AddOn, bool xbPrint) { Form_DocProformaInvoice_AddOn payment_frm = new Form_DocProformaInvoice_AddOn(m_DocProformaInvoice_AddOn, xbPrint, this); if (payment_frm.ShowDialog() == DialogResult.OK) { Show(m_usrc_Invoice.m_ShopABC.m_CurrentInvoice.Doc_ID); return true; } return false; }
//, int xCurrency_DecimalPlaces, decimal xGrossSum) public bool Init(DocProformaInvoice_AddOn x_AddOnDI,bool bxPrint, usrc_AddOn x_usrc_AddOn) { //m_InvoiceData = xInvoiceData; m_AddOnDPI = x_AddOnDI; m_bPrint = bxPrint; m_usrc_AddOn = x_usrc_AddOn; if (m_bPrint) { lngRPM.s_Print.Text(this.btn_Print); } else { lngRPM.s_OK.Text(this.btn_Print); } if (m_AddOnDPI.Get(m_usrc_AddOn.m_usrc_Invoice.m_ShopABC.m_CurrentInvoice.Doc_ID)) { if (m_AddOnDPI.m_IssueDate != null) { dtP_DateOfIssue.Value = m_AddOnDPI.m_IssueDate.Date; } if (m_AddOnDPI.m_MethodOfPayment != null) { switch (m_AddOnDPI.m_MethodOfPayment.eType) { case GlobalData.ePaymentType.CASH: case GlobalData.ePaymentType.PAYMENT_CARD: case GlobalData.ePaymentType.CASH_OR_PAYMENT_CARD: rdb_Payment_by_cash_or_credit_card_on_delivery.Checked = true; break; case GlobalData.ePaymentType.BANK_ACCOUNT_TRANSFER: rdb_BankAccountTransfer.Checked = true; txt_BankAccount.Text = SetBankAccountText(); break; } } if (m_AddOnDPI.m_TermsOfPayment != null) { txt_PaymantConditionsDescription.Text = m_AddOnDPI.m_TermsOfPayment.Description; } if (m_AddOnDPI.m_Duration != null) { switch (m_AddOnDPI.m_Duration.type) { case 0: //length in months rdb_ValidNumberOf.Checked = true; cmb_DaysOrMonths.SelectedIndex = 0; nmUpDn_NumberOfDaysOrMonths.Value = m_AddOnDPI.m_Duration.length; dtP_TenderValidUntil.Value = m_AddOnDPI.m_IssueDate.Date.AddMonths((Convert.ToInt32(m_AddOnDPI.m_Duration.length))); break; case 1: //length in days rdb_ValidNumberOf.Checked = true; cmb_DaysOrMonths.SelectedIndex = 1; nmUpDn_NumberOfDaysOrMonths.Value = m_AddOnDPI.m_Duration.length; dtP_TenderValidUntil.Value = m_AddOnDPI.m_IssueDate.Date.AddDays((Convert.ToInt32(m_AddOnDPI.m_Duration.length))); break; case 2: //days from IssueDate to end date rdb_Valid_Tender_Until.Checked = true; cmb_DaysOrMonths.SelectedIndex = 1; nmUpDn_NumberOfDaysOrMonths.Value = m_AddOnDPI.m_Duration.length; dtP_TenderValidUntil.Value = m_AddOnDPI.m_IssueDate.Date.AddDays((Convert.ToInt32(m_AddOnDPI.m_Duration.length))); break; } } return true; } else { return false; } }