module fb { export class DupliceraMaeklarobjektWO extends ResourceBase { MaeklarObjektIdAttKopiera: ChangeTrack; KopieraMedSaeljare: ChangeTrack; Dupliceringstyp: ChangeTrack; KopieraAnteckningar: ChangeTrack; KopieraBilder: ChangeTrack; KopieraDokument: ChangeTrack; KopieraInterioerOchSaeljbeskrivning: ChangeTrack; KopieraLaan: ChangeTrack; KopieraDriftskostnader: ChangeTrack; KopieraEnergideklaration: ChangeTrack; AerFastighet: ChangeTrack; AnsvarigMaeklarePersonId: ChangeTrack; IntagarePersonId: ChangeTrack; UppdragTyp: ChangeTrack; IntagskaellaId: ChangeTrack; DatumForIntagsforsok: ChangeTrack; TidFoerIntagsfoersoek: ChangeTrack; SaeljareId: ChangeTrack; DatumFoerIntagsfoersoekEjBestaemt: ChangeTrack; AdressText: ChangeTrack; Fastighetsbeteckning: ChangeTrack; KopieraInteSomObjektIProjekt: ChangeTrack; // funkar? KopieraTillKontorMedId: ChangeTrack; constructor(data: any) { // Vill inte slå på validering på en gång utan först senare super(data, true, undefined, undefined, false, true); this.MaeklarObjektIdAttKopiera = new fb.ChangeTrack(null, this, 'MaeklarObjektIdAttKopiera'); this.KopieraMedSaeljare = new fb.ChangeTrack(null, this, 'KopieraMedSaeljare'); this.Dupliceringstyp = new fb.ChangeTrack(null, this, 'Dupliceringstyp'); this.KopieraAnteckningar = new fb.ChangeTrack(false, this, 'KopieraAnteckningar'); this.KopieraBilder = new fb.ChangeTrack(false, this, 'KopieraBilder'); this.KopieraDokument = new fb.ChangeTrack(false, this, 'KopieraDokument'); this.KopieraInterioerOchSaeljbeskrivning = new fb.ChangeTrack(false, this, 'KopieraInterioerOchSaeljbeskrivning'); this.KopieraLaan = new fb.ChangeTrack(false, this, 'KopieraLaan'); this.KopieraDriftskostnader = new fb.ChangeTrack(false, this, 'KopieraDriftskostnader'); this.KopieraEnergideklaration = new fb.ChangeTrack(false, this, 'KopieraEnergideklaration'); this.AerFastighet = new fb.ChangeTrack(false, this, 'AerFastighet'); this.AnsvarigMaeklarePersonId = new fb.ChangeTrack(null, this, 'AnsvarigMaeklarePersonId'); this.IntagarePersonId = new fb.ChangeTrack(null, this, 'IntagarePersonId'); this.UppdragTyp = new fb.ChangeTrack(fb.FasITDomain.UppdragTyp.FOERSAELJNING, this, 'UppdragTyp'); this.IntagskaellaId = new fb.ChangeTrack(null, this, 'IntagskaellaId'); this.DatumForIntagsforsok = new fb.ChangeTrack(null, this, 'DatumForIntagsforsok'); this.TidFoerIntagsfoersoek = new fb.ChangeTrack(null, this, 'TidFoerIntagsfoersoek'); this.DatumFoerIntagsfoersoekEjBestaemt = new fb.ChangeTrack(false, this, 'DatumFoerIntagsfoersoekEjBestaemt'); this.SaeljareId = new fb.ChangeTrack(null, this, 'SaeljareId'); this.KopieraInteSomObjektIProjekt = new fb.ChangeTrack(null, this, 'KopieraInteSomObjektIProjekt'); this.KopieraTillKontorMedId = new fb.ChangeTrack(null, this, 'KopieraTillKontorMedId'); this.validation(); } validation() { //den kommer inte att göras valid utan det här ivf. Och tooltipen ser ut som skit :) //this.Dupliceringstyp.required = true; //this.Dupliceringstyp.valid = fb.changeTrackValid(this.Dupliceringstyp); this.KopieraAnteckningar.required = true; this.KopieraAnteckningar.valid = fb.changeTrackValid(this.KopieraAnteckningar); this.KopieraBilder.required = true; this.KopieraBilder.valid = fb.changeTrackValid(this.KopieraBilder); this.KopieraDokument.required = true; this.KopieraDokument.valid = fb.changeTrackValid(this.KopieraDokument); this.KopieraInterioerOchSaeljbeskrivning.required = true; this.KopieraInterioerOchSaeljbeskrivning.valid = fb.changeTrackValid(this.KopieraInterioerOchSaeljbeskrivning); this.KopieraLaan.required = true; this.KopieraLaan.valid = fb.changeTrackValid(this.KopieraLaan); this.KopieraDriftskostnader.required = true; this.KopieraDriftskostnader.valid = fb.changeTrackValid(this.KopieraDriftskostnader); this.KopieraEnergideklaration.required = true; this.KopieraEnergideklaration.valid = fb.changeTrackValid(this.KopieraEnergideklaration); this.AerFastighet.required = true; this.AerFastighet.valid = fb.changeTrackValid(this.AerFastighet); this.AnsvarigMaeklarePersonId.required = true; this.AnsvarigMaeklarePersonId.valid = fb.changeTrackValid(this.AnsvarigMaeklarePersonId); this.UppdragTyp.required = true; this.UppdragTyp.valid = fb.changeTrackValid(this.UppdragTyp); this.IntagskaellaId.required = true; this.IntagskaellaId.valid = fb.changeTrackValid(this.IntagskaellaId); this.DatumForIntagsforsok.customValidation = function (track: fb.ChangeTrack) { var root: fb.DupliceraMaeklarobjektWO = track.root; return root.DatumForIntagsforsok.value || root.DatumFoerIntagsfoersoekEjBestaemt.value; } this.DatumForIntagsforsok.customValidationErrorMessage = 'SIDEDRAWER_DUPLICERA_MAEKLAROBJEKT' + '.REQUIRED_DATE_TYP'; this.DatumFoerIntagsfoersoekEjBestaemt.customValidation = function (track: fb.ChangeTrack) { var root: fb.DupliceraMaeklarobjektWO = track.root; if (track.value === true) { root.DatumForIntagsforsok.setValue(null); root.TidFoerIntagsfoersoek.setValue(null); } root.applyValue(root.DatumForIntagsforsok); return true; } this.DatumForIntagsforsok.valid = fb.changeTrackValid(this.DatumForIntagsforsok); } } }