Beispiel #1
0
        public void ConvertTo(LegalEntityLegalRepresentativeView legalEntityLegalRepresentativeView, LegalEntityLegalRepresentative legalEntityLegalRepresentative)
        {
            legalEntityLegalRepresentative.LegalEntityFK         = legalEntityLegalRepresentativeView.LegalEntityFK;
            legalEntityLegalRepresentative.WayOfRepresentationFK = legalEntityLegalRepresentativeView.WayOfRepresentationFK;
            legalEntityLegalRepresentative.LegalRepresentativeFK = legalEntityLegalRepresentativeView.LegalRepresentativeFK;

            legalEntityLegalRepresentative.ChangeDate = legalEntityLegalRepresentativeView.ChangeDate;

            legalEntityLegalRepresentative.Deleted = legalEntityLegalRepresentativeView.Deleted;
        }
Beispiel #2
0
        public void BindDDLs(LegalEntityLegalRepresentativeView legalEntityLegalRepresentativeView, ObjectContext db)
        {
            //way of representation ddl
            IWaysOfRepresentationRepository wayOfRepresentationView = new WaysOfRepresentationRepository(db);

            legalEntityLegalRepresentativeView.WaysOfRepresentation = new SelectList(wayOfRepresentationView.GetValid().OrderBy("Name ASC").ToList(), "WayOfRepresentationPK", "Name");

            //physicalEntity ddl
            PhysicalEntityView          PhysicalEntityView         = new PhysicalEntityView();
            IPhysicalEntitiesRepository physicalEntitiesRepository = new PhysicalEntitiesRepository(db);

            legalEntityLegalRepresentativeView.LegalRepresentatives = new SelectList(PhysicalEntityView.GetPhysicalEntitySelect(physicalEntitiesRepository.GetValid()).ToList(), "PhysicalEntityPK", "Name");
        }
Beispiel #3
0
        public void ConvertFrom(LegalEntityLegalRepresentative legalEntityLegalRepresentative, LegalEntityLegalRepresentativeView legalEntityLegalRepresentativeView, ObjectContext db)
        {
            legalEntityLegalRepresentativeView.LegalEntityLegalRepresentativePK = legalEntityLegalRepresentative.LegalEntityLegalRepresentativePK;

            legalEntityLegalRepresentativeView.LegalEntityFK         = legalEntityLegalRepresentative.LegalEntityFK;
            legalEntityLegalRepresentativeView.WayOfRepresentationFK = legalEntityLegalRepresentative.WayOfRepresentationFK;
            legalEntityLegalRepresentativeView.LegalRepresentativeFK = legalEntityLegalRepresentative.LegalRepresentativeFK;

            legalEntityLegalRepresentativeView.Deleted = legalEntityLegalRepresentative.Deleted;

            ILegalEntitiesRepository legalEntitiesRepository = new LegalEntitiesRepository(db);
            LegalEntity legalEntity = legalEntitiesRepository.GetLegalEntityByPK((int)legalEntityLegalRepresentative.LegalEntityFK);

            legalEntityLegalRepresentativeView.LegalEntityName = legalEntity.Name + " (" + legalEntity.OIB + ")";
        }