예제 #1
0
        public static CashUnit convertToCashUnit(WFSCDMCASHUNIT item)
        {
            CashUnit unit = new CashUnit();

            unit.bAppLock         = item.bAppLock;
            unit.cCurrencyID      = item.cCurrencyID;
            unit.cUnitID          = item.cUnitID;
            unit.szCashUnitName   = item.szCashUnitName;
            unit.ulCount          = item.ulCount;
            unit.ulInitialCount   = item.ulInitialCount;
            unit.ulMaximum        = item.ulMaximum;
            unit.ulMinimum        = item.ulMinimum;
            unit.ulRejectCount    = item.ulRejectCount;
            unit.ulValues         = item.ulValues;
            unit.usNumber         = item.usNumber;
            unit.usNumPhysicalCUs = item.usNumPhysicalCUs;
            unit.usStatus         = item.usStatus;
            unit.usType           = item.usType;

            if (item.usNumPhysicalCUs > 0)
            {
                unit.PhysicalCashUnits = XFSUtil.XFSPtrToArray <WFSCDMPHCU>(item.lppPhysical, item.usNumPhysicalCUs);
            }
            else
            {
                unit.PhysicalCashUnits = new WFSCDMPHCU[0];
            }

            return(unit);
        }
예제 #2
0
        public IntPtr Marshal(CashInfoObject cashInfo)
        {
            WFS_CDM_CashUnit_INFO dto = new WFS_CDM_CashUnit_INFO();

            dto.usCount    = cashInfo.usCount;
            dto.usTellerID = cashInfo.TellerID;
            WFSCDMCASHUNIT[] cashunitstructs = new WFSCDMCASHUNIT[cashInfo.CashUnits.Length];
            for (int i = 0; i < cashInfo.CashUnits.Length; i++)
            {
                cashunitstructs[i] = CashUnit.convertToWFSCDMCASHUNIT(cashInfo.CashUnits[i]);
            }

            dto.lppList = XFSUtil.XFSArrayToPTR <WFSCDMCASHUNIT>(cashunitstructs);
            return(XFSUtil.StructureToPtr <WFS_CDM_CashUnit_INFO>(dto));
        }
예제 #3
0
        public static WFSCDMCASHUNIT convertToWFSCDMCASHUNIT(CashUnit cashUnit)
        {
            WFSCDMCASHUNIT dtoCashUnit = new WFSCDMCASHUNIT();

            dtoCashUnit.bAppLock         = cashUnit.bAppLock;
            dtoCashUnit.cCurrencyID      = cashUnit.cCurrencyID;
            dtoCashUnit.cUnitID          = cashUnit.cUnitID;
            dtoCashUnit.szCashUnitName   = cashUnit.szCashUnitName;
            dtoCashUnit.ulCount          = cashUnit.ulCount;
            dtoCashUnit.ulInitialCount   = cashUnit.ulInitialCount;
            dtoCashUnit.ulMaximum        = cashUnit.ulMaximum;
            dtoCashUnit.ulMinimum        = cashUnit.ulMinimum;
            dtoCashUnit.ulRejectCount    = cashUnit.ulRejectCount;
            dtoCashUnit.ulValues         = cashUnit.ulValues;
            dtoCashUnit.usNumber         = cashUnit.usNumber;
            dtoCashUnit.usNumPhysicalCUs = cashUnit.usNumPhysicalCUs;
            dtoCashUnit.usStatus         = cashUnit.usStatus;
            dtoCashUnit.usType           = cashUnit.usType;
            dtoCashUnit.lppPhysical      = XFSUtil.XFSArrayToPTR <WFSCDMPHCU>(cashUnit.PhysicalCashUnits);
            return(dtoCashUnit);
        }