Ejemplo n.º 1
0
 private void toolStripButton1_Click(object sender, EventArgs e)
 {
     if (treeView1.SelectedNode.Parent != null)
     {
         if (currentEntity == ClientName)
         {
             CreateClient createClient = new CreateClient();
             createClient.ShowDialog();
         }
         if (currentEntity == ContractName)
         {
             CreateContract createContract = new CreateContract();
             createContract.ShowDialog();
         }
         if (currentEntity == PaymentName)
         {
             CreatePayment createPayment = new CreatePayment();
             createPayment.ShowDialog();
         }
         if (currentEntity == RentName)
         {
             CreateRent createRent = new CreateRent();
             createRent.ShowDialog();
         }
         if (currentEntity == TradePointName)
         {
             CreateTradePoint createTradePoint = new CreateTradePoint();
             createTradePoint.ShowDialog();
         }
         grid.Refresh();
     }
 }
Ejemplo n.º 2
0
        public async Task <IActionResult> CreateAsync([FromBody] CreateContract request, CancellationToken cancellationToken)
        {
            var contract = new Contract(request.TemplateId, request.CustomerId, request.TenementId, request.StartDate, request.EndDate);

            _contractRepository.Add(contract);
            await _contractRepository.UnitOfWork.SaveChangesAsync(cancellationToken);

            return(CreatedAtAction(nameof(GetAsync), new { id = contract.Id }, new { ContractId = contract.Id }));
        }
Ejemplo n.º 3
0
 public Task Post([FromBody] CreateContract command, CancellationToken cancellationToken)
 {
     return(_messageBusPublisher.PublishAsync(command, cancellationToken));
 }
Ejemplo n.º 4
0
 void Awake()
 {
     CreateContractInstance = this;
 }