public JsonResult GetSensorFilterValues() { var eventFactory = new EventModelFactory(Session[Constants.Security.ConnectionStringSessionVariableName].ToString()); var transFactory = new CustomerTransactionFactory(Session[Constants.Security.ConnectionStringSessionVariableName].ToString()); // Execute the queries //cashbox and gateways are invalid for transactions, so remove the items with the correct metergroup //this is why we are using tans factory instead of event factory var assetTypes = transFactory.GetAssetTypeFilterItems(CurrentCity.Id); var timeTypes = eventFactory.GetTimeTypesFilterItems(); var paymentStatusTypes = transFactory.GetPaymentStatusReleventFilterItems(); //var transactionTypes = transFactory.GetTransactionTypesFilterItems(); var transactionTypes = transFactory.GetTransactionTypesFilterOnlySensor(); //customer specific card types var cardTypes = transFactory.GetCardTypes(CurrentCity.Id); // Concatenate the data into an anonymous typed object var filterValues = new { timeTypes, assetTypes, paymentStatusTypes, transactionTypes, cardTypes }; // return as JSON return(Json(filterValues, JsonRequestBehavior.AllowGet)); }
public ActionResult SensorDetails(int txId, int sensorPmtTxId) { CustomerTransactionFactory factory = new CustomerTransactionFactory(Session[Constants.Security.ConnectionStringSessionVariableName].ToString()); var customerTransactionSensorModel = factory.GetSensorTransaction(txId, sensorPmtTxId, CurrentCity.Id); if (customerTransactionSensorModel == null) { ModelState.AddModelError("NoTransactionFound", "No transaction matching that criteria found or transaction does not belong to current client"); } return(View(customerTransactionSensorModel)); }