コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     lista         = new ListaFactura(Server.MapPath(@"~/Archivos/Facturas.bin"));
     listaClientes = new ListaClientes(Server.MapPath(@"~/Archivos/Clientes.bin"));
     if (!(IsPostBack))
     {
         for (int j = 0; j < listaClientes.NumReg(); j++)
         {
             cli         = listaClientes.LeerRegistro(j);
             combonombre = cli.Dni + " - " + cli.Apellido + " " + cli.Nombre;
             ComboCliente.Items.Add(combonombre);
         }
     }
     lista.CerrarFichero();
     listaClientes.CerrarFichero();
 }
コード例 #2
0
    protected void Alta(object sender, EventArgs e)
    {
        try
        {
            lista.AbrirFichero(Server.MapPath(@"~/Archivos/Clientes.bin"));


            string     nom  = Nombre.Text;
            string     ape  = Apellido.Text;
            long       Dni  = long.Parse(dni.Text);
            string     dom  = domicilio.Text;
            long       tele = long.Parse(tel.Text);
            int        cue  = Convert.ToInt32(cuenta.Text);
            string     em   = email.Text;
            clsCliente obj  = new clsCliente(nom, ape, Dni, dom, tele, cue, em);
            lista.AgregarRegistro(obj);
            //numeroReg = lista.NumReg();
            lista.CerrarFichero();
        }catch (IOException er) { }
    }
コード例 #3
0
 protected void Page_Load(object sender, EventArgs e)
 {
     lista = new ListaClientes(Server.MapPath(@"~/Archivos/Clientes.bin"));
     lista.CerrarFichero();
 }