public AttachInfo(SmoPacient smoPacient, S11DataContext vistaMed, Organisation lpu) { BeginDate = smoPacient.D_PR == DateTime.MinValue ? DateTime.Today : smoPacient.D_PR; if (smoPacient.D_OT != DateTime.MinValue) EndDate = smoPacient.D_OT; int atty; if(!int.TryParse(smoPacient.S_PR, out atty)) { atty = 1; } AttachType = vistaMed.RbAttachTypes.First(x => x.FinanceId == 2 && x.Code == atty.ToString()); if (AttachType == null) { atty = 1; AttachType = vistaMed.RbAttachTypes.First(x => x.FinanceId == 2 && x.Code == atty.ToString()); } Lpu = lpu; }
private void detach_Organisations(Organisation entity) { this.SendPropertyChanging("Organisations"); entity.RbNet = null; }