Exemplo n.º 1
0
 private void button1_Click(object sender, EventArgs e)
 {
     openFileDialog1.ShowDialog();
     openFileDialog1.FileName.ToString();
     caf = caf.xmlToCaf(openFileDialog1.FileName.ToString());
     labelRutEmpresa.Text = caf.rutEmpresa;
     labelFchCaf.Text     = caf.fecha.ToString("yyyy-MM-dd");
     labelFolioIni.Text   = caf.folioInicial.ToString();
     labelFolioFinal.Text = caf.folioFinal.ToString();
     labelTipoDte.Text    = caf.tipoDte;
 }
Exemplo n.º 2
0
        public void actDataG()
        {
            dataGridView1.Rows.Clear();
            DataTable dt = new CafModel().getCafs();

            foreach (DataRow row in dt.Rows)
            {
                Int32 n = this.dataGridView1.Rows.Add();

                dataGridView1.Rows[n].Cells[0].Value = row["id"].ToString();
                dataGridView1.Rows[n].Cells[1].Value = row["rutEmpresa"].ToString();
                dataGridView1.Rows[n].Cells[2].Value = row["tipoDte"].ToString();
                dataGridView1.Rows[n].Cells[3].Value = row["folioInicial"].ToString();
                dataGridView1.Rows[n].Cells[4].Value = row["folioFinal"].ToString();
                dataGridView1.Rows[n].Cells[5].Value = Convert.ToDateTime(row["fecha"].ToString()).ToString("yyyy-MM-dd");
                dataGridView1.Rows[n].Cells[6].Value = "  Edita  ";
            }
        }