//private void GetVehicleBrandName(AnalyseRecord record, ref string brand, ref string model)
        //{
        //    brand =  "未识别" ;
        //    model =  "未识别" ;

        //    if (record.BrandInfo != null)
        //    {
        //        model = record.BrandInfo.Name;
        //        if (record.ParentBrandInfo != null)
        //        {
        //            brand = record.ParentBrandInfo.Name;
        //        }
        //        else
        //        {
        //            brand = string.Empty;
        //        }
        //    }
        //}

        private void GetVehicleBrandName(AnalyseRecord record, out VehiclePropertyInfo brand, out VehiclePropertyInfo model)
        {
            brand = Constant.PropertyInfo_UNKNOWN;
            model = Constant.PropertyInfo_UNKNOWN;

            if (record.BrandInfo != null)
            {
                if (record.ParentBrandInfo != null)
                {
                    if (record.ParentBrandInfo.ID == 999)
                    {
                        // 被归到其它车厂商的车, 车厂家设置成与车型一样
                        brand = model = record.BrandInfo;
                    }
                    else
                    {
                        brand = record.ParentBrandInfo;
                        model = record.BrandInfo;
                    }
                }
                else
                {
                    // brand = Constant.PropertyInfo_UNKNOWN;
                    brand = model = record.BrandInfo;
                }
            }
        }
        public void GetVehicleBrandName(out VehiclePropertyInfo brand, out VehiclePropertyInfo model)
        {
            brand = Constant.PropertyInfo_UNKNOWN;
            model = Constant.PropertyInfo_UNKNOWN;

            if (this.BrandInfo != null)
            {
                if (this.ParentBrandInfo != null)
                {
                    if (this.ParentBrandInfo.ID == 999)
                    {
                        // 被归到其它车厂商的车, 车厂家设置成与车型一样
                        brand = model = this.BrandInfo;
                    }
                    else
                    {
                        brand = this.ParentBrandInfo;
                        model = this.BrandInfo;
                    }
                }
                else
                {
                    // brand = Constant.PropertyInfo_UNKNOWN;
                    brand = model = this.BrandInfo;
                }
            }
        }
 public void Save()
 {
     // 这里可以考虑从数据库重新load, 保证一致
     if (m_DTAnalyseResults.Rows != null && m_DTAnalyseResults.Rows.Count > 0)
     {
         AnalyseRecord record;
         foreach (DataRow row in m_DTAnalyseResults.Rows)
         {
             record                       = row["AnalyseRecord"] as AnalyseRecord;
             record.PlateNumber           = row["PlateNumber"].ToString();
             record.ErrorCode             = 0;
             record.VehicleTypeInfo       = row["VehicleType"] as VehiclePropertyInfo;
             record.DetailVehicleTypeInfo = row["DetailVehicleType"] as VehiclePropertyInfo;
             // row["Brand"] as ModelPropertyInfo;
             VehiclePropertyInfo mpi = row["Model"] as VehiclePropertyInfo;
             if (mpi != null && mpi != Constant.PropertyInfo_UNKNOWN)
             {
                 record.BrandInfo = mpi;
             }
             else
             {
                 // 没有型号时, 直接使用车厂家
                 record.BrandInfo = row["Brand"] as VehiclePropertyInfo;
             }
             record.ParentBrandInfo         = row["Brand"] as VehiclePropertyInfo;
             record.VehicleColorInfo        = row["VehicleColor"] as VehiclePropertyInfo;
             record.PlateTypeInfo           = row["PlateType"] as VehiclePropertyInfo;
             record.PlateColorInfo          = row["PlateColor"] as VehiclePropertyInfo;
             record.DriverWearingSafeBelt   = row["DriverBeltWearing"] as VehiclePropertyInfo;
             record.CoDriverWearingSafeBelt = row["CoDriverBeltWearing"] as VehiclePropertyInfo;
             record.DriverPhoneCalling      = row["DriverPhoneCall"] as VehiclePropertyInfo;
             record.DriverSunlightShield    = row["DriverShielding"] as VehiclePropertyInfo;
             record.CoDriverSunlightShield  = row["CoDriverShielding"] as VehiclePropertyInfo;
         }
         //Framework.Container.Instance.TaskManager.SaveAnalyseResults(m_Records);
     }
 }