Beispiel #1
0
 //update
 private void btnUpdate_Click(object sender, EventArgs e)
 {
     int fila = DgvCatalogos.CurrentCell.RowIndex;
     String valor = DgvCatalogos.Rows[fila].Cells[0].Value.ToString();
     int Id = Int32.Parse(valor);
     NewUpdateCatalogo frmNewCat = new NewUpdateCatalogo(Id,id);
     frmNewCat.MdiParent = this.MdiParent;
     frmNewCat.StartPosition = FormStartPosition.CenterScreen;
     frmNewCat.Show();
     frmNewCat.Disposed += new EventHandler(disposeNew);
 }
Beispiel #2
0
        private void btnNew_Click(object sender, EventArgs e)
        {
            int Id = 0;
            if (lblCatalogo.Text == "Aseguradoras")
            {
                id = 1;
            }
            else if (lblCatalogo.Text == "Autoridad")
            {
                id = 2;
            }
            else if (lblCatalogo.Text == "Colores")
            {
                id = 3;
            }
            else if (lblCatalogo.Text == "Corralón")
            {
                id = 4;
            }
            else if (lblCatalogo.Text == "Empresas y/o Municipios")
            {
                id = 5;
            }
            else if (lblCatalogo.Text == "Encargado")
            {
                id = 6;
            }
            else if (lblCatalogo.Text == "Motivos")
            {
                id = 7;
            }
            else if (lblCatalogo.Text == "Tipos De Pago")
            {
                id = 8;
            }
            else if (lblCatalogo.Text == "Vehículos")
            {
                id = 9;
            }

            NewUpdateCatalogo frmNewCat = new NewUpdateCatalogo(Id,id);
            frmNewCat.MdiParent = this.MdiParent;
            frmNewCat.StartPosition = FormStartPosition.CenterScreen;
            frmNewCat.Show();
            frmNewCat.Disposed += new EventHandler(disposeNew);
        }