コード例 #1
0
    private void SaveUsufructuaryRoleParty() {
      string[] selectedParties = null;
      if (cboUsufructuaryOf.Value == "multiselect") {
        selectedParties = hdnMultiPartiesInRole.Value.Split('|');
      } else {
        selectedParties = new string[] { cboUsufructuaryOf.Value };
      }
      foreach (string selectedParty in selectedParties) {
        RecordingActParty rap = RecordingActParty.Create(this.RecordingAct, this.party);
        rap.UsufructMode = (UsufructMode) Convert.ToChar(cboUsufruct.Value.Substring(0, 1));
        if (txtUsufructPartAmount.Value.Length == 0) {
          txtUsufructPartAmount.Value = "1.00";
        }
        rap.OwnershipPart = Quantity.Parse(DataTypes.Unit.Parse(cboUsufructPartUnit.Value),
                                           decimal.Parse(txtUsufructPartAmount.Value));
        rap.UsufructTerm = txtUsufructEndCondition.Value;
        rap.PartyRole = DomainActPartyRole.Usufructuary;
        rap.SecondaryPartyRole = PartiesRole.Empty;
        rap.SecondaryParty = Party.Parse(int.Parse(selectedParty));

        FillPartyData(rap);

        rap.Save();
      }

    }
コード例 #2
0
    private void SaveAdditionalRole() {
      if (cboAdditionalRole.Value.Length == 0) {
        return;
      }
      int partyId = int.Parse(cboAdditionalRole.Value.Split('|')[0]);
      int roleId = int.Parse(cboAdditionalRole.Value.Split('|')[1]);

      RecordingActParty rap = RecordingActParty.Create(this.RecordingAct, this.party);
      rap.PartyRole = DomainActPartyRole.Empty;
      rap.SecondaryPartyRole = PartiesRole.Parse(roleId);
      rap.SecondaryParty = Party.Parse(partyId);

      rap.Save();
    }
コード例 #3
0
    private void SaveDomainRoleParty() {
      RecordingActParty rap = RecordingActParty.Create(this.RecordingAct, this.party);

      rap.PartyRole = DomainActPartyRole.Parse(int.Parse(cboRole.Value));
      rap.SecondaryPartyRole = PartiesRole.Empty;
      rap.SecondaryParty = HumanParty.Parse(-1);

      rap.OwnershipMode = (OwnershipMode) Convert.ToChar(cboOwnership.Value.Substring(0, 1));
      if (txtOwnershipPartAmount.Value.Length == 0) {
        txtOwnershipPartAmount.Value = "1.00";
      }
      rap.OwnershipPart = Quantity.Parse(DataTypes.Unit.Parse(cboOwnershipPartUnit.Value),
                                         decimal.Parse(txtOwnershipPartAmount.Value));
      FillPartyData(rap);

      rap.Save();
    }
コード例 #4
0
    private void SaveSecondaryRoleParty() {
      string[] selectedParties = null;
      if (cboFirstPartyInRole.Value == "multiselect") {
        selectedParties = hdnMultiPartiesInRole.Value.Split('|');
      } else {
        selectedParties = new string[] { cboFirstPartyInRole.Value };
      }
      foreach (string selectedParty in selectedParties) {
        RecordingActParty rap = RecordingActParty.Create(this.RecordingAct, Party.Parse(int.Parse(selectedParty)));
        rap.PartyRole = DomainActPartyRole.Empty;
        rap.SecondaryPartyRole = PartiesRole.Parse(int.Parse(cboRole.Value));
        rap.SecondaryParty = this.party;

        FillPartyData(rap);

        rap.Save();
      }
    }