private void MostrarRegistro()
        {
            try
            {
                DataTable dat = NacfCMPt_Componente.Mostrar();

                //ACFdescripcion.Text= dat.Rows[0]["ACFdescripcion"].ToString();

                if (dat.Rows.Count > 0)
                {
                    DataRow row = dat.Rows[0];

                    txtCMPid.Text                = Convert.ToString(row["CMPid"]);
                    txtCMPcomponente.Text        = Convert.ToString(row["CMPcomponente"]);
                    txtCMPusoestimado.Text       = Convert.ToString(row["CMPusoestimado"]);
                    txtCMPconservacion.Text      = Convert.ToString(row["CMPconservacion"]);
                    txtCMPobsolecencia.Text      = Convert.ToString(row["CMPobsolecencia"]);
                    txtCMPlimitelegal.Text       = Convert.ToString(row["CMPlimitelegal"]);
                    txtCMPtotalfactores.Text     = Convert.ToString(row["CMPtotalfactores"]);
                    txtCMPfactorusoestimado.Text = Convert.ToString(row["CMPfactorusoestimado"]);
                    txtCMPvutilanio.Text         = Convert.ToString(row["CMPvutilanio"]);
                    txtCMPvutildia.Text          = Convert.ToString(row["CMPvutildia"]);
                    txtCMPnivel.Text             = Convert.ToString(row["CMPnivel"]);
                }
                else
                {
                    MessageBox.Show("No Existe", "Registro");
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
        //-----------------------------------------------------------------------------------
        // Inserta Registros
        //-----------------------------------------------------------------------------------
        private void InsertaRegistro()
        {
            string Rta = string.Empty;

            MessageBox.Show("insertar");
            try
            {
                Rta = NacfCMPt_Componente.Insertar(
                    this.txtCMPid.Text
                    , this.txtCMPcomponente.Text
                    , this.txtCMPusoestimado.Text
                    , this.txtCMPconservacion.Text
                    , this.txtCMPobsolecencia.Text
                    , this.txtCMPlimitelegal.Text
                    , this.txtCMPtotalfactores.Text
                    , this.txtCMPfactorusoestimado.Text
                    , this.txtCMPvutilanio.Text
                    , this.txtCMPvutildia.Text
                    //, this.txtCMPnivel.Text

                    );
                //Rta = NacfCMPt_Componente.Insertar(this.txtCMPid.Text, "1", "1", "1", "1", "1", "2", DateTime.Today.ToString(), "1", this.txtACFdescripcion.Text, DateTime.Today.ToString(), DateTime.Today.ToString(), "0", "0", "0.00", "0", "0", "0", "", "0", "", "", "", "", "", "", "0.00", "0.00", "", "", "1", "", "1", "", "", "", DateTime.Today.ToString(), "1", "", "1", "1", "1", DateTime.Today.ToString(), "1");

                if (Rta.Equals("OK"))
                {
                    this.MensajeOk("Regsitro Agregado Correctamente");
                }
                else
                {
                    this.MensajeError("Error al Insertar Registro :" + Rta);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }
 private void MostrarCombos()
 {
     NacfCMPt_Componente.Buscar("1");
 }
 private void buscarNombre()
 {
     NacfCMPt_Componente.Buscar("1");
 }