Esempio n. 1
0
        public string ValidateGasStationLogin(string stGasStationID, string stGasStationMacAddress)
        {
            GasStationDAL dalGasStation = new GasStationDAL();
            DataTransfer response = dalGasStation.ValidateGasStationLogin(stGasStationID, stGasStationMacAddress);

            if (response.ResponseCode == DataTransfer.RESPONSE_CODE_SUCCESS)
            {
                SystemAdminDAL dalSystemAdmin = new SystemAdminDAL();
                DataTransfer responseAdmin = dalSystemAdmin.GetCurrentPrice(SystemAdminDTO.GAS_TYPE_ALL);
                response.ResponseCurrentPriceGas92 = responseAdmin.ResponseCurrentPriceGas92;
                response.ResponseCurrentPriceGas95 = responseAdmin.ResponseCurrentPriceGas95;
                response.ResponseCurrentPriceGasDO = responseAdmin.ResponseCurrentPriceGasDO;
                response.ResponseDataSystemAdminDTO = responseAdmin.ResponseDataSystemAdminDTO;

                GasStoreDAL dalGasStore = new GasStoreDAL();
                DataTransfer responseGasStore = dalGasStore.GetGasStoreFromGasStation(stGasStationID);
                response.ResponseDataGasStoreDTO = responseGasStore.ResponseDataGasStoreDTO;
                response.ResponseGasStoreGas92Total = responseGasStore.ResponseDataGasStoreDTO.GasStoreGas92Total;
                response.ResponseGasStoreGas95Total = responseGasStore.ResponseDataGasStoreDTO.GasStoreGas95Total;
                response.ResponseGasStoreGasDOTotal = responseGasStore.ResponseDataGasStoreDTO.GasStoreGasDOTotal;
            }

            return JSonHelper.ConvertObjectToJSon(response);
        }
Esempio n. 2
0
 public string GetCurrentPrice(int iGasType)
 {
     SystemAdminDAL dalSystemAd = new SystemAdminDAL();
     DataTransfer response = dalSystemAd.GetCurrentPrice(iGasType);
     return JSonHelper.ConvertObjectToJSon(response);
 }