/// <summary> /// /// </summary> public ProcessTender(ProcessTenderProcedures.ProcessTenderMode pMode) { InitializeComponent(); this.success = false; this.customerNameValueLabel.Text = string.Empty; this.disburseLabel.Text = "$ 0.00"; this.okButton.Enabled = false; this.selectedItem = -1; this.validSelection = false; this.viewButton.Enabled = false; this.procTendMode = pMode; this.Update(); }
public override void showProcessTender(ProcessTenderProcedures.ProcessTenderMode processTenderMode) { }
private void VoidLayawayActivity_Load(object sender, EventArgs e) { currentLayaway = GlobalDataAccessor.Instance.DesktopSession.ActiveLayaway; labelDate.Text = currentLayaway.MadeTime.ToString(); labelUserID.Text = currentLayaway.CreatedBy; gvTransactions.Columns[colStatusDate.Index].DefaultCellStyle.Format = "d"; gvTransactions.Columns[colAmount.Index].DefaultCellStyle.Format = "c"; DataGridViewRow row = gvTransactions.Rows.AddNew(); row.Cells[colTransactionNumber.Index].Value = currentLayaway.TicketNumber; row.Cells[colTransactionType.Index].Value = "Layaway"; row.Cells[colTenderType.Index].Value = string.Empty; row.Cells[colStatus.Index].Value = "Layaway"; row.Cells[colStatusDate.Index].Value = currentLayaway.StatusDate; row.Cells[colAmount.Index].Value = currentLayaway.Amount; row.Tag = currentLayaway; maxVoidDays = 0L; if (!new BusinessRulesProcedures(GlobalDataAccessor.Instance.DesktopSession).GetMaxVoidDays(GlobalDataAccessor.Instance.CurrentSiteId, out maxVoidDays)) { if (FileLogger.Instance.IsLogError) { FileLogger.Instance.logMessage(LogLevel.ERROR, this, "Cannot retrieve maximum void days. Defaulting to {0}", maxVoidDays); } } voidRow = row; mode = ProcessTenderProcedures.ProcessTenderMode.LAYAWAYVOID; var receiptsToProcess = (from rcpt in currentLayaway.Receipts where string.IsNullOrWhiteSpace(rcpt.ReferenceReceiptNumber) && !rcpt.Event.Contains("VLAY") && !rcpt.Event.Contains("REF") && !rcpt.Event.Contains("VFORF") select rcpt).OrderBy(r => r.RefTime); foreach (var rdVo in receiptsToProcess) { if (rdVo.Event == ReceiptEventTypes.LAY.ToString()) { continue; } int index = 1; DataGridViewRow paymentRow = gvTransactions.Rows.AddNew(); paymentRow.Cells[colTransactionNumber.Index].Value = rdVo.ReceiptDetailNumber; paymentRow.Cells[colTransactionType.Index].Value = rdVo.TypeDescription; paymentRow.Cells[colStatus.Index].Value = "ACT"; paymentRow.Cells[colStatusDate.Index].Value = rdVo.Date; paymentRow.Tag = rdVo; voidRow = paymentRow; if (rdVo.Event == ReceiptEventTypes.LAYPMT.ToString()) { mode = ProcessTenderProcedures.ProcessTenderMode.LAYPAYMENTVOID; } else if (rdVo.Event == ReceiptEventTypes.FORF.ToString()) { mode = ProcessTenderProcedures.ProcessTenderMode.LAYFORFVOID; } foreach (TenderData tdVo in currentLayaway.TenderDataDetails) { if (tdVo.ReceiptNumber == rdVo.ReceiptNumber && rdVo.RefNumber == currentLayaway.TicketNumber.ToString()) { if (index > 1) { paymentRow = gvTransactions.Rows.AddNew(); } paymentRow.Cells[colTenderType.Index].Value = tdVo.MethodOfPmt; paymentRow.Cells[colAmount.Index].Value = tdVo.TenderAmount; index++; } } } voidRow.Cells[colStatus.Index].Value = currentLayaway.LoanStatus.ToString(); voidRow.DefaultCellStyle.BackColor = Color.LightGray; if (currentLayaway.RetailItems != null && currentLayaway.RetailItems.Count > 0) { var _bindingSource1 = new BindingSource { DataSource = currentLayaway.RetailItems }; dataGridViewMdse.AutoGenerateColumns = false; this.dataGridViewMdse.DataSource = _bindingSource1; this.dataGridViewMdse.Columns[0].DataPropertyName = "icn"; this.dataGridViewMdse.Columns[1].DataPropertyName = "gunnumber"; this.dataGridViewMdse.Columns[2].DataPropertyName = "ticketdescription"; this.dataGridViewMdse.Columns[3].DataPropertyName = "retailprice"; this.dataGridViewMdse.Columns[3].DefaultCellStyle.Format = "c"; this.dataGridViewMdse.AutoGenerateColumns = false; } else { MessageBox.Show("Error in void transaction processing"); FileLogger.Instance.logMessage(LogLevel.ERROR, this, "No items found for the transaction " + currentLayaway.TicketNumber + " to void."); Close(); } //SR 07/28/2011 Disable void if the layaway has been terminated if (currentLayaway.LoanStatus == ProductStatus.TERM || currentLayaway.LoanStatus == ProductStatus.REF) { customButtonVoid.Enabled = false; } }
public abstract void showProcessTender(ProcessTenderProcedures.ProcessTenderMode processTenderMode);