private string GetStreetRoadsStringArrayCommandHandler() {
      int municipalityId = int.Parse(GetCommandParameter("municipalityId", false, "0"));
      int settlementId = int.Parse(GetCommandParameter("settlementId", false, "-1"));
      int streetRoadTypeId = int.Parse(GetCommandParameter("pathTypeId", false, "305"));


      if (municipalityId == 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Primero seleccionar un municipio )");
      }
      if (settlementId <= 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem("-2", GeographicPathItem.Unknown.Name);
      }

      GeographicRegionItem municipality = GeographicRegionItem.Parse(municipalityId);
      GeographicRegionItem settlement = GeographicRegionItem.Parse(settlementId);
      GeographicItemType pathType = GeographicItemType.Parse(streetRoadTypeId);

      ObjectList<GeographicPathItem> list = null;
      if (settlement.IsEmptyInstance) {
        list = municipality.GetPaths("Municipality_Paths", pathType);
      } else {
        list = settlement.GetPaths("Settlement_Paths", pathType);
      }
      if (list.Count != 0) {
        string header = "( Seleccionar" + (pathType.FemaleGenre ? " una " : " un ") + pathType.DisplayName.ToLowerInvariant() + " )";

        Func<GeographicPathItem, string> textFunction = (x) => x.Name + " (" + x.ObjectTypeInfo.DisplayName + ")";

        return HtmlSelectContent.GetComboAjaxHtml(list, "Id", textFunction, header, String.Empty, GeographicPathItem.Unknown.Name);
      } else {
        string header = "( No hay " + pathType.DisplayPluralName.ToLowerInvariant() + (pathType.FemaleGenre ? " definidas )" : " definidos )");

        return HtmlSelectContent.GetComboAjaxHtml(header, String.Empty, GeographicPathItem.Unknown.Name);
      }
    }
Ejemplo n.º 2
0
    private string GetRecordingBooksStringArrayCommandHandler() {
      int recorderOfficeId = int.Parse(GetCommandParameter("recorderOfficeId", true));
      int recordingTypeCategoryId = int.Parse(GetCommandParameter("recordingActTypeCategoryId", false, "0"));

      if (recorderOfficeId == 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "Primero seleccionar un Distrito");
      }
      if (recordingTypeCategoryId != 0) {
        RecorderOffice recorderOffice = RecorderOffice.Parse(recorderOfficeId);
        ObjectList<RecordingBook> recordingBookList = null;

        if (recordingTypeCategoryId == 1051) {
          recordingBookList = recorderOffice.GetTraslativeRecordingBooks();
        } else {
          RecordingActTypeCategory category = RecordingActTypeCategory.Parse(recordingTypeCategoryId);
          recordingBookList = recorderOffice.GetRecordingBooks(category);
        }
        if (recordingBookList.Count != 0) {
          return HtmlSelectContent.GetComboAjaxHtml(recordingBookList, 0, "Id", "FullName", "( Seleccionar el libro registral donde se encuentra )");
        } else {
          return HtmlSelectContent.GetComboAjaxHtml("No existen libros registrales para el Distrito", String.Empty, String.Empty);
        }
      } else {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Seleccionar una categoría de actos jurídicos )");
      }
    }
    private string GetPostalCodesStringArrayCommandHandler() {
      int municipalityId = int.Parse(GetCommandParameter("municipalityId", false, "0"));
      int settlementId = int.Parse(GetCommandParameter("settlementId", false, "-1"));

      string items = String.Empty;
      if (municipalityId == 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "Municipio?");
      }
      if (settlementId <= 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem("-2", GeographicRegionItem.Unknown.Name);
      }
      GeographicRegionItem municipality = GeographicRegionItem.Parse(municipalityId);
      GeographicRegionItem settlement = GeographicRegionItem.Parse(settlementId);

      ObjectList<GeographicRegionItem> list = null;
      if (settlement.IsEmptyInstance) {
        list = municipality.GetRegions("Municipality_PostalCodes");
      } else {
        list = settlement.GetRegions("Settlement_PostalCodes");
      }
      if (list.Count != 0) {
        return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "Name", "( ? )", String.Empty, GeographicRegionItem.Unknown.Name);
      } else {
        return HtmlSelectContent.GetComboAjaxHtml("( No def ) ", String.Empty, GeographicRegionItem.Unknown.Name);
      }
    }
Ejemplo n.º 4
0
    private string GetAnnotationsOfficialsStringArrayCommandHandler() {
      int recordingBookId = int.Parse(GetCommandParameter("recordingBookId", false, "-1"));

      RecordingBook recordingBook = RecordingBook.Parse(recordingBookId);
      RecorderOffice office = recordingBook.RecorderOffice;
      ObjectList<Person> officers = office.GetRecorderOfficials(recordingBook.RecordingsControlTimePeriod);

      return HtmlSelectContent.GetComboAjaxHtml(officers, 0, "Id", "FamilyFullName", "( Seleccionar al C. Oficial Registrador )",
                                                "No se puede determinar o sólo aparece la firma", String.Empty);
    }
Ejemplo n.º 5
0
    private string GetRecordingNumbersStringArrayCommandHandler() {
      int recordingBookId = int.Parse(GetCommandParameter("recordingBookId", false, "0"));

      if (recordingBookId == 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( ? )");
      }
      RecordingBook recordingBook = RecordingBook.Parse(recordingBookId);

      return HtmlSelectContent.GetComboAjaxHtml(recordingBook.Recordings, 0, "Id", "Number", "( ? )", String.Empty, String.Empty);
    }
Ejemplo n.º 6
0
    private string GetNotaryOfficesInPlaceStringArrayCommandHandler() {
      int placeId = int.Parse(GetCommandParameter("placeId", false, "0"));

      if (placeId == 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Primero seleccionar una ciudad )");
      }
      GeographicRegionItem place = GeographicRegionItem.Parse(placeId);
      ObjectList<NotaryOffice> list = NotaryOffice.GetList(place);

      return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "Number", "( ? )", String.Empty, "N/C");
    }
Ejemplo n.º 7
0
    private string GetJudgesInJudicialOfficeStringArrayCommandHandler() {
      int judicialOfficeId = int.Parse(GetCommandParameter("judicialOfficeId", false, "0"));

      if (judicialOfficeId == 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Primero seleccionar un juzgado )");
      }
      JudicialOffice judicialOffice = JudicialOffice.Parse(judicialOfficeId);
      ObjectList<Person> list = judicialOffice.GetJudges();

      return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "FamilyFullName", "( Seleccionar al C. Juez )", String.Empty, "No consta");
    }
Ejemplo n.º 8
0
    private string GetNotariesInNotaryOfficeStringArrayCommandHandler() {
      int notaryOfficeId = int.Parse(GetCommandParameter("notaryOfficeId", false, "0"));

      if (notaryOfficeId == 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Primero seleccionar una notaría )");
      }
      NotaryOffice notaryOffice = NotaryOffice.Parse(notaryOfficeId);
      ObjectList<Person> list = notaryOffice.GetNotaries();

      return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "FamilyFullName", "( Seleccionar al C. Notario Público )",
                                                String.Empty, "No consta o no se puede determinar");
    }
Ejemplo n.º 9
0
    private string GetAnnotationTypesStringArrayCommandHandler() {
      int annotationTypeCategoryId = int.Parse(GetCommandParameter("annotationTypeCategoryId", false, "0"));

      if (annotationTypeCategoryId != 0) {
        RecordingActTypeCategory recordingActTypeCategory = RecordingActTypeCategory.Parse(annotationTypeCategoryId);
        ObjectList<RecordingActType> list = recordingActTypeCategory.GetItems();

        return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "DisplayName", "( Seleccionar el tipo de movimiento que se desea agregar )");
      } else {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Primero seleccionar la categoría del movimiento )");
      }
    }
Ejemplo n.º 10
0
    private string GetCadastralOfficeMunicipalitiesComboCommandHandler() {
      int cadastralOfficeId = int.Parse(GetCommandParameter("cadastralOfficeId", false, "0"));

      if (cadastralOfficeId != 0) {
        RecorderOffice cadastralOffice = RecorderOffice.Parse(cadastralOfficeId);
        ObjectList<GeographicRegionItem> list = cadastralOffice.GetMunicipalities();
        if (list.Count != 0) {
          return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "Name", "( Seleccionar un municipio )");
        } else {
          return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( No hay municipios definidos )");
        }
      } else {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Primero seleccionar un Distrito )");
      }
    }
    private string GetRegionsStringArrayCommandHandler() {
      string header = GetCommandParameter("header", false, "( Seleccionar )");
      string keywords = GetCommandParameter("keywords", false, String.Empty);

      if (keywords.Length == 0) {
        return HtmlSelectContent.GetComboAjaxHtml(header, String.Empty, GeographicRegionItem.Unknown.Name);
      }
      string filter = SearchExpression.ParseAndLike("GeoItemKeywords", keywords);

      if (filter.Length != 0) {
        filter += " AND ";
      }
      filter += "GeoItemTypeId IN (307, 308, 315, 316, 317, 318, 322)";

      ObjectList<GeographicRegionItem> list = GeographicRegionItem.GetList(filter);

      return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "CompoundName", header, String.Empty, GeographicRegionItem.Unknown.Name);
    }
Ejemplo n.º 12
0
    private string GetLawArticlesStringArrayCommandHandler() {
      int recordingActTypeId = int.Parse(GetCommandParameter("recordingActTypeId", false, "0"));

      string items = String.Empty;
      if (recordingActTypeId != 0) {
        RecordingActType recordingActType = RecordingActType.Parse(recordingActTypeId);
        ObjectList<LRSLawArticle> list = recordingActType.GetFinancialLawArticles();
        if (list.Count == 0) {
          list = LRSLawArticle.GetList();
        }
        if (list.Count == 1) {
          return HtmlSelectContent.GetComboAjaxHtmlItem(list[0].Id.ToString(), list[0].Name);
        } else {
          return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "Name", "( Fundamento )");
        }
      } else {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Fundamento )");
      }
    }
Ejemplo n.º 13
0
    private string GetWitnessInPositionStringArrayCommandHandler() {
      int placeId = int.Parse(GetCommandParameter("placeId", false, "-1"));
      int positionId = int.Parse(GetCommandParameter("positionId", false, "0"));

      if (positionId == 0) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Primero seleccionar el rol del certificador )");
      } else if (positionId == -2) {
        return HtmlSelectContent.GetComboAjaxHtmlItem("-2", "No consta o no se puede determinar");
      }
      if (placeId == -1) {
        return HtmlSelectContent.GetComboAjaxHtmlItem(String.Empty, "( Primero seleccionar una ciudad )");
      } else if (placeId == -2) {
        return HtmlSelectContent.GetComboAjaxHtmlItem("-2", "No consta o no se puede determinar");
      }

      GeographicRegionItem place = GeographicRegionItem.Parse(placeId);
      TypeAssociationInfo role = place.ObjectTypeInfo.GetAssociation(positionId);
      ObjectList<Person> list = place.GetPeople(role.Name);

      return HtmlSelectContent.GetComboAjaxHtml(list, 0, "Id", "FamilyFullName", "( Seleccionar al certificador del contrato )",
                                            String.Empty, "No consta o no se puede determinar");
    }
Ejemplo n.º 14
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;
    }