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
        private DataTransfer GasBuyingUpdateGasStore(SaleGasDTO saleGasDTO)
        {
            GasStoreDAL  dal    = new GasStoreDAL();
            float        money  = saleGasDTO.SaleGasCardMoneyBefore - saleGasDTO.SaleGasCardMoneyAfter;
            float        amount = money / saleGasDTO.SaleGasCurrentPrice;
            DataTransfer res    = dal.UpdateGasStoreTotal(saleGasDTO.GasStoreID, saleGasDTO.SaleGasType, amount);

            return(res);
        }
Esempio n. 3
0
 public GasStoreServiceBLL()
 {
     m_dataRequest  = null;
     m_dataResponse = null;
     m_dalGasStore  = new GasStoreDAL();
 }