private void AppendNoLegibleAnnotation() {
      Recording annotation = new Recording();
      oAnnotationPaymentEditorControl.Recording = annotation;
      annotation.RecordingBook = RecordingBook.Parse(int.Parse(Request.Form["cboAnnotationBook"]));
      annotation.UseBisNumberTag = chkUseBisAnnotationNumber.Checked;
      annotation.Number = txtAnnotationNumber.Value;
      annotation.Status = RecordingStatus.NoLegible;
      annotation.StartImageIndex = int.Parse(txtAnnotationImageStartIndex.Value);
      annotation.EndImageIndex = int.Parse(txtAnnotationImageEndIndex.Value);
      if (txtAnnotationPresentationTime.Value.Length != 0) {
        annotation.PresentationTime = EmpiriaString.ToDateTime(txtAnnotationPresentationDate.Value + " " + txtAnnotationPresentationTime.Value);
      } else if (txtAnnotationPresentationDate.Value.Length != 0) {
        annotation.PresentationTime = EmpiriaString.ToDate(txtAnnotationPresentationDate.Value);
      }
      if (txtAnnotationAuthorizationDate.Value.Length != 0) {
        annotation.AuthorizedTime = EmpiriaString.ToDate(txtAnnotationAuthorizationDate.Value);
      }
      if (Request.Form["cboAnnotationAuthorizedBy"].Length != 0) {
        annotation.AuthorizedBy = Contact.Parse(int.Parse(Request.Form["cboAnnotationAuthorizedBy"]));
      }
      annotation.Notes = txtAnnotationObservations.Value;
      oAnnotationDocumentEditor.Recording = annotation;
      oAnnotationDocumentEditor.FillRecordingDocument(RecordingDocumentType.Parse(int.Parse(cboAnnotationDocumentType.Value)));

      Property property = Property.Parse(int.Parse(cboAnnotationProperty.Value));
      RecordingActType annotationRecordingActType = RecordingActType.Parse(int.Parse(Request.Form["cboAnnotation"]));

      annotation.Save();
      oAnnotationPaymentEditorControl.SaveRecordingMainPayment();
      annotation.CreateRecordingAct(annotationRecordingActType, property);

      annotation.RecordingBook.Refresh();
    }
Ejemplo n.º 2
0
    private string ValidateAnnotationSemanticsCommandHandler() {
      int annotationBookId = int.Parse(GetCommandParameter("annotationBookId", true));
      int annotationTypeId = int.Parse(GetCommandParameter("annotationTypeId", true));
      int number = int.Parse(GetCommandParameter("number", false));
      bool useBisNumber = bool.Parse(GetCommandParameter("useBisNumber", true));
      int imageStartIndex = int.Parse(GetCommandParameter("imageStartIndex", true));
      int imageEndIndex = int.Parse(GetCommandParameter("imageEndIndex", true));
      int propertyId = int.Parse(GetCommandParameter("propertyId", true));
      DateTime presentationTime = EmpiriaString.ToDateTime(GetCommandParameter("presentationTime", false, ExecutionServer.DateMinValue.ToString("dd/MMM/yyyy")));
      DateTime authorizationDate = EmpiriaString.ToDate(GetCommandParameter("authorizationDate", false, ExecutionServer.DateMaxValue.ToString("dd/MMM/yyyy")));
      int authorizedById = int.Parse(GetCommandParameter("authorizedById", false, "-1"));

      RecordingBook recordingBook = RecordingBook.Parse(annotationBookId);
      RecordingActType annotationType = RecordingActType.Parse(annotationTypeId);
      Person authorizedBy = Person.Parse(authorizedById);
      Property property = Property.Parse(propertyId);

      LandRegistrationException exception = null;
      if (presentationTime != ExecutionServer.DateMinValue) {
        exception = LRSValidator.ValidateRecordingDates(recordingBook, Recording.Empty, presentationTime, authorizationDate);
        if (exception != null) {
          return exception.Message;
        }
      }
      exception = LRSValidator.ValidateRecordingAuthorizer(recordingBook, authorizedBy, authorizationDate);
      if (exception != null) {
        return exception.Message;
      }
      return String.Empty;
    }
