Ejemplo n.º 1
0
        private void btnAddToTIN_Click(object sender, EventArgs e)
        {
            tin = new TransferInNote();
            if (dataGridView1.CurrentRow != null)
            {
                int selectedToNID = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);

                tin.addTIN(selectedToNID);
                MessageBox.Show("TIN Added!");
                dt = tin.getPendingTIN();
                dataGridView2.DataSource = null;
                dataGridView1.DataSource = dt;

                dataGridView1.Columns[0].Width = 50;
                dataGridView1.Columns[1].Width = 150;
                dataGridView1.Columns[2].Width = 150;
                dataGridView1.Columns[3].Width = 150;
            }
        }
Ejemplo n.º 2
0
        private void btnAddToTIN_Click(object sender, EventArgs e)
        {
            TransferInNote tin = new TransferInNote();

            try
            {
                int selectedToNID = Convert.ToInt32(dataGridView1.CurrentRow.Cells[0].Value);
                if (selectedToNID != null)
                {
                    tin.addTIN(selectedToNID);
                    MessageBox.Show("TIN Added!");
                    dt = tin.getPendingTIN();
                    dataGridView2.DataSource         = null;
                    dataGridView1.DataSource         = dt;
                    dataGridView1.Columns[4].Visible = false;
                }
            }
            catch (Exception)
            {
            }
        }