Esempio n. 1
0
        private void btn_nuevo_Click(object sender, EventArgs e)
        {
            FormNuevoProducto f = new FormNuevoProducto();

            f.MdiParent = this.MdiParent;
            f.Show();
        }
Esempio n. 2
0
        private void productoToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (np == null)
            {
                np           = new FormNuevoProducto();
                np.MdiParent = this;

                np.FormClosed += new FormClosedEventHandler(FormNuevoProducto_formclosed);
                np.Show();
            }
        }
Esempio n. 3
0
        private void btn_editar_Click(object sender, EventArgs e)
        {
            try
            {
                string   codigo          = dgw_bienes.CurrentRow.Cells[0].Value.ToString();
                string[] codigo_separado = codigo.Split('-');
                string   categoria       = codigo_separado[0].ToString();
                string   id_bien         = codigo_separado[1].ToString();
                string   descripcion     = dgw_bienes.CurrentRow.Cells[1].Value.ToString().Trim();
                string   categoria_nom   = dgw_bienes.CurrentRow.Cells[2].Value.ToString().Trim();
                string   precio          = dgw_bienes.CurrentRow.Cells[4].Value.ToString().Trim();
                string   costo           = dgw_bienes.CurrentRow.Cells[5].Value.ToString().Trim();
                string   medida          = dgw_bienes.CurrentRow.Cells[6].Value.ToString().Trim();
                string   linea           = dgw_bienes.CurrentRow.Cells[7].Value.ToString().Trim();
                string   marca           = dgw_bienes.CurrentRow.Cells[8].Value.ToString().Trim();



                SistemaInventarioDatos sd = new SistemaInventarioDatos();
                FormNuevoProducto      f  = new FormNuevoProducto();
                f.MdiParent = this.MdiParent;
                f.Show();
                f.txt_desc.Text   = descripcion;
                f.txt_costo.Text  = costo;
                f.txt_precio.Text = precio;
                string comisdion = sd.ObtenerComision(id_bien, categoria);
                f.txt_comision.Text = comisdion;

                int indice_categoria = f.cbo_Categoria.FindString(categoria_nom);
                f.cbo_Categoria.SelectedIndex = indice_categoria;

                int indice_linea = f.cbo_linea.FindString(linea);
                f.cbo_linea.SelectedIndex = indice_linea;

                int indice_marca = f.cbo_marca.FindString(marca);
                f.cbo_marca.SelectedIndex = indice_marca;

                string medidareal    = sd.ObtenerMedidaReal(medida);
                int    indice_medida = f.cbo_medida.FindString(medidareal);
                f.cbo_medida.SelectedIndex = indice_medida;

                f.lbl_codigo.Text = codigo;

                f.cbo_Categoria.Enabled = false;
                f.Editar      = true;
                f.id_bien     = id_bien;
                f.id_categria = categoria;
                //f.MdiParent = this.MdiParent;
                // f.Show();
            }
            catch (Exception ex) { MessageBox.Show(ex.Message); }
        }
Esempio n. 4
0
        private void button1_Click_1(object sender, EventArgs e)
        {
            FormNuevoProducto np = new FormNuevoProducto();

            np.Show();
        }