private void RefreshTmpRestrictionByDiagnosticList(List <RestrictionList> prestrictions) { _tmpRestrictionByDiagnosticList = new List <RestrictionList>(); if (prestrictions == null) { return; } foreach (var item in prestrictions) { // Agregar restricciones a la Lista mas lo que ya tiene RestrictionList restrictionByDiagnostic = new RestrictionList(); restrictionByDiagnostic.v_RestrictionByDiagnosticId = item.v_RestrictionByDiagnosticId; restrictionByDiagnostic.v_ComponentId = item.v_ComponentId; restrictionByDiagnostic.v_DiagnosticRepositoryId = item.v_DiagnosticRepositoryId; restrictionByDiagnostic.v_MasterRestrictionId = item.v_MasterRestrictionId; restrictionByDiagnostic.v_RestrictionName = item.v_RestrictionName; restrictionByDiagnostic.i_RecordStatus = item.i_RecordStatus; restrictionByDiagnostic.i_RecordType = item.i_RecordType; restrictionByDiagnostic.v_ServiceId = item.v_ServiceId; _tmpRestrictionByDiagnosticList.Add(restrictionByDiagnostic); } }
protected abstract TControl CreateControl( SingleAnnotationAspectMember <UIControlAttribute> member, string label, string hint, int localeCultureId, RestrictionList restrictions, InterceptorList interceptors, GlobalizationList globalization);
public bool IsRestricted(string id) { if (id == null || RestrictionList == null || RestrictionList.Count == 0) { return(false); } return(RestrictionType == RestrictionListType.BlackList ? RestrictionList.Contains(id) : !RestrictionList.Contains(id)); }
private void btnAgregarRestriccion_Click(object sender, EventArgs e) { var x = (KeyValueDTO)ddlComponentId.SelectedItem; if (x.Value4 == 0.0) { MessageBox.Show("Por favor seleccione un consultorio", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } var frm = new frmMasterRecommendationRestricction("Restricciones", (int)Typifying.Restricciones, ModeOperation.Total); frm.ShowDialog(); if (_tmpRestrictionList == null) { _tmpRestrictionList = new List <RestrictionList>(); } var restrictionId = frm._masterRecommendationRestricctionId; var restrictionName = frm._masterRecommendationRestricctionName; if (restrictionId != null && restrictionName != null) { var restriction = _tmpRestrictionList.Find(p => p.v_MasterRestrictionId == restrictionId); if (restriction == null) // agregar con normalidad [insert] a la bolsa { // Agregar restricciones a la Lista RestrictionList restrictionByDiagnostic = new RestrictionList(); restrictionByDiagnostic.v_RestrictionByDiagnosticId = Guid.NewGuid().ToString(); restrictionByDiagnostic.v_DiagnosticRepositoryId = Guid.NewGuid().ToString(); restrictionByDiagnostic.v_MasterRestrictionId = restrictionId; restrictionByDiagnostic.v_ServiceId = _serviceId; restrictionByDiagnostic.v_ComponentId = _componentId; restrictionByDiagnostic.v_RestrictionName = restrictionName; restrictionByDiagnostic.i_RecordStatus = (int)RecordStatus.Agregado; restrictionByDiagnostic.i_RecordType = (int)RecordType.Temporal; restrictionByDiagnostic.v_ComponentId = _componentIds[0]; _tmpRestrictionList.Add(restrictionByDiagnostic); } else // La restriccion ya esta agregado en la bolsa { MessageBox.Show("Por favor seleccione otra Restriccón. ya existe", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } // Cargar grilla grdRestricciones.DataSource = new RestrictionList(); grdRestricciones.DataSource = _tmpRestrictionList; grdRestricciones.Refresh(); lblRecordCountRecomendaciones_AnalisisDx.Text = string.Format("Se encontraron {0} registros.", _tmpRestrictionList.Count()); }
public BootstrapPresenterControl( SingleAnnotationAspectMember<UIControlAttribute> member, string label, string hint, int lcid, RestrictionList restrictions, InterceptorList interceptors, GlobalizationList globalization, BootstrapControl control) : base(member, label, hint, lcid, restrictions, interceptors, globalization) { this._Control = control; }
public HtmlPresenterControl( SingleAnnotationAspectMember <UIControlAttribute> member, string label, string hint, int lcid, RestrictionList restrictions, InterceptorList interceptors, GlobalizationList globalization, HtmlControl control) : base(member, label, hint, lcid, restrictions, interceptors, globalization) { this._Control = control; }
public UIPresenterControl( SingleAnnotationAspectMember <UIControlAttribute> member, string label, string hint, int lcid, RestrictionList restrictions, InterceptorList interceptors, GlobalizationList globalization) { this._Member = member; this._Groups = new List <UIControlGroup>(member.GetAttributes <UIControlGroup>(true)); this._Label = string.IsNullOrEmpty(label) ? member.Name : label; this._Hint = hint; this._LCID = lcid; this._FormatProvider = System.Globalization.CultureInfo.GetCultureInfo(lcid); this._Restrictions = restrictions; this._Interceptors = interceptors; this._Globalization = globalization; }
public UIPresenterControl( SingleAnnotationAspectMember<UIControlAttribute> member, string label, string hint, int lcid, RestrictionList restrictions, InterceptorList interceptors, GlobalizationList globalization) { this._Member = member; this._Groups = new List<UIControlGroup>(member.GetAttributes<UIControlGroup>(true)); this._Label = string.IsNullOrEmpty(label) ? member.Name : label; this._Hint = hint; this._LCID = lcid; this._FormatProvider = System.Globalization.CultureInfo.GetCultureInfo(lcid); this._Restrictions = restrictions; this._Interceptors = interceptors; this._Globalization = globalization; }
private void grdData_DoubleClick(object sender, EventArgs e) { if (grdData.Selected.Rows.Count == 0) { return; } _masterRecommendationRestricctionId = grdData.Selected.Rows[0].Cells[0].Value.ToString(); _masterRecommendationRestricctionName = grdData.Selected.Rows[0].Cells[1].Value.ToString(); if (_nameInvokerForm == "frmMedicalConsult") { if (_restrictions == null) { _restrictions = new List <RestrictionList>(); } var existRestric = _restrictions.Find(p => p.v_MasterRestrictionId == _masterRecommendationRestricctionId && p.i_RecordStatus != (int)RecordStatus.EliminadoLogico); if (existRestric != null) { MessageBox.Show("Por favor seleccione otra Restricción.", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } // Abrir Popup para setear rango de fechas var frm = new Operations.Popups.frmAddSelectRangeDateForRestriction(); frm.ShowDialog(); if (frm.DialogResult == DialogResult.Cancel) { return; } _startDate = frm._startDate; _endDate = frm._endDate; var findResult = _restrictions.Find(p => p.v_MasterRestrictionId == _masterRecommendationRestricctionId); // La restriccion ya esta agregada if (findResult == null) { var restriction = new RestrictionList(); restriction.v_RestrictionByDiagnosticId = Guid.NewGuid().ToString(); restriction.v_DiagnosticRepositoryId = Guid.NewGuid().ToString(); restriction.v_MasterRestrictionId = _masterRecommendationRestricctionId; restriction.v_ServiceId = _serviceId; restriction.v_RestrictionName = _masterRecommendationRestricctionName; restriction.d_StartDateRestriction = _startDate; restriction.d_EndDateRestriction = _endDate; restriction.i_RecordStatus = (int)RecordStatus.Agregado; restriction.i_RecordType = (int)RecordType.Temporal; _restrictions.Add(restriction); } else { if (findResult.i_RecordStatus == (int)RecordStatus.EliminadoLogico) { if (findResult.i_RecordType == (int)RecordType.NoTemporal) // El registro Tiene in ID de BD { findResult.d_StartDateRestriction = _startDate; findResult.d_EndDateRestriction = _endDate; findResult.i_RecordStatus = (int)RecordStatus.Grabado; } else if (findResult.i_RecordType == (int)RecordType.Temporal) // El registro tiene un ID temporal [GUID] { findResult.d_StartDateRestriction = _startDate; findResult.d_EndDateRestriction = _endDate; findResult.i_RecordStatus = (int)RecordStatus.Agregado; } } } } this.DialogResult = DialogResult.OK; this.Close(); }
private void btnAgregarRestriccion_Click(object sender, EventArgs e) { var frm = new frmMasterRecommendationRestricction("Restricciones", (int)Typifying.Restricciones, ModeOperation.Total); frm.ShowDialog(); if (_tmpRestrictionByDiagnosticList == null) { _tmpRestrictionByDiagnosticList = new List <RestrictionList>(); } var restrictionId = frm._masterRecommendationRestricctionId; var restrictionName = frm._masterRecommendationRestricctionName; if (restrictionId != null && restrictionName != null) { var restriction = _tmpRestrictionByDiagnosticList.Find(p => p.v_MasterRestrictionId == restrictionId); if (_mode == "New" || _mode == "Edit") { if (restriction == null) // agregar con normalidad [insert] a la bolsa { // Agregar restricciones a la Lista RestrictionList restrictionByDiagnostic = new RestrictionList(); restrictionByDiagnostic.v_RestrictionByDiagnosticId = Guid.NewGuid().ToString(); restrictionByDiagnostic.v_DiagnosticRepositoryId = Guid.NewGuid().ToString(); restrictionByDiagnostic.v_MasterRestrictionId = restrictionId; restrictionByDiagnostic.v_ServiceId = _serviceId; restrictionByDiagnostic.v_ComponentId = ddlComponentId.SelectedValue.ToString(); // _componentId; restrictionByDiagnostic.v_RestrictionName = restrictionName; restrictionByDiagnostic.i_RecordStatus = (int)RecordStatus.Agregado; restrictionByDiagnostic.i_RecordType = (int)RecordType.Temporal; _tmpRestrictionByDiagnosticList.Add(restrictionByDiagnostic); } else // La restriccion ya esta agregado en la bolsa hay que actualizar su estado { if (restriction.i_RecordStatus == (int)RecordStatus.EliminadoLogico) { if (restriction.i_RecordType == (int)RecordType.NoTemporal) // El registro Tiene in ID de BD { restriction.v_MasterRestrictionId = restrictionId; restriction.v_RestrictionName = restrictionName; restriction.i_RecordStatus = (int)RecordStatus.Grabado; } else if (restriction.i_RecordType == (int)RecordType.Temporal) // El registro tiene un ID temporal [GUID] { restriction.v_MasterRestrictionId = restrictionId; restriction.v_RestrictionName = restrictionName; restriction.i_RecordStatus = (int)RecordStatus.Agregado; } } else { MessageBox.Show("Por favor seleccione otra Restriccón. ya existe", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } } } } var dataList = _tmpRestrictionByDiagnosticList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico); // Cargar grilla grdRestricciones.DataSource = new RestrictionList(); grdRestricciones.DataSource = dataList; grdRestricciones.Refresh(); lblRecordCountRestricciones.Text = string.Format("Se encontraron {0} registros.", dataList.Count()); }
private void grdData_DoubleClick(object sender, EventArgs e) { //if (ddlComponentId.SelectedValue.ToString() == "-1") //{ // MessageBox.Show("Por favor seleccione un examen", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning); // return; //} var x = (KeyValueDTO)ddlComponentId.SelectedItem; if (x.Value4 == 0.0) { MessageBox.Show("Por favor seleccione un consultorio", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } if (cboExamen.SelectedValue == null) { MessageBox.Show("Por favor seleccione un Examen", "Error de validación", MessageBoxButtons.OK, MessageBoxIcon.Warning); return; } lblDiagnostico.Text = ""; _tmpRecomendationList = new List <RecomendationList>(); _tmpRestrictionByDiagnosticList = new List <RestrictionList>(); var Filtro = _TempListaDxfrecuentes.Find(p => p.v_DxFrecuenteId == _DxFrecuenteId); lblDiagnostico.Text = Filtro.v_DiseasesName + " / " + Filtro.v_CIE10Id; _diagnosticId = Filtro.v_DiseasesId; var Recomendaciones = Filtro.DxFrecuenteDetalle.FindAll(p => p.i_Tipo != 2); foreach (var item in Recomendaciones) { if (_tmpRecomendationList == null) { _tmpRecomendationList = new List <RecomendationList>(); } var recomendation = _tmpRecomendationList.Find(p => p.v_MasterRecommendationId == item.v_MasterRecommendationRestricctionId); if (recomendation == null) // agregar con normalidad [insert] a la bolsa { RecomendationList recomendationList = new RecomendationList(); recomendationList.v_RecommendationId = Guid.NewGuid().ToString(); recomendationList.v_DiagnosticRepositoryId = Guid.NewGuid().ToString(); recomendationList.v_MasterRecommendationId = item.v_MasterRecommendationRestricctionId; recomendationList.v_ServiceId = _serviceId; //recomendationList.v_ComponentId = _componentIds[0]; recomendationList.v_ComponentId = _examenId; //recomendationList.v_ComponentId = ddlComponentId.SelectedValue.ToString(); //_componentId; recomendationList.v_RecommendationName = item.v_RecomendacionName; recomendationList.i_RecordStatus = (int)RecordStatus.Agregado; recomendationList.i_RecordType = (int)RecordType.Temporal; _tmpRecomendationList.Add(recomendationList); } } var dataListReco = _tmpRecomendationList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico); // Cargar grilla grdRecomendaciones.DataSource = new RecomendationList(); grdRecomendaciones.DataSource = dataListReco; grdRecomendaciones.Refresh(); lblRecordCountRecomendaciones_AnalisisDx.Text = string.Format("Se encontraron {0} registros.", dataListReco.Count()); var Restricciones = Filtro.DxFrecuenteDetalle.FindAll(p => p.i_Tipo != 1); foreach (var item in Restricciones) { if (_tmpRestrictionByDiagnosticList == null) { _tmpRestrictionByDiagnosticList = new List <RestrictionList>(); } var restriction = _tmpRestrictionByDiagnosticList.Find(p => p.v_MasterRestrictionId == item.v_MasterRecommendationRestricctionId); if (restriction == null) // agregar con normalidad [insert] a la bolsa { RestrictionList restrictionByDiagnostic = new RestrictionList(); restrictionByDiagnostic.v_RestrictionByDiagnosticId = Guid.NewGuid().ToString(); restrictionByDiagnostic.v_DiagnosticRepositoryId = Guid.NewGuid().ToString(); restrictionByDiagnostic.v_MasterRestrictionId = item.v_MasterRecommendationRestricctionId; restrictionByDiagnostic.v_ServiceId = _serviceId; //restrictionByDiagnostic.v_ComponentId = _componentIds[0]; restrictionByDiagnostic.v_ComponentId = _examenId; //restrictionByDiagnostic.v_ComponentId = ddlComponentId.SelectedValue.ToString(); // _componentId; restrictionByDiagnostic.v_RestrictionName = item.v_RestriccionName; restrictionByDiagnostic.i_RecordStatus = (int)RecordStatus.Agregado; restrictionByDiagnostic.i_RecordType = (int)RecordType.Temporal; _tmpRestrictionByDiagnosticList.Add(restrictionByDiagnostic); } } var dataListRest = _tmpRestrictionByDiagnosticList.FindAll(p => p.i_RecordStatus != (int)RecordStatus.EliminadoLogico); // Cargar grilla grdRestricciones.DataSource = new RestrictionList(); grdRestricciones.DataSource = dataListRest; grdRestricciones.Refresh(); lblRecordCountRestricciones_AnalisisDx.Text = string.Format("Se encontraron {0} registros.", dataListRest.Count()); }
/// <summary> /// Initializes a new instance of the <see cref="RestrictionBuilder{TCriteria, TCause}"/> class. /// </summary> /// <param name="restrictionList">The restriction list.</param> /// <param name="causes">The causes.</param> public RestrictionBuilder(RestrictionList <TCriteria, TCause> restrictionList, TCause[] causes) { _restrictionList = restrictionList; _causes = causes; }
public IUpgradeSlot DeepClone() { return(new UpgradeSlot(this.UpgradeType.DeepClone(), this.Upgrade.DeepClone(), RestrictionList.ToList().AsReadOnly(), this.CostReduction, this.IsMutable)); }
public RestrictionAspectMember(ClassAcessor acessor) : base(acessor) { this._restrictions = new RestrictionList(this); }