private void DispService_EditableProtocolChanged(object sender, EventArgs e) { if (Case != null) { var pacient = Case.Pacient; if (pacient != null) { EditableProtocol.ApplyPacientFilter(pacient, DateIn); } } }
void CommonService_EditableProtocolChanged(object sender, EventArgs e) { if (Case != null) { var pacient = Case.Pacient; if (pacient != null) { EditableProtocol.ApplyPacientFilter(pacient); } } }
public override void AfterConstruction() { base.AfterConstruction(); EditableProtocol = new EditableProtocol(Session); CommonProtocol = new CommonProtocol(Session); DateIn = DateTime.Now; // определяем текущего пользователя var createdBy = SecuritySystem.CurrentUser as Doctor; if (createdBy != null) { // находим доктора с таким же Логином var doctor = Session.FindObject <Doctor>(CriteriaOperator.Parse("UserName=?", createdBy.UserName)); if (doctor != null) { this.Doctor = doctor; } } }