public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.WAVE.WAVE_MASTER_MODEL model, params string[] updateProperties)
        {
            Apps.Models.WAVE_MASTER entity = m_Rep.GetById(model.INTERNAL_NUM);
            if (entity == null)
            {
                errors.Add(Resource.Disable);
                return;
            }
            if (updateProperties.Count() <= 0)
            {
                entity.INTERNAL_NUM                = model.INTERNAL_NUM;
                entity.MASTER_NAME                 = model.MASTER_NAME;
                entity.PRIORITY                    = model.PRIORITY;
                entity.SHIPMENT_FILTER             = model.SHIPMENT_FILTER;
                entity.WAVE_MODE                   = model.WAVE_MODE;
                entity.AUTO_RUN                    = model.AUTO_RUN;
                entity.AUTO_RELEASE                = model.AUTO_RELEASE;
                entity.WAVE_FLOW                   = model.WAVE_FLOW;
                entity.CREATE_TASK                 = model.CREATE_TASK;
                entity.SHORT_MODE                  = model.SHORT_MODE;
                entity.MAX_SHIPMENTS               = model.MAX_SHIPMENTS;
                entity.MAX_LINES                   = model.MAX_LINES;
                entity.MAX_ITEMS                   = model.MAX_ITEMS;
                entity.MAX_QTY                     = model.MAX_QTY;
                entity.MAX_WEIGHT                  = model.MAX_WEIGHT;
                entity.MAX_VOLUME                  = model.MAX_VOLUME;
                entity.USER_DEF1                   = model.USER_DEF1;
                entity.USER_DEF2                   = model.USER_DEF2;
                entity.USER_DEF3                   = model.USER_DEF3;
                entity.USER_DEF4                   = model.USER_DEF4;
                entity.USER_DEF5                   = model.USER_DEF5;
                entity.USER_DEF6                   = model.USER_DEF6;
                entity.USER_DEF7                   = model.USER_DEF7;
                entity.USER_DEF8                   = model.USER_DEF8;
                entity.USER_STAMP                  = model.USER_STAMP;
                entity.DATE_TIME_STAMP             = model.DATE_TIME_STAMP;
                entity.ACTIVE                      = model.ACTIVE;
                entity.CONTAINER_CREATION_CRITERIA = model.CONTAINER_CREATION_CRITERIA;
            }
            else
            {
                Type type  = typeof(Apps.Models.SCV.WAVE.WAVE_MASTER_MODEL);
                Type typeE = typeof(Apps.Models.WAVE_MASTER);
                foreach (var item in updateProperties)
                {
                    System.Reflection.PropertyInfo pi  = type.GetProperty(item);
                    System.Reflection.PropertyInfo piE = typeE.GetProperty(item);
                    piE.SetValue(entity, pi.GetValue(model), null);
                }
            }


            m_Rep.Modify(entity, updateProperties);
        }
        public virtual Apps.Models.SCV.WAVE.WAVE_MASTER_MODEL GetById(string id)
        {
            Apps.Models.WAVE_MASTER entity = m_Rep.GetById(id);
            if (entity != null)
            {
                //WAVE_MASTER entity = m_Rep.GetById(id);
                Apps.Models.SCV.WAVE.WAVE_MASTER_MODEL model = new Apps.Models.SCV.WAVE.WAVE_MASTER_MODEL();
                model.INTERNAL_NUM                = entity.INTERNAL_NUM;
                model.MASTER_NAME                 = entity.MASTER_NAME;
                model.PRIORITY                    = entity.PRIORITY;
                model.SHIPMENT_FILTER             = entity.SHIPMENT_FILTER;
                model.WAVE_MODE                   = entity.WAVE_MODE;
                model.AUTO_RUN                    = entity.AUTO_RUN;
                model.AUTO_RELEASE                = entity.AUTO_RELEASE;
                model.WAVE_FLOW                   = entity.WAVE_FLOW;
                model.CREATE_TASK                 = entity.CREATE_TASK;
                model.SHORT_MODE                  = entity.SHORT_MODE;
                model.MAX_SHIPMENTS               = entity.MAX_SHIPMENTS;
                model.MAX_LINES                   = entity.MAX_LINES;
                model.MAX_ITEMS                   = entity.MAX_ITEMS;
                model.MAX_QTY                     = entity.MAX_QTY;
                model.MAX_WEIGHT                  = entity.MAX_WEIGHT;
                model.MAX_VOLUME                  = entity.MAX_VOLUME;
                model.USER_DEF1                   = entity.USER_DEF1;
                model.USER_DEF2                   = entity.USER_DEF2;
                model.USER_DEF3                   = entity.USER_DEF3;
                model.USER_DEF4                   = entity.USER_DEF4;
                model.USER_DEF5                   = entity.USER_DEF5;
                model.USER_DEF6                   = entity.USER_DEF6;
                model.USER_DEF7                   = entity.USER_DEF7;
                model.USER_DEF8                   = entity.USER_DEF8;
                model.USER_STAMP                  = entity.USER_STAMP;
                model.DATE_TIME_STAMP             = entity.DATE_TIME_STAMP;
                model.ACTIVE                      = entity.ACTIVE;
                model.CONTAINER_CREATION_CRITERIA = entity.CONTAINER_CREATION_CRITERIA;

                return(model);
            }
            else
            {
                return(null);
            }
        }
        public virtual void Create(ref ValidationErrors errors, Apps.Models.SCV.WAVE.WAVE_MASTER_MODEL model)
        {
            Apps.Models.WAVE_MASTER entity = m_Rep.GetById(model.INTERNAL_NUM);
            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity = new Apps.Models.WAVE_MASTER();
            entity.INTERNAL_NUM                = model.INTERNAL_NUM;
            entity.MASTER_NAME                 = model.MASTER_NAME;
            entity.PRIORITY                    = model.PRIORITY;
            entity.SHIPMENT_FILTER             = model.SHIPMENT_FILTER;
            entity.WAVE_MODE                   = model.WAVE_MODE;
            entity.AUTO_RUN                    = model.AUTO_RUN;
            entity.AUTO_RELEASE                = model.AUTO_RELEASE;
            entity.WAVE_FLOW                   = model.WAVE_FLOW;
            entity.CREATE_TASK                 = model.CREATE_TASK;
            entity.SHORT_MODE                  = model.SHORT_MODE;
            entity.MAX_SHIPMENTS               = model.MAX_SHIPMENTS;
            entity.MAX_LINES                   = model.MAX_LINES;
            entity.MAX_ITEMS                   = model.MAX_ITEMS;
            entity.MAX_QTY                     = model.MAX_QTY;
            entity.MAX_WEIGHT                  = model.MAX_WEIGHT;
            entity.MAX_VOLUME                  = model.MAX_VOLUME;
            entity.USER_DEF1                   = model.USER_DEF1;
            entity.USER_DEF2                   = model.USER_DEF2;
            entity.USER_DEF3                   = model.USER_DEF3;
            entity.USER_DEF4                   = model.USER_DEF4;
            entity.USER_DEF5                   = model.USER_DEF5;
            entity.USER_DEF6                   = model.USER_DEF6;
            entity.USER_DEF7                   = model.USER_DEF7;
            entity.USER_DEF8                   = model.USER_DEF8;
            entity.USER_STAMP                  = model.USER_STAMP;
            entity.DATE_TIME_STAMP             = model.DATE_TIME_STAMP;
            entity.ACTIVE                      = model.ACTIVE;
            entity.CONTAINER_CREATION_CRITERIA = model.CONTAINER_CREATION_CRITERIA;

            m_Rep.Create(entity);
        }