示例#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();
     }
 }
示例#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 }));
        }
示例#3
0
 public Task Post([FromBody] CreateContract command, CancellationToken cancellationToken)
 {
     return(_messageBusPublisher.PublishAsync(command, cancellationToken));
 }
 void Awake()
 {
     CreateContractInstance = this;
 }