Exemplo n.º 1
0
        private void bNewContract_Click(object sender, EventArgs e)
        {
            AddEditContractForm contractForm = new AddEditContractForm(true, -1, customerId);
            var result = contractForm.ShowDialog();

            if (result == DialogResult.OK)
            {
                ContractRepository repository = new ContractRepository();
                radGridView1.DataSource = repository.getContractsByCustomerId(customerId).ToList();
            }
        }
Exemplo n.º 2
0
 private void radGridView1_CellDoubleClick(object sender, GridViewCellEventArgs e)
 {
     if (e.RowIndex != -1)
     {
         int contractId = Convert.ToInt32(radGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());
         AddEditContractForm contractForm = new AddEditContractForm(false, contractId, customerId);
         var result = contractForm.ShowDialog();
         if (result == DialogResult.OK)
         {
             ContractRepository repository = new ContractRepository();
             radGridView1.DataSource = repository.getContractsByCustomerId(customerId).ToList();
         }
     }
 }
        private void radGridView1_CellDoubleClick(object sender, GridViewCellEventArgs e)
        {
            if (e.RowIndex != -1)
            {
                int contractId = Convert.ToInt32(radGridView1.Rows[e.RowIndex].Cells[0].Value.ToString());
                AddEditContractForm contractForm = new AddEditContractForm(false, contractId, customerId);
                var result = contractForm.ShowDialog();
                if (result == DialogResult.OK)
                {
                    ContractRepository repository = new ContractRepository();
                    radGridView1.DataSource = repository.getContractsByCustomerId(customerId).ToList();
                }

            }
        }
 private void bNewContract_Click(object sender, EventArgs e)
 {
     AddEditContractForm contractForm = new AddEditContractForm(true, -1, customerId);
     var result = contractForm.ShowDialog();
     if (result == DialogResult.OK)
     {
         ContractRepository repository = new ContractRepository();
         radGridView1.DataSource = repository.getContractsByCustomerId(customerId).ToList();
     }
 }