コード例 #1
0
ファイル: ModuloColonos.cs プロジェクト: jorge118/AdminSoft
        private void button2_Click(object sender, EventArgs e)
        {
            try
            {
                //cargarDatos();
                FormularioColonos fr = new FormularioColonos();
                //FormularioColonos fr1 = new FormularioColonos();
                fr.idCol = Convert.ToInt32(dataGridView1.Rows[fila].Cells[0].Value.ToString());
                fr.nom   = Convert.ToString(dataGridView1.Rows[fila].Cells[3].Value);
                fr.apepa = Convert.ToString(dataGridView1.Rows[fila].Cells[4].Value);
                fr.apema = Convert.ToString(dataGridView1.Rows[fila].Cells[5].Value);
                fr.tel   = Convert.ToString(dataGridView1.Rows[fila].Cells[8].Value);
                //fr.dir = Convert.ToInt32(dataGridView1.Rows[fila].Cells[1].Value.ToString());

                fr.numC  = Convert.ToInt32(dataGridView1.Rows[fila].Cells[2].Value.ToString());
                fr.email = Convert.ToString(dataGridView1.Rows[fila].Cells[7].Value);
                //fr.prop = Convert.ToInt32(dataGridView1.Rows[fila].Cells[6].Value.ToString());
                fr.nPro    = Convert.ToInt32(dataGridView1.Rows[fila].Cells[9].Value.ToString());
                fr.contCol = 2;
                if (fr.idCol == 0 || fr.idCol == null)
                {
                    MessageBox.Show("Seleccione una fila con datos");
                }
                else
                {
                    fr.ShowDialog();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex.StackTrace);
            }
        }
コード例 #2
0
ファイル: ModuloColonos.cs プロジェクト: jorge118/AdminSoft
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                FormularioColonos fr = new FormularioColonos();
                fr.contCol = 1;
                fr.Show();
            }
            catch
            {
            }



            button3.Enabled = false;
            button2.Enabled = false;
        }