Example #1
0
        private void DgRamas_MouseDoubleClick(object sender, MouseButtonEventArgs e)
        {
            int    si      = dgRamas.SelectedIndex;
            string rama    = "";
            string carpeta = "";

            if (si >= 0)
            {
                try
                {
                    if (lblTitulo.Content.ToString() == "Ramas")
                    {
                        DataTable dei = new DataTable();
                        dei = ((DataView)dgRamas.ItemsSource).ToTable();
                        string val = dei.Rows[si][1].ToString();
                        lblTitulo.Content = val;
                        datos d = new datos();
                        populate(d.carpetas, "Carpetas");
                    }
                    else
                    {
                        rama = lblTitulo.Content.ToString();
                        DataTable dei = new DataTable();
                        dei     = ((DataView)dgRamas.ItemsSource).ToTable();
                        carpeta = dei.Rows[si][1].ToString();
                        documentos d = new documentos(rama, carpeta);
                        d.ShowDialog();
                    }
                }
                catch (Exception z)
                {
                    MessageBox.Show(z.Message);
                }
            }
        }
Example #2
0
        public documentos(string r, string c)
        {
            InitializeComponent();
            lblTitulo.Content = string.Format("{0}/{1}", r, c);
            datos d = new datos();

            rama    = r;
            carpeta = c;
            dgDocumentos.ItemsSource = db.read(string.Format("verDocs '{0}','{1}'", r, c)).DefaultView;
        }