public CardService() { m_dalCard = new CardDAL(); m_dalRecharge = new RechargeDAL(); m_dalSaleGas = new SaleGasDAL(); m_dataRequest = null; m_dataResponse = null; }
public string ValidateCardId(string strCardId) { CardDAL dalCard = new CardDAL(); DataTable tblCard = dalCard.ValidateCardID(strCardId); DataTransfer dataResult = new DataTransfer(); if (tblCard.Rows.Count > 0) { dataResult.ResponseCode = DataTransfer.RESPONSE_CODE_SUCCESS; DataSet ds = new DataSet(); ds.Tables.Add(tblCard.Copy()); dataResult.ResponseDataSet = ds; } else { dataResult.ResponseCode = DataTransfer.RESPONSE_CODE_FAIL; dataResult.ResponseErrorMsg = SGMText.GAS_STATION_CARD_ID_NOT_EXIST; } return JSonHelper.ConvertObjectToJSon(dataResult); }
private DataTransfer GasBuyingUpdateCard(string strCardId, int money, int moneyEx) { CardDAL dalCard = new CardDAL(); CardDTO dtoCard = new CardDTO(); dtoCard.CardID = strCardId; dtoCard.CardRemainingMoney = money; dtoCard.CardMoneyEx = moneyEx; return dalCard.UpdateSaleGas(dtoCard); }