Exemplo n.º 1
0
        public static AddressDE Translate(this AddressDE src, AddressDE dest)
        {
            dest.AddressLine1 = src.AddressLine1;
            dest.AddressLine2 = src.AddressLine2;
            dest.AreaCode = src.AreaCode;
            dest.AreaName = src.AreaName;
            dest.CityCode = src.CityCode;
            dest.CityName = src.CityName;
            dest.CountryCode = src.CountryCode;
            dest.CountryName = src.CountryName;
            dest.RegionCode = src.RegionCode;
            dest.RegionName = src.RegionName;

            return dest;
        }
Exemplo n.º 2
0
        public AddressDE TranslateNames(AddressDE mod)
        {
            RegionDE region = CachedRegions.Where(m => m.RegionCode == mod.RegionCode).FirstOrDefault();
            if (region != null)
               mod.RegionName = region.RegionName;

            CityDE city = CachedCities.Where(m => m.CityCode == mod.CityCode).FirstOrDefault();
            if (city != null)
                mod.CityName = city.CityName;

            AreaDE area = CachedAreas.Where(m => m.AreaCode == mod.AreaCode).FirstOrDefault();
            if (area != null)
                mod.AreaName = area.AreaName;

            return mod;
        }
Exemplo n.º 3
0
        //[TestMethod]
        public void AddEntity()
        {
            _bdmSvc = new BDMService();
            EntityDE ety = new EntityDE();
            ety.EntityName = "Imran Farooq";
            ety.EntityTypeCode = EntityTypes.MGR.ToString();
            ety.SiteCode = AppConstants.SITE_CODE;

            AddressDE add = new AddressDE(AddressTypes.Personal.ToString());
            add.AddressLine1 = "St. Ahmad Din Sipahi";
            add.AddressLine2 = "Moh. Fatu Pura, Gujrat";

            ContactDE contact = new ContactDE();
            contact.Mobile1 = "0333-348343499";

            ety.Addresses.Add(add);
            ety.Contacts.Add(contact);

            decimal retVal = _bdmSvc.AddEntity(ety);
        }
Exemplo n.º 4
0
 public ManagerViewModel()
 {
     Address = new AddressDE();
     Contact = new ContactDE();
     Manager = new EntityDE(EntityTypes.MGR);
     Managers = new List<EntityView>();
     Cities = new List<CityDE>();
     Areas = new List<AreaDE>();
     Regions = new List<RegionDE>();
 }
Exemplo n.º 5
0
 public void Translate(AddressDE src, ref AddressDE dest)
 {
     dest.RegionCode = src.RegionCode;
     dest.RegionName = src.RegionName;
     dest.CityCode = src.CityCode;
     dest.CityName = src.CityName;
     dest.AreaCode = src.AreaCode;
     dest.AreaName = src.AreaName;
 }