Exemplo n.º 1
0
        private void AreaTeñidoMenu_Load(object sender, EventArgs e)
        {
            IniciarControles();
            TelaGestor  telaGestor  = new TelaGestor();
            TinteGestor tinteGestor = new TinteGestor();

            dgv_Telas.DataSource        = null;
            dgv_Telas.DataSource        = telaGestor.GetListTelaSinTeñir();
            dgv_TelasTeñidas.DataSource = null;
            dgv_TelasTeñidas.DataSource = telaGestor.GetListTelaTeñida();
            dgv_Tintes.DataSource       = null;
            dgv_Tintes.DataSource       = tinteGestor.GetListTinte();
        }
Exemplo n.º 2
0
        private void btn_Tenir_Click(object sender, EventArgs e)
        {
            Tela   tela               = dgv_Telas.SelectedRows[0].DataBoundItem as Tela;
            Tinte  tinte              = dgv_Tintes.SelectedRows[0].DataBoundItem as Tinte;
            int    cantTelaUtilizada  = int.Parse(Interaction.InputBox("¿Cuánta cantidad de la tela seleccionada desea utilizar?"));
            int    cantTinteUtilizado = int.Parse(Interaction.InputBox("¿Cuánta cantidad del tinte selecionado desea utilizar?"));
            string codigoTela         = Interaction.InputBox("Ingrese el nombre de la tela tintada resultante");

            controller.Teñir(tela, cantTelaUtilizada, tinte, cantTinteUtilizado, codigoTela);
            TelaGestor  telaGestor  = new TelaGestor();
            TinteGestor tinteGestor = new TinteGestor();

            dgv_Telas.DataSource        = null;
            dgv_Telas.DataSource        = telaGestor.GetListTelaSinTeñir();
            dgv_TelasTeñidas.DataSource = null;
            dgv_TelasTeñidas.DataSource = telaGestor.GetListTelaTeñida();
            dgv_Tintes.DataSource       = null;
            dgv_Tintes.DataSource       = tinteGestor.GetListTinte();
        }