//[TestCase(typeof(Przelewy24PaymentRequest), PaymentMethod.Przelewy24, typeof(PaymentResponse))] // Payment option is not enabled in website profile public async Task CanCreateSpecificPaymentType(Type paymentType, PaymentMethod?paymentMethod, Type expectedResponseType) { // If: we create a specific payment type with some bank transfer specific values PaymentRequest paymentRequest = (PaymentRequest)Activator.CreateInstance(paymentType); paymentRequest.Amount = new Amount(Currency.EUR, "100.00"); paymentRequest.Description = "Description"; paymentRequest.RedirectUrl = this.DefaultRedirectUrl; paymentRequest.Method = paymentMethod; // Set required billing email for Przelewy24 if (paymentRequest is Przelewy24PaymentRequest request) { request.BillingEmail = "*****@*****.**"; } // When: We send the payment request to Mollie PaymentResponse result = await this._paymentClient.CreatePaymentAsync(paymentRequest); // Then: Make sure all requested parameters match the response parameter values Assert.IsNotNull(result); Assert.AreEqual(expectedResponseType, result.GetType()); Assert.AreEqual(paymentRequest.Amount.Currency, result.Amount.Currency); Assert.AreEqual(paymentRequest.Amount.Value, result.Amount.Value); Assert.AreEqual(paymentRequest.Description, result.Description); Assert.AreEqual(paymentRequest.RedirectUrl, result.RedirectUrl); }
public IActionResult Index(/*string searchName,*/ OrderStatus?status, PaymentMethod?paymentMethod, PaymentStatus?paymentStatus, DeliveryOption?deliveryOption) { var orders = _context.Orders.AsQueryable(); if (status.HasValue) { orders = orders.Where(o => o.Status == status); } if (paymentMethod.HasValue) { orders = orders.Where(o => o.PaymentMethod == paymentMethod); } if (paymentStatus.HasValue) { orders = orders.Where(o => o.PaymentStatus == paymentStatus); } if (deliveryOption.HasValue) { orders = orders.Where(o => o.DeliveryOption == deliveryOption); } //if (!string.IsNullOrWhiteSpace(searchName)) //{ // orders = orders.Where(o => o.BillingName.Contains(searchName)); //} ViewBag.Status = new SelectList(SelectListHelper.GetEnumrableList <OrderStatus>(), "Value", "Text", status); ViewBag.paymentMethod = new SelectList(SelectListHelper.GetEnumrableList <PaymentMethod>(), "Value", "Text", paymentMethod); ViewBag.PaymentStatus = new SelectList(SelectListHelper.GetEnumrableList <PaymentStatus>(), "Value", "Text", paymentStatus); ViewBag.DeliveryOption = new SelectList(SelectListHelper.GetEnumrableList <DeliveryOption>(), "Value", "Text", deliveryOption); //ViewBag.SearchName = searchName; return(View(orders)); }
public ActionResult OrderHistory(PaymentMethod?Method) { var query = from o in db.Orders select o; switch (Method) { case PaymentMethod.PopcornPoints: query = query.Where(o => o.PaymentMethod.ToString() == PaymentMethod.PopcornPoints.ToString()); break; case PaymentMethod.CreditCard: query = query.Where(o => o.PaymentMethod.ToString() == PaymentMethod.CreditCard.ToString()); break; default: break; } String UserID = User.Identity.GetUserId(); List <Order> Orders = query.Where(o => o.AppUser.Id == UserID && o.CheckOutStatus == true).ToList(); return(View(Orders)); //List<AppUser> appuser = query.ToList(); }
public Invoice( InvoiceNumber number, DateTime issueDate, DateTime paymentDate, SupplierInfo supplierInfo, Receiver receiver, CurrencyCode currencyCode, ISequence <InvoiceItem> items, bool isSelfBilling = false, bool isCashAccounting = false, PaymentMethod?paymentMethod = null) { Number = number; IssueDate = issueDate; PaymentDate = paymentDate; SupplierInfo = supplierInfo; Receiver = receiver; CurrencyCode = currencyCode; Items = items; DeliveryDate = Items.Values.Max(i => i.Value.ConsumptionDate); ExchangeRate = GetExchangeRate(items); TaxSummary = GetTaxSummary(items); IsSelfBilling = isSelfBilling; IsCashAccounting = isCashAccounting; PaymentMethod = paymentMethod.ToOption(); CheckConsistency(this); }
public PaymentResponse Create(PaymentMethod?paymentMethod) { switch (paymentMethod) { case PaymentMethod.BankTransfer: return(new BankTransferPaymentResponse()); case PaymentMethod.Bitcoin: return(new BitcoinPaymentResponse()); case PaymentMethod.CreditCard: return(new CreditCardPaymentResponse()); case PaymentMethod.Ideal: return(new IdealPaymentResponse()); case PaymentMethod.Bancontact: return(new BancontactPaymentResponse()); case PaymentMethod.PayPal: return(new PayPalPaymentResponse()); case PaymentMethod.PaySafeCard: return(new PaySafeCardPaymentResponse()); case PaymentMethod.Sofort: return(new SofortPaymentResponse()); case PaymentMethod.Belfius: return(new BelfiusPaymentResponse()); case PaymentMethod.DirectDebit: return(new SepaDirectDebitResponse()); case PaymentMethod.Kbc: return(new KbcPaymentResponse()); case PaymentMethod.GiftCard: return(new GiftcardPaymentResponse()); case PaymentMethod.IngHomePay: return(new IngHomePayPaymentResponse()); default: return(new PaymentResponse()); } }
public async Task <IList <Payment> > List(long?id = null, Guid?customerId = null, string transactionNo = null, string name = null, PaymentStatus?status = null, PaymentMode?mode = null, PaymentMethod?method = null, DateTimeOffset?from = null, DateTimeOffset?to = null) { return(await _paymentService.Filter(new PaymentFilter { ID = id, CustomerID = customerId, Name = name, TransactionNo = transactionNo, Status = status, Mode = mode, Method = method, From = from, To = to })); }
/// <summary> /// Позиция товара в чеке /// </summary> /// <param name="name">Наименование товара. Строка, максимальная длина 64 символа. Если в наименовании товара Вы используете специальные символы, например кавычки, то их обязательно необходимо экранировать. </param> /// <param name="quantity">Обязательное поле. Количество/вес конкретной товарной позиции. Десятичное число: целая часть не более 5 знаков, дробная часть не более 3 знаков.</param> /// <param name="sum">Обязательное поле. Полная сумма в рублях за все количество данного товара с учетом всех возможных скидок, бонусов и специальных цен. Десятичное положительное число: целая часть не более 8 знаков, дробная часть не более 2 знаков.</param> /// <param name="paymentMethod">Признак способа расчёта.</param> /// <param name="paymentObject">Признак предмета расчёта.</param> /// <param name="tax">Это поле устанавливает налоговую ставку в ККТ. Определяется для каждого вида товара по отдельности, но за все единицы конкретного товара вместе.</param> /// <param name="nomenclatureCode">Маркировка товара, передаётся в виде кода товара. Максимальная длина – 32 байта (32 символа). Параметр является обязательным только для тех магазинов, которые продают товары подлежащие обязательной маркировке.</param> public ReceiptOrderItem( string name, int quantity, decimal sum, Tax tax, PaymentMethod?paymentMethod, PaymentObject?paymentObject, string nomenclatureCode = null) { Quantity = quantity; Sum = sum; NomenclatureCode = nomenclatureCode; Name = name ?? throw new ArgumentNullException(nameof(name)); PaymentMethod = paymentMethod?.ToSnakeCaseName(); PaymentObject = paymentObject?.ToSnakeCaseName(); Tax = tax.ToSnakeCaseName(); }
private void ParseData() { var tlv = new TypeLengthValue(_buffer); Type stringType = typeof(string); _authCode = (string)tlv.GetValue((byte)RepFieldCode.AuthCode, stringType); _cashbackAmount = (string)tlv.GetValue((byte)RepFieldCode.CashbackAmount, stringType); _gratuityAmount = (string)tlv.GetValue((byte)RepFieldCode.GratuityAmount, stringType); _finalAmount = (string)tlv.GetValue((byte)RepFieldCode.FinalTransactionAmount, stringType); _availableAmount = (string)tlv.GetValue((byte)RepFieldCode.AvailableAmount, stringType); _dccCode = (string)tlv.GetValue((byte)RepFieldCode.DccCurrency, stringType); _dccAmount = (string)tlv.GetValue((byte)RepFieldCode.DccConvertedAmount, stringType); _txnSubType = EnumConverter.FromDescription <TransactionSubTypes>(tlv.GetValue((byte)RepFieldCode.TransactionSubType, stringType)); _dccStatus = (DynamicCurrencyStatus?)tlv.GetValue((byte)RepFieldCode.DccOperationStatus, typeof(DynamicCurrencyStatus?)); _splitSaleAmount = (string)tlv.GetValue((byte)RepFieldCode.SplitSalePaidAmount, stringType); _paymentMethod = (PaymentMethod?)tlv.GetValue((byte)RepFieldCode.PaymentMethod, typeof(PaymentMethod?)); }
public PaymentResponse Create(PaymentMethod?paymentMethod) { switch (paymentMethod) { case PaymentMethod.BankTransfer: return(new BankTransferPaymentResponse()); case PaymentMethod.Bitcoin: return(new BitcoinPaymentResponse()); case PaymentMethod.CreditCard: return(new CreditCardPaymentResponse()); case PaymentMethod.Ideal: return(new IdealPaymentResponse()); case PaymentMethod.MisterCash: return(new MisterCashPaymentResponse()); case PaymentMethod.PayPal: return(new PayPalPaymentResponse()); case PaymentMethod.PaySafeCard: return(new PaySafeCardPaymentResponse()); case PaymentMethod.PodiumCadeaukaart: return(new PodiumCadeauKaartPaymentResponse()); case PaymentMethod.Sofort: return(new SofortPaymentResponse()); case PaymentMethod.Belfius: return(new BelfiusPaymentResponse()); case PaymentMethod.DirectDebit: return(new SepaDirectDebitResponse()); case PaymentMethod.Kbc: return(new KbcPaymentResponse()); default: return(new PaymentResponse()); } }
public QuoteTripRequest(string clientID, Location pickupLocation, DateTime pickupTime, string passengerID = null, string passengerName = null, int?luggage = null, int?persons = null, Location dropoffLocation = null, List <Location> waypoints = null, PaymentMethod?paymentMethod = null, VehicleType?vehicleType = null, double?maxPrice = null, int?minRating = null, string partnerID = null, string fleetID = null, string driverID = null) { this.clientID = clientID; this.passengerID = passengerID; this.passengerName = passengerName; this.pickupLocation = pickupLocation; this.pickupTime = pickupTime; this.dropoffLocation = dropoffLocation; this.waypoints = waypoints; this.paymentMethod = paymentMethod; this.vehicleType = vehicleType; this.maxPrice = maxPrice; this.minRating = minRating; this.partnerID = partnerID; this.fleetID = fleetID; this.driverID = driverID; }
public async Task CanCreateSpecificPaymentType(Type paymentType, PaymentMethod?paymentMethod, Type expectedResponseType) { // If: we create a specific payment type with some bank transfer specific values PaymentRequest paymentRequest = (PaymentRequest)Activator.CreateInstance(paymentType); paymentRequest.Amount = 100; paymentRequest.Description = "Description"; paymentRequest.RedirectUrl = this.DefaultRedirectUrl; paymentRequest.Method = paymentMethod; // When: We send the payment request to Mollie PaymentResponse result = await this._paymentClient.CreatePaymentAsync(paymentRequest); // Then: Make sure all requested parameters match the response parameter values Assert.IsNotNull(result); Assert.AreEqual(expectedResponseType, result.GetType()); Assert.AreEqual(paymentRequest.Amount, result.Amount); Assert.AreEqual(paymentRequest.Description, result.Description); Assert.AreEqual(paymentRequest.RedirectUrl, result.Links.RedirectUrl); }
public ModificationInvoice( InvoiceNumber number, int modificationIndex, int itemIndexOffset, InvoiceNumber originalDocumentNumber, DateTime issueDate, DateTime paymentDate, SupplierInfo supplierInfo, Receiver receiver, CurrencyCode currencyCode, ISequence <InvoiceItem> items, bool isSelfBilling = false, bool isCashAccounting = false, bool modifyWithoutMaster = false, PaymentMethod?paymentMethod = null) : base(number, issueDate, paymentDate, supplierInfo, receiver, currencyCode, items, isSelfBilling, isCashAccounting, paymentMethod) { OriginalDocumentNumber = originalDocumentNumber; ModificationIndex = modificationIndex; ItemIndexOffset = itemIndexOffset; ModifyWithoutMaster = modifyWithoutMaster; }
internal static SalesInvoice FromXml(XmlElement element) { bool allowDiscountorPremium = false; PerformanceType?performanceTypeLine = PerformanceType.Goods; PerformanceType?performanceTypeVat = PerformanceType.Goods; Status status = Status.Default; PaymentMethod? paymentMethod = PaymentMethod.Bank; int invoiceAddressNumber; int deleverAddressNumber; int invoiceNumber; int quantity; int units; var lines = new List <Line>(); XmlNodeList elemListLine = element.GetElementsByTagName("line"); for (int i = 0; i < elemListLine.Count; i++) { if (elemListLine[i].SelectInnerText("article") != null) { if (elemListLine[i].SelectInnerText("allowdiscountorpremium") == "true") { allowDiscountorPremium = true; } if (elemListLine[i].SelectInnerText("performancetype") == PerformanceType.Services.ToString().ToLower()) { performanceTypeLine = PerformanceType.Services; } if (string.IsNullOrEmpty(elemListLine[i].SelectInnerText("performancetype"))) { performanceTypeLine = null; } int.TryParse(elemListLine[i].SelectInnerText("quantity"), out quantity); int.TryParse(elemListLine[i].SelectInnerText("units"), out units); var line = new Line { Article = elemListLine[i].SelectInnerText("article"), Subarticle = elemListLine[i].SelectInnerText("subarticle"), Quantity = quantity, Units = units, Unitspriceexcl = elemListLine[i].SelectInnerText("unitspriceexcl"), Unitspriceinc = elemListLine[i].SelectInnerText("unitspriceinc"), Vatcode = elemListLine[i].SelectInnerText("vatcode"), Allowdiscountorpremium = allowDiscountorPremium, Description = elemListLine[i].SelectInnerText("description"), Performancedate = elemListLine[i].SelectInnerText("performancedate"), Performancetype = performanceTypeLine, Freetext1 = elemListLine[i].SelectInnerText("freetext1"), Freetext2 = elemListLine[i].SelectInnerText("freetext2"), Freetext3 = elemListLine[i].SelectInnerText("freetext3"), Dim1 = elemListLine[i].SelectInnerText("dim1"), Valueexcl = elemListLine[i].SelectInnerText("valueexcl"), Vatvalue = elemListLine[i].SelectInnerText("vatvalue"), Valueinc = elemListLine[i].SelectInnerText("valueinc") }; lines.Add(line); } } var vatlines = new List <Vatline>(); XmlNodeList elemListVatLine = element.GetElementsByTagName("vatline"); for (int i = 0; i < elemListVatLine.Count; i++) { if (elemListVatLine[i].SelectInnerText("vatcode") != null) { if (elemListVatLine[i].SelectInnerText("performancetype") == PerformanceType.Services.ToString().ToLower()) { performanceTypeVat = PerformanceType.Services; } if (string.IsNullOrEmpty(elemListVatLine[i].SelectInnerText("performancetype"))) { performanceTypeVat = null; } var vatLine = new Vatline { Vatcode = elemListVatLine[i].SelectInnerText("vatcode"), Vatvalue = elemListVatLine[i].SelectInnerText("vatvalue"), Performancetype = performanceTypeVat, Performancedate = elemListVatLine[i].SelectInnerText("performancedate") }; vatlines.Add(vatLine); } } if (element.SelectInnerText("header/status") == Status.Concept.ToString().ToLower()) { status = Status.Concept; } if (element.SelectInnerText("header/status") == Status.Final.ToString().ToLower()) { status = Status.Final; } if (element.SelectInnerText("header/paymentmethod") == PaymentMethod.Cash.ToString().ToLower()) { paymentMethod = PaymentMethod.Cash; } if (element.SelectInnerText("header/paymentmethod") == PaymentMethod.Cashondelivery.ToString().ToLower()) { paymentMethod = PaymentMethod.Cashondelivery; } if (element.SelectInnerText("header/paymentmethod") == PaymentMethod.Cheque.ToString().ToLower()) { paymentMethod = PaymentMethod.Cheque; } if (element.SelectInnerText("header/paymentmethod") == PaymentMethod.Da.ToString().ToLower()) { paymentMethod = PaymentMethod.Da; } if (string.IsNullOrWhiteSpace(element.SelectInnerText("header/paymentmethod"))) { paymentMethod = null; } int.TryParse(element.SelectInnerText("header/invoiceaddressnumber"), out invoiceAddressNumber); int.TryParse(element.SelectInnerText("header/deliveraddressnumber"), out deleverAddressNumber); int.TryParse(element.SelectInnerText("header/invoicenumber"), out invoiceNumber); var salesInvoice = new SalesInvoice { Header = new Header { Office = element.SelectInnerText("header/office"), Invoicetype = element.SelectInnerText("header/invoicetype"), Invoicedate = element.SelectInnerText("header/invoicedate"), Duedate = element.SelectInnerText("header/duedate"), Bank = element.SelectInnerText("header/bank"), Customer = element.SelectInnerText("header/customer"), Period = element.SelectInnerText("header/period"), Currency = element.SelectInnerText("header/currency"), Status = status, Paymentmethod = paymentMethod, Invoiceaddressnumber = invoiceAddressNumber, Deliveraddressnumber = deleverAddressNumber, Headertext = element.SelectInnerText("header/headertext"), Footertext = element.SelectInnerText("header/footertext"), Invoicenumber = invoiceNumber }, Lines = new Lines { Line = lines }, Totals = new Totals { Valueexcl = element.SelectInnerText("totals/valueexcl"), Valueinc = element.SelectInnerText("totals/valueinc") }, Vatlines = new Vatlines { Vatline = vatlines } }; if (element.SelectInnerText("header/status") == "final") { salesInvoice.Financials = new Financials { Code = element.SelectInnerText("financials/code"), Number = int.Parse(element.SelectInnerText("financials/number")) }; } return(salesInvoice); }
public async Task <PagedList <Order> > GetAllOrdersAsync(int pageNumber, string search, DeliveryMethod?deliveryMethod, PaymentMethod?paymentMethod, bool?sortByDateDescending) { IQueryable <Order> query = context.Order.Include(p => p.PersonalPickupBranch).OrderBy(o => o.DateTime); if (sortByDateDescending.HasValue && sortByDateDescending.Value) { query = context.Order.OrderByDescending(o => o.DateTime); } if (!search.IsNullOrEmpty()) { var searchUppercased = search.ToUpper(); query = query.Where(o => o.Id.ToString().Contains(searchUppercased) || o.EmailAddress.ToUpper().Contains(searchUppercased)); } if (deliveryMethod.HasValue) { query = query.Where(o => o.DeliveryMethod == deliveryMethod.Value); } if (paymentMethod.HasValue) { query = query.Where(o => o.PaymentMethod == paymentMethod.Value); } return(await PagedList <Order> .Create(query, pageNumber, pageSize)); }
/*******************************************************************************************************/ #region CONSTRUCTORS #endregion CONSTRUCTORS /*******************************************************************************************************/ #region DATABASE METHODS #endregion DATABASE METHODS /*******************************************************************************************************/ #region DATABASE STATIC METHODS public static Guid?add(Guid vendorId, decimal amount, Guid?salePaymentID, string notes, PaymentMethod?paymentMethod) { Guid Id = Guid.NewGuid(); SqlQueryResult result = DBConnection.query( false, DBConnection.ActiveSqlConnection, QueryTypes.ExecuteNonQuery, "VendorDebits_add", new SqlQueryParameter(COL_DB_Id, SqlDbType.UniqueIdentifier, Id), new SqlQueryParameter(COL_DB_Vendors_Id, SqlDbType.UniqueIdentifier, vendorId), new SqlQueryParameter(COL_DB_Amount, SqlDbType.Decimal, amount), new SqlQueryParameter(COL_DB_sale_payment_id, SqlDbType.UniqueIdentifier, Util.wrapNullable(salePaymentID)), new SqlQueryParameter(COL_DB_Type_enumid, SqlDbType.TinyInt, Util.wrapNullable(paymentMethod)), new SqlQueryParameter(COL_DB_Notes, SqlDbType.VarChar, Util.wrapNullable(notes)) ); if (!result.IsSuccessful) { return(null); } else { ActivityLog.submit(vendorId, "Debit: Rp." + amount.ToString("N2")); return(Id); } }
public QuoteTripRequest(string clientID, Location pickupLocation, DateTime pickupTime, string passengerID = null, string passengerName = null, int? luggage = null, int? persons = null, Location dropoffLocation = null, List<Location> waypoints = null, PaymentMethod? paymentMethod = null, VehicleType? vehicleType = null, double? maxPrice = null, int? minRating = null, string partnerID = null, string fleetID = null, string driverID = null) { this.clientID = clientID; this.passengerID = passengerID; this.passengerName = passengerName; this.pickupLocation = pickupLocation; this.pickupTime = pickupTime; this.dropoffLocation = dropoffLocation; this.waypoints = waypoints; this.paymentMethod = paymentMethod; this.vehicleType = vehicleType; this.maxPrice = maxPrice; this.minRating = minRating; this.partnerID = partnerID; this.fleetID = fleetID; this.driverID = driverID; }
public async Task <ActionResult <PagedResult <GetOrderViewModel> > > GetAllOrders([Required] int pageNumber, string search, DeliveryMethod?deliveryMethod, PaymentMethod?paymentMethod, bool?sortByDateDescending) { var orders = await orderRepository.GetAllOrdersAsync(pageNumber, search, deliveryMethod, paymentMethod, sortByDateDescending); return(Ok(new PagedResult <GetOrderViewModel> { CurrentPage = orders.CurrentPage, HasNext = orders.HasNext, TotalPages = orders.TotalPages, Result = orders.Select(o => new GetOrderViewModel(o)) })); }
/*******************************************************************************************************/ #region CONSTRUCTORS #endregion CONSTRUCTORS /*******************************************************************************************************/ #region DATABASE STATIC METHODS public static Guid?submitNew(Guid customerID, decimal creditAmount, Guid?salePaymentID, string notes, PaymentMethod?paymentMethod) { Guid Id = Guid.NewGuid(); SqlQueryResult result = DBConnection.query( false, DBConnection.ActiveSqlConnection, QueryTypes.ExecuteNonQuery, "customercredit_new", new SqlQueryParameter(COL_DB_ID, SqlDbType.UniqueIdentifier, Id), new SqlQueryParameter(COL_DB_CUSTOMERID, SqlDbType.UniqueIdentifier, customerID), new SqlQueryParameter(COL_DB_AMOUNT, SqlDbType.Decimal, creditAmount), new SqlQueryParameter(COL_DB_NOTES, SqlDbType.VarChar, notes), new SqlQueryParameter(COL_DB_SALEPAYMENTID, SqlDbType.UniqueIdentifier, Util.wrapNullable(salePaymentID)), new SqlQueryParameter(COL_DB_USERID, SqlDbType.UniqueIdentifier, GlobalData.UserAccount.id), new SqlQueryParameter(COL_DB_METHODENUMID, SqlDbType.TinyInt, Util.wrapNullable(paymentMethod)) ); if (!result.IsSuccessful) { return(null); } else { ActivityLog.submitCreate(Id); return(Id); } }
public ActionResult SummaryReport(String SearchTitle, String SearchFirstName, String SearchLastName, PaymentMethod?Method, DateTime? SelectedShowingDate, Classification?SelectedClass1, DateTime?SelectedOrderDate, Classification?SelectedClass2) { var query = from o in db.OrderDetails select o; List <OrderDetail> SelectedOds = new List <OrderDetail>(); query = query.Where(o => o.Order.CheckOutStatus == true); query = query.Where(o => o.Order.CancelStatus == CancelStatus.No); if (SearchTitle != null) { query = query.Where(o => o.Showing.Title.Contains(SearchTitle)); } if (SearchFirstName != null) { query = query.Where(o => o.Order.AppUser.FirstName.Contains(SearchFirstName)); } if (SearchLastName != null) { query = query.Where(o => o.Order.AppUser.LastName.Contains(SearchLastName)); } switch (Method) { case PaymentMethod.PopcornPoints: query = query.Where(o => o.Order.PaymentMethod.ToString() == PaymentMethod.PopcornPoints.ToString()); break; case PaymentMethod.CreditCard: query = query.Where(o => o.Order.PaymentMethod.ToString() == PaymentMethod.CreditCard.ToString()); break; default: break; } if (SelectedShowingDate != null) { switch (SelectedClass1) { case Classification.After: query = query.Where(o => o.Showing.Date >= SelectedShowingDate); break; case Classification.Before: query = query.Where(o => o.Showing.Date < SelectedShowingDate); break; case Classification.All: break; } } if (SelectedOrderDate != null) { switch (SelectedClass2) { case Classification.After: query = query.Where(o => o.Order.OrderDate >= SelectedOrderDate); break; case Classification.Before: query = query.Where(o => o.Order.OrderDate < SelectedOrderDate); break; case Classification.All: break; } } Decimal Revenue = 0; foreach (OrderDetail od in query) { Revenue = Revenue + od.MoviePrice; } ViewBag.Revenue = Revenue.ToString(); SelectedOds = query.ToList(); ViewBag.TotalSeats = db.Showings.Count() * 32; ViewBag.SelectedSeats = SelectedOds.Count(); return(View("SummaryReport", SelectedOds)); }
public PartnerTrip(PartnerTrip t) { this.ID = t.ID; this.passengerID = t.passengerID; this.passengerName = t.passengerName; this.origination = t.origination; this.service = t.service; this.luggage = t.luggage; this.persons = t.persons; this.pickupLocation = t.pickupLocation; this.pickupTime = t.pickupTime; this.duration = t.duration; this.dropoffLocation = t.dropoffLocation; this.dropoffTime = t.dropoffTime; this.waypoints = t.waypoints; this.paymentMethod = t.paymentMethod; this.vehicleType = t.vehicleType; this.price = t.price; this.maxPrice = t.maxPrice; this.minRating = t.minRating; this.PartnerFleet = t.PartnerFleet; this.driver = t.driver; this.lastUpdate = t.lastUpdate; this._status = t._status; this.partner = t.partner; this.lastDispatchAttempt = DateTime.MinValue; }
public PartnerTrip(Partner partner, string ID, Origination origination, Location pickupLocation, DateTime pickupTime, PaymentMethod? paymentMethod = null, string passengerID = null, string passengerName = null, Location dropoffLocation = null, DateTime? dropoffTime = null, List<Location> waypoints = null, VehicleType? vehicleType = null, double? maxPrice = null, int? minRating = null, PartnerFleet fleet = null, Driver driver = null, TimeSpan? duration = null, TimeSpan? driverRouteDuration = null, double? price = null) { this.ID = ID; this.origination = origination; this.service = Origination.Local; this.partner = partner; this.passengerID = passengerID; this.passengerName = passengerName; this.pickupLocation = pickupLocation; this.pickupTime = pickupTime; this.duration = duration; this.dropoffLocation = dropoffLocation; this.dropoffTime = dropoffTime; this.waypoints = waypoints; this.paymentMethod = paymentMethod; this.vehicleType = vehicleType; this.maxPrice = maxPrice; this.minRating = minRating; this.PartnerFleet = fleet; this.driver = driver; this.price = price; this.UpdateTripStatus(notifyPartner: false, status: Status.New); }
protected override PaymentResponse Create(Type objectType, JObject jObject) { PaymentMethod?paymentMethod = this.GetPaymentMethod(jObject); return(this._paymentResponseFactory.Create(paymentMethod)); }