protected void Page_Load(object sender, EventArgs e)
    {
        this.nuevaConexion = new ConexionDesconectada();

        if (!IsPostBack)
        {
            nuevaConexion.copiarBaseDatos();
            this.nuevaConexion.llenarCombo(ref this.CategoryID, "Categories", "CategoryID", "CategoryName");
            this.nuevaConexion.llenarCombo(ref this.SupplierID, "Suppliers", "SupplierID", "CompanyName");
            this.nuevaConexion.desconectar();

            int id = int.Parse(Request.QueryString["ProductoID"]);

            Product productos = obj.obtenerProductoPorID(id);

            if (productos != null)
            {
                this.ProductID.Value          = productos.ProductID.ToString();
                this.ProductName.Text         = productos.ProductName.ToString();
                this.SupplierID.SelectedValue = productos.SupplierID.ToString();
                this.CategoryID.SelectedValue = productos.CategoryID.ToString();
                this.QuantityPerUnit.Text     = productos.QuantityPerUnit.ToString();
                this.UnitPrice.Text           = productos.UnitPrice.ToString();
                this.UnitsInStock.Text        = productos.UnitsInStock.ToString();
                this.UnitsOnOrder.Text        = productos.UnitsInStock.ToString();
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.nuevaConexion = new ConexionDesconectada();

        if (!IsPostBack)
        {
            nuevaConexion.copiarBaseDatos();
            this.nuevaConexion.llenarCombo(ref this.CategoryID, "Categories", "CategoryID", "CategoryName");
            this.nuevaConexion.llenarCombo(ref this.SupplierID, "Suppliers", "SupplierID", "CompanyName");
            object[] datosRetornados = this.nuevaConexion.getDataRow(int.Parse(Request.QueryString["ProductoID"]));
            this.nuevaConexion.desconectar();

            if (datosRetornados != null)
            {
                this.ProductID.Value          = datosRetornados[0].ToString();
                this.ProductName.Text         = datosRetornados[1].ToString();
                this.SupplierID.SelectedValue = datosRetornados[2].ToString();
                this.CategoryID.SelectedValue = datosRetornados[3].ToString();
                this.QuantityPerUnit.Text     = datosRetornados[4].ToString();
                this.UnitPrice.Text           = datosRetornados[5].ToString();
                this.UnitsInStock.Text        = datosRetornados[6].ToString();
                this.UnitsOnOrder.Text        = datosRetornados[7].ToString();
            }
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        this.nuevaConexion = new ConexionDesconectada();

        if (!IsPostBack)
        {
            nuevaConexion.copiarBaseDatos();
            this.nuevaConexion.llenarCombo(ref this.CategoryID, "Categories", "CategoryID", "CategoryName");
            this.nuevaConexion.llenarCombo(ref this.SupplierID, "Suppliers", "SupplierID", "CompanyName");
            this.nuevaConexion.desconectar();
        }
    }