コード例 #1
0
    private void DownwardRecordingAct() {
      int recordingActId = int.Parse(GetCommandParameter("recordingActId"));

      RecordingAct recordingAct = recording.GetRecordingAct(recordingActId);

      recording.DownwardRecordingAct(recordingAct);
    }
コード例 #2
0
    private string GetRecordingPropertiesStringArrayCommandHandler() {
      int recordingId = int.Parse(GetCommandParameter("recordingId", false, "0"));

      if (recordingId == 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( ¿ Inscripción ? )");
      }
      Recording recording = Recording.Parse(recordingId);
      string html = String.Empty;
      if (recording.RecordingActs.Count == 0) {
        html = HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "No tiene predios asociados");
      } else if (recording.RecordingActs.Count > 1) {
        html = HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Seleccionar el folio del predio )");
      }
      for (int i = 0; i < recording.RecordingActs.Count; i++) {
        RecordingAct recordingAct = recording.RecordingActs[i];
        for (int j = 0; j < recordingAct.PropertiesEvents.Count; j++) {
          if (html.Contains(recordingAct.PropertiesEvents[j].Property.TractKey)) {
            continue;
          }
          if (html.Length != 0) {
            html += "|";
          }
          html += HtmlSelectContent.GetComboAjaxHtmlItem(recordingAct.PropertiesEvents[j].Property.Id.ToString(), recordingAct.PropertiesEvents[j].Property.TractKey);
        }
      }
      return html;
    }
コード例 #3
0
    private void AppendPropertyToRecordingAct() {
      int recordingActId = int.Parse(GetCommandParameter("recordingActId"));

      RecordingAct recordingAct = recording.GetRecordingAct(recordingActId);

      recordingAct.AppendPropertyEvent(new Property());
    }
コード例 #4
0
    private void DeleteRecordingActProperty() {
      int recordingActId = int.Parse(GetCommandParameter("recordingActId"));
      int propertyId = int.Parse(GetCommandParameter("propertyId"));

      RecordingAct recordingAct = this.recording.GetRecordingAct(recordingActId);
      Property property = Property.Parse(propertyId);
      recordingAct.RemoveProperty(property);
    }
コード例 #5
0
    private void Initialize() {
      recordingAct = RecordingAct.Parse(int.Parse(Request.QueryString["id"]));
      showFirstPropertyOwner = recordingAct.RecordingActType.UseFirstPropertyOwner;
      oRecordingActAttributes.RecordingAct = this.recordingAct;
      oPartyEditorControl.RecordingAct = this.recordingAct;

      this.oAntecedentParties.BaseRecordingAct = this.recordingAct;
    }
コード例 #6
0
    private void AppendPropertyToAnnotation() {
      int annotationId = int.Parse(GetCommandParameter("annotationId"));
      int propertyId = int.Parse(cboAnnotationProperty.Value);

      RecordingAct annotation = RecordingAct.Parse(annotationId);
      Property property = Property.Parse(propertyId);

      annotation.AppendPropertyEvent(property);
    }
コード例 #7
0
    private void ModifyRecordingActType() {
      int recordingActId = int.Parse(GetCommandParameter("recordingActId"));
      int recordingActTypeId = int.Parse(Request.Form["cboRecordingActType"]);

      RecordingAct recordingAct = recording.GetRecordingAct(recordingActId);
      RecordingActType recordingActType = RecordingActType.Parse(recordingActTypeId);
      recordingAct.RecordingActType = recordingActType;
      recordingAct.Save();
    }
コード例 #8
0
    private void DeleteAnnotation() {
      int recordingActId = int.Parse(GetCommandParameter("recordingActId"));
      int propertyId = int.Parse(GetCommandParameter("propertyId"));

      RecordingAct recordingAct = RecordingAct.Parse(recordingActId);
      Property property = Property.Parse(propertyId);

      recordingAct.RemoveProperty(property);
    }
コード例 #9
0
    protected string GetAntecedentRecordingActPartiesGrid() {
      if (baseRecordingAct.IsAnnotation) {
        this.Visible = false;
        return string.Empty;
      }
      RecordingAct antecedent = property.GetAntecedent(baseRecordingAct);

      return LRSGridControls.GetRecordingActPartiesGrid(antecedent, true);
    }
コード例 #10
0
    private string ValidateRecordingActAsCompleteCommandHandler() {
      int recordingActId = int.Parse(GetCommandParameter("recordingActId", true));

      RecordingAct recordingAct = RecordingAct.Parse(recordingActId);

      LandRegistrationException exception = null;

      exception = LRSValidator.ValidateRecordingActAsComplete(recordingAct);
      if (exception != null) {
        return exception.Message;
      }
      return String.Empty;
    }
コード例 #11
0
    private string ValidateDeleteRecordingActPropertyCommandHandler() {
      int recordingId = int.Parse(GetCommandParameter("recordingId", true));
      int recordingActId = int.Parse(GetCommandParameter("recordingActId", true));
      int propertyId = int.Parse(GetCommandParameter("propertyId", true));

      Recording recording = Recording.Parse(recordingId);
      RecordingAct recordingAct = recording.GetRecordingAct(recordingActId);
      Property property = recordingAct.GetPropertyEvent(Property.Parse(propertyId)).Property;

      LandRegistrationException exception = null;
      exception = LRSValidator.ValidateDeleteRecordingActProperty(recordingAct, property);

      if (exception != null) {
        return exception.Message;
      }
      return String.Empty;
    }
コード例 #12
0
 private void LoadRecordingActsPropertiesCombo() {
   cboProperty.Items.Clear();
   if (recording.RecordingActs.Count != 0) {
     cboProperty.Items.Add(new ListItem("( Seleccionar )", ""));
   }
   for (int i = 0; i < recording.RecordingActs.Count; i++) {
     RecordingAct recordingAct = recording.RecordingActs[i];
     for (int j = 0; j < recordingAct.PropertiesEvents.Count; j++) {
       ListItem item = new ListItem(recordingAct.PropertiesEvents[j].Property.TractKey,
                                    recordingAct.PropertiesEvents[j].Property.Id.ToString());
       if (!cboProperty.Items.Contains(item)) {
         cboProperty.Items.Add(item);
       }
     }
   }
   cboProperty.Items.Add(new ListItem("Nuevo predio", "0"));
   cboProperty.Items.Add(new ListItem("Predio ya inscrito", "-1"));
 }
コード例 #13
0
    private string SearchRecordingActPartiesCommandHandler() {
      int recordingActId = int.Parse(GetCommandParameter("recordingActId", true));
      int partyTypeId = int.Parse(GetCommandParameter("partyTypeId", false, "0"));
      string partyFilter = GetCommandParameter("filterType", true);
      string keywords = GetCommandParameter("keywords", false, String.Empty);


      RecordingAct recordingAct = RecordingAct.Parse(recordingActId);
      PartyFilterType partyFilterType = (PartyFilterType) System.Enum.Parse(typeof(PartyFilterType), partyFilter);

      ObjectTypeInfo partyTypeInfo = null;
      if (partyTypeId != 0) {
        partyTypeInfo = ObjectTypeInfo.Parse(partyTypeId);
      }
      ObjectList<Party> list = Party.GetList(partyFilterType, partyTypeInfo, recordingAct, keywords);

      string html = String.Empty;

      if (partyTypeInfo != null) {
        html = HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, HtmlSelectContent.GetSearchResultHeaderText(partyTypeInfo, list.Count));
      } else {
        html = HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( " + list.Count.ToString("N0") + " personas u organizaciones encontradas )");
      }
      if (list.Count == 0) {
        if (partyTypeInfo != null && !partyTypeInfo.IsAbstract) {
          html += "|" + HtmlSelectContent.GetComboAjaxHtmlItem("appendParty", "( Agregar " + (partyTypeInfo.FemaleGenre ? "una nueva " : "un nuevo ") +
                                                                                       partyTypeInfo.DisplayName + " )");
        }
      } else {
        if (partyTypeInfo != null && !partyTypeInfo.IsAbstract) {
          html += "|" + HtmlSelectContent.GetComboAjaxHtmlItem("appendParty", "( Agregar " + (partyTypeInfo.FemaleGenre ? "una nueva " : "un nuevo ") +
                                                                                          partyTypeInfo.DisplayName + " )");
        }
        html += "|" + HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "ExtendedName", String.Empty);
      }
      return html;
    }
コード例 #14
0
 private void Initialize() {
   recordingAct = RecordingAct.Parse(int.Parse(Request.QueryString["recordingActId"]));
   property = Property.Parse(int.Parse(Request.QueryString["propertyId"]));
   propertyEvent = recordingAct.GetPropertyEvent(property);
 }