public virtual void Modify(ref ValidationErrors errors, Apps.Models.SCV.SHIPMENT.SHIPMENT_CARRIER_EDITRULE_MODEL model, params string[] updateProperties)
        {
            Apps.Models.SHIPMENT_CARRIER_EDITRULE entity = m_Rep.GetById(model.Id);
            if (entity == null)
            {
                errors.Add(Resource.Disable);
                return;
            }
            if (updateProperties.Count() <= 0)
            {
                entity.Id        = model.Id;
                entity.Company   = model.Company;
                entity.Provinces = model.Provinces;
                entity.Carrier   = model.Carrier;
            }
            else
            {
                Type type  = typeof(Apps.Models.SCV.SHIPMENT.SHIPMENT_CARRIER_EDITRULE_MODEL);
                Type typeE = typeof(Apps.Models.SHIPMENT_CARRIER_EDITRULE);
                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 void Create(ref ValidationErrors errors, Apps.Models.SCV.SHIPMENT.SHIPMENT_CARRIER_EDITRULE_MODEL model)
        {
            Apps.Models.SHIPMENT_CARRIER_EDITRULE entity = m_Rep.GetById(model.Id);
            if (entity != null)
            {
                errors.Add(Resource.PrimaryRepeat);
                return;
            }
            entity           = new Apps.Models.SHIPMENT_CARRIER_EDITRULE();
            entity.Id        = model.Id;
            entity.Company   = model.Company;
            entity.Provinces = model.Provinces;
            entity.Carrier   = model.Carrier;

            m_Rep.Create(entity);
        }
        public virtual Apps.Models.SCV.SHIPMENT.SHIPMENT_CARRIER_EDITRULE_MODEL GetById(string id)
        {
            Apps.Models.SHIPMENT_CARRIER_EDITRULE entity = m_Rep.GetById(id);
            if (entity != null)
            {
                //SHIPMENT_CARRIER_EDITRULE entity = m_Rep.GetById(id);
                Apps.Models.SCV.SHIPMENT.SHIPMENT_CARRIER_EDITRULE_MODEL model = new Apps.Models.SCV.SHIPMENT.SHIPMENT_CARRIER_EDITRULE_MODEL();
                model.Id        = entity.Id;
                model.Company   = entity.Company;
                model.Provinces = entity.Provinces;
                model.Carrier   = entity.Carrier;

                return(model);
            }
            else
            {
                return(null);
            }
        }