Esempio n. 1
0
        private void btnAceptar_Click(object sender, EventArgs e)
        {
            if (ValidarDatos()) // sin dejar nada vacio
            {
                if (this.Ope == OperacionesABC.Agregar)
                {
                    this.Registro = new usp_ObtenerAlqClte_Result();
                }//fin de si es nuevo
                if (this.Ope != OperacionesABC.Eliminar || this.Ope != OperacionesABC.Ninguno)
                {
                    this.Registro.CodigoDeAlquiler        = this.TxtCodigo.Text.Trim();
                    this.Registro.FechaDelAlquiler        = this.DtpFechaAlq.Value;
                    this.Registro.FechaEstimadaDevolucion = this.DtpFechaDev.Value;
                    this.Registro.Titulo        = this.CmbLibros.Text.Trim();
                    this.Registro.NumeroDeCopia = int.Parse(this.CmbCopia.Text);

                    //campos escondidos
                    this.Registro.idCopia   = (int)this.CmbCopia.SelectedValue;
                    this.Registro.idLibro   = (int)this.CmbLibros.SelectedValue;
                    this.Registro.idCliente = this.idCliente;
                } //modifica y agrega
                Close();
            }     // if validardatos
        }
Esempio n. 2
0
 private void btnCancelar_Click(object sender, EventArgs e)
 {
     Registro = null;
     this.Close();
 }