public static FrmacfACFp_Activo_Fijo_Buscar GetInstancia()
 {
     if (_Instancia == null)
     {
         _Instancia = new FrmacfACFp_Activo_Fijo_Buscar();
     }
     return(_Instancia);
 }
Пример #2
0
        private void button8_Click(object sender, EventArgs e)
        {
            datalistado1.Visible = true;
            //
            try
            {
                Form FrmBuscar = new FrmacfACFp_Activo_Fijo_Buscar();
                FrmBuscar.ShowDialog();

                string IdActi = FrmacfACFp_Activo_Fijo_Buscar.IdAct;
                //string iACFid = Microsoft.VisualBasic.Interaction.InputBox(
                //                 "Ingrese el Id del Activo Fijo",
                //                 "Ajuste del Valor del Bien");


                if (IdActi != null)                                             //iACFid
                {
                    DataTable tabla = NacfACFp_Activo_Fijo.IngresarACF(IdActi); //iACFid
                    if (tabla.Rows.Count > 0)
                    {
                        foreach (DataRow Drow in tabla.Rows)
                        {
                            int num = datalistado1.Rows.Add();
                            datalistado1.Rows[num].Cells[0].Value = Drow["ACFid"].ToString();
                            datalistado1.Rows[num].Cells[1].Value = Drow["PERNR"].ToString();
                            datalistado1.Rows[num].Cells[2].Value = Drow["ACFfincorporacion"].ToString();
                            datalistado1.Rows[num].Cells[3].Value = Drow["ACFdescripcion"].ToString();
                        }
                    }
                    else
                    {
                        MessageBox.Show("No Existe", "Registro");
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message + ex.StackTrace);
            }
        }