示例#1
0
        // Metodo utilizado.
        private void LlenarCombo()
        {
            DepartamentoDropdownList.Items.Clear();
            CategoriaDropDownList.Items.Clear();
            ProveedorDropDownList.Items.Clear();
            RepositorioBase <Departamento> repositorio = new RepositorioBase <Departamento>();

            DepartamentoDropdownList.DataSource     = repositorio.GetList(x => true);
            DepartamentoDropdownList.DataValueField = "DepartamentoId";
            DepartamentoDropdownList.DataTextField  = "Nombre";
            DepartamentoDropdownList.DataBind();


            RepositorioBase <Categoria> repositorioCategoria = new RepositorioBase <Categoria>();

            CategoriaDropDownList.DataSource     = repositorioCategoria.GetList(x => true);
            CategoriaDropDownList.DataValueField = "CategoriaId";
            CategoriaDropDownList.DataTextField  = "Nombre";
            CategoriaDropDownList.DataBind();

            RepositorioBase <Proveedores> repositorioProveedor = new RepositorioBase <Proveedores>();

            ProveedorDropDownList.DataSource     = repositorioProveedor.GetList(x => true);
            ProveedorDropDownList.DataValueField = "IDProveedor";
            ProveedorDropDownList.DataTextField  = "Nombre";
            ProveedorDropDownList.DataBind();
        }
示例#2
0
 public void Limpiar()
 {
     IdTextBox.Text = "0";
     ProveedorDropDownList.ClearSelection();
     CategoriaDropDownList.ClearSelection();
     DepartamentoDropdownList.ClearSelection();
     DescripcionTextBox.Text = string.Empty;
     CostoTextBox.Text       = 0.ToString();
     PrecioTextBox.Text      = 0.ToString();
     CantidadTextBox.Text    = 0.ToString();
     GananciaTextBox.Text    = 0.ToString();
     fechaTextBox.Text       = DateTime.Now.ToString();
 }