Exemplo n.º 1
0
        private void BtnAgregar_Click(object sender, EventArgs e)
        {
            ObraSocialAdd frm = new ObraSocialAdd(null);

            frm.FormClosed += new FormClosedEventHandler(frmObraSocialAdd_FormClosed);
            frm.ShowDialog();
        }
Exemplo n.º 2
0
        private void DataListado_CellContentClick(object sender, DataGridViewCellEventArgs e)
        {
            string         msj;
            ObraSocialView item = dataListado.Rows[e.RowIndex].DataBoundItem as ObraSocialView;

            if (e.ColumnIndex == 0)
            {
                DialogResult result = MessageBox.Show("Realmete desea eliminar el registro", "Clinica", MessageBoxButtons.YesNo, MessageBoxIcon.Warning);
                if (result == DialogResult.Yes)
                {
                    msj = obj.Delete(item.idObraSocial);
                    MessageBox.Show(msj, "Clinica", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
            if (e.ColumnIndex == 1)
            {
                ObraSocialAdd frm = new ObraSocialAdd(item);
                frm.ShowDialog();
            }
            Mostrar();
        }