Esempio n. 1
0
        private void btn_AltaTela_Click(object sender, EventArgs e)
        {
            TelaGestor telaGestor = new TelaGestor();

            controller.AltaTela(txt_Codigo.Text, txt_Descripcion.Text, int.Parse(txt_Cantidad.Text), "", false);
            dgv_Telas.DataSource = null;
            dgv_Telas.DataSource = telaGestor.GetListTelaSinTeñir();
        }
Esempio n. 2
0
        private void btn_BajaTela_Click(object sender, EventArgs e)
        {
            TelaGestor telaGestor = new TelaGestor();
            Tela       tela       = dgv_Telas.SelectedRows[0].DataBoundItem as Tela;

            controller.BajaTela(tela);
            dgv_Telas.DataSource = null;
            dgv_Telas.DataSource = telaGestor.GetListTelaSinTeñir();
        }
Esempio n. 3
0
        private void btn_ModificarTela_Click(object sender, EventArgs e)
        {
            TelaGestor telaGestor = new TelaGestor();
            Tela       tela       = dgv_Telas.SelectedRows[0].DataBoundItem as Tela;

            tela.Descripcion = txt_Descripcion.Text;
            tela.Cantidad    = int.Parse(txt_Cantidad.Text);
            controller.ModificarTela(tela);
            dgv_Telas.DataSource = null;
            dgv_Telas.DataSource = telaGestor.GetListTelaSinTeñir();
        }
Esempio n. 4
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();
        }
Esempio n. 5
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();
        }