コード例 #1
0
ファイル: CatalogoForm.cs プロジェクト: cbsoul/Inventarios2
 //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);
 }
コード例 #2
0
ファイル: CatalogoForm.cs プロジェクト: cbsoul/Inventarios2
        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);
        }