Ejemplo n.º 3
0
    private void AppendConcept() {
      LRSTransactionAct act = new LRSTransactionAct(this.transaction);

      act.RecordingActType = RecordingActType.Parse(int.Parse(Request.Form[cboRecordingActType.ClientID]));
      act.LawArticle = LRSLawArticle.Parse(int.Parse(Request.Form[cboLawArticle.ClientID]));
      //act.ReceiptNumber = cboReceipts.Value.Length != 0 ? cboReceipts.Value : txtRecordingActReceipt.Value;

      if (txtOperationValue.Value.Length != 0) {
        act.OperationValue = Money.Parse(Currency.Parse(int.Parse(cboOperationValueCurrency.Value)),
                                         decimal.Parse(txtOperationValue.Value));
      }
      if (txtQuantity.Value.Length != 0) {
        act.Quantity = decimal.Parse(txtQuantity.Value);
      }
      act.Unit = Empiria.DataTypes.Unit.Parse(int.Parse(cboUnit.Value));
      act.Notes = EmpiriaString.TrimAll(txtConceptNotes.Value);
      act.Save();

      txtOperationValue.Value = String.Empty;
      txtQuantity.Value = String.Empty;
      cboUnit.Value = "-1";
      txtConceptNotes.Value = String.Empty;

      onloadScript += "alert('El concepto se agregó correctamente.');";
    }
    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();
    }
 private void AppendRecordingAct() {
   int propertyId = int.Parse(cboProperty.Value);
   Property property = null;
   if (propertyId == 0) {
     property = new Property();
   } else if (propertyId == -1) {
     property = Property.Parse(int.Parse(Request.Form["cboAnotherProperty"]));
   } else {
     property = Property.Parse(propertyId);
   }
   RecordingActType recordingActType = RecordingActType.Parse(int.Parse(Request.Form["cboRecordingActType"]));
   recording.CreateRecordingAct(recordingActType, property);
 }
Ejemplo n.º 6
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.º 7
0
    private string FindAnnotationIdCommandHandler() {
      int annotationBookId = int.Parse(GetCommandParameter("annotationBookId", true));
      int annotationTypeId = int.Parse(GetCommandParameter("annotationTypeId", true));
      int number = int.Parse(GetCommandParameter("number", false));
      bool useBisNumber = bool.Parse(GetCommandParameter("useBisNumber", true));
      int imageStartIndex = int.Parse(GetCommandParameter("imageStartIndex", true));
      int imageEndIndex = int.Parse(GetCommandParameter("imageEndIndex", true));
      int propertyId = int.Parse(GetCommandParameter("propertyId", true));
      DateTime presentationTime = EmpiriaString.ToDateTime(GetCommandParameter("presentationTime", false, ExecutionServer.DateMinValue.ToString("dd/MMM/yyyy")));
      DateTime authorizationDate = EmpiriaString.ToDate(GetCommandParameter("authorizationDate", false, ExecutionServer.DateMaxValue.ToString("dd/MMM/yyyy")));
      int authorizedById = int.Parse(GetCommandParameter("authorizedById", false, "-1"));

      RecordingBook recordingBook = RecordingBook.Parse(annotationBookId);
      RecordingActType annotationType = RecordingActType.Parse(annotationTypeId);
      Person authorizedBy = Person.Parse(authorizedById);
      Property property = Property.Parse(propertyId);

      return LRSValidator.FindAnnotationId(recordingBook, annotationType,
                                           Recording.FormatNumber(number, useBisNumber),
                                           imageStartIndex, imageEndIndex, presentationTime,
                                           authorizationDate, authorizedBy, property).ToString();
    }
Ejemplo n.º 8
0
 private void AppendConcept(int conceptTypeId, int lawArticleId) {
   LRSTransactionAct act = new LRSTransactionAct(this.transaction);
   act.RecordingActType = RecordingActType.Parse(conceptTypeId);
   act.LawArticle = LRSLawArticle.Parse(lawArticleId);
   act.Save();
 }