public MaterialItem MapEntityToObject(TWMMATLITEM entity)
        {
            if (entity != null)
            {
                MaterialItem obj = new MaterialItem();

                obj.NO_MATL_ITEM       = entity.NO_MATL_ITEM;
                obj.AMT_MATL_ITEM      = (decimal)entity.AMT_MATL_ITEM;
                obj.AMT_SALVAGE        = (decimal)entity.AMT_SALVAGE;
                obj.AMT_SCRAP          = (decimal)entity.AMT_SCRAP;
                obj.CD_MATL_CLASS      = entity.CD_MATL_CLASS;
                obj.CD_UOM             = entity.CD_UOM;
                obj.DS_MATL_ITEM       = entity.DS_MATL_ITEM;
                obj.DY_LEAD_TIME       = entity.DY_LEAD_TIME;
                obj.FG_ACTIVE          = entity.FG_ACTIVE;
                obj.FG_PREV_CAPITALIZE = entity.FG_PREV_CAPITALIZE;
                obj.FG_STOCK_ITEM      = entity.FG_STOCK_ITEM;
                obj.PC_ALLOWANCE       = (decimal)entity.PC_ALLOWANCE;
                obj.QT_MIN             = (decimal)entity.QT_MIN;
                obj.FG_TRUCK_STOCK     = entity.FG_TRUCK_STOCK;
                obj.FG_MAJOR           = entity.FG_MAJOR;
                obj.FG_ASSET           = entity.FG_ASSET;
                obj.CD_STOCKING        = entity.CD_STOCKING;
                obj.TS_LAST_CHANGED    = entity.TS_LAST_CHANGED;

                return(obj);
            }

            return(null);
        }
        public MaterialItem Get(TWMMATLITEM entity)
        {
            if (entity != null)
            {
                MaterialItem obj = MapEntityToObject(entity);

                return(obj);
            }

            return(null);
        }