コード例 #1
0
ファイル: SaleGasServiceBLL.cs プロジェクト: tuanly/SGM
        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));
        }
コード例 #2
0
ファイル: SaleGasServiceBLL.cs プロジェクト: tuanly/SGM
        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);
        }
コード例 #3
0
 public GasStoreServiceBLL()
 {
     m_dataRequest  = null;
     m_dataResponse = null;
     m_dalGasStore  = new GasStoreDAL();
 }