private void data_articuloid(String xarticid)
        {
            form_bloqueado(false);
            var rowarticid = Tablaarticulo.Select("articid='" + xarticid + "'");
            if (rowarticid.Length > 0)
            {
                foreach (DataRow row in rowarticid)
                {
                    articid.Text = row["articid"].ToString().Trim();
                    articidold.Text = row["articidold"].ToString().Trim();
                    grupoid.Text = row["grupoid"].ToString().Trim();
                    gruponame.Text = row["gruponame"].ToString().Trim();
                    articname.Text = row["articname"].ToString().Trim();
                    marcaid.Text = row["marcaid"].ToString().Trim();
                    Valida_Marca(marcaid.Text);
                    marcaname.Text = row["marcaname"].ToString().Trim();
                    lineaid.Text = row["lineaid"].ToString().Trim();
                    Valida_Linea(lineaid.Text);
                    lineaname.Text = row["lineaname"].ToString().Trim();
                    modeloid.Text = row["modeloid"].ToString().Trim();
                    modeloname.Text = row["modeloname"].ToString().Trim();
                    familiatelaid.Text = row["familiatelaid"].ToString().Trim();
                    if (familiatelaid.Text.Length > 0)
                    {
                        Valida_Familia(familiatelaid.Text);
                    }

                    familiatelaname.Text = row["familianame"].ToString().Trim();
                    coleccionid.Text = row["coleccionid"].ToString().Trim();
                    coleccionname.Text = row["coleccionname"].ToString().Trim();
                    cboCanalventaid.SelectedValue = row["canalventaid"].ToString().Trim();
                    cmb_estacionid.SelectedValue = row["estacionid"].ToString().Trim();
                    cmb_temporadaid.SelectedValue = row["temporadaid"].ToString().Trim();
                    cmb_categoriaid.SelectedValue = row["categoriaid"].ToString().Trim();
                    cmb_generoid.SelectedValue = row["generoid"].ToString().Trim();
                    cmb_parteid.SelectedValue = row["parteid"].ToString().Trim();
                    cmb_entalleid.SelectedValue = row["entalleid"].ToString().Trim();
                    cmb_botapieid.SelectedValue = row["botapieid"].ToString().Trim();
                    cmb_tallaid.SelectedValue = row["tallaid"].ToString().Trim();
                    cmb_estadoid.SelectedValue = row["estadoid"].ToString().Trim();
                    var num = Convert.ToBoolean(row["es_mercaderia"].ToString());
                    var n = 0;
                    if (num)
                    {
                        n = 1;
                    }
                    else
                    {
                        if (!num)
                        {
                            n = 0;
                        }
                    }
                    cmb_esmercaderia.SelectedIndex = n;
                    cmb_procedenciaid.SelectedValue = row["procedenciaid"].ToString().Trim();

                    chk_ta01.Checked = Convert.ToBoolean(row["ta01"].ToString().Trim());
                    chk_ta01.Text = row["talla01"].ToString().Trim();
                    chk_ta02.Checked = Convert.ToBoolean(row["ta02"].ToString().Trim());
                    chk_ta02.Text = row["talla02"].ToString().Trim();
                    chk_ta03.Checked = Convert.ToBoolean(row["ta03"].ToString().Trim());
                    chk_ta03.Text = row["talla03"].ToString().Trim();
                    chk_ta04.Checked = Convert.ToBoolean(row["ta04"].ToString().Trim());
                    chk_ta04.Text = row["talla04"].ToString().Trim();
                    chk_ta05.Checked = Convert.ToBoolean(row["ta05"].ToString().Trim());
                    chk_ta05.Text = row["talla05"].ToString().Trim();
                    chk_ta06.Checked = Convert.ToBoolean(row["ta06"].ToString().Trim());
                    chk_ta06.Text = row["talla06"].ToString().Trim();
                    chk_ta07.Checked = Convert.ToBoolean(row["ta07"].ToString().Trim());
                    chk_ta07.Text = row["talla07"].ToString().Trim();
                    chk_ta08.Checked = Convert.ToBoolean(row["ta08"].ToString().Trim());
                    chk_ta08.Text = row["talla08"].ToString().Trim();
                    chk_ta09.Checked = Convert.ToBoolean(row["ta09"].ToString().Trim());
                    chk_ta09.Text = row["talla09"].ToString().Trim();
                    chk_ta10.Checked = Convert.ToBoolean(row["ta10"].ToString().Trim());
                    chk_ta10.Text = row["talla10"].ToString().Trim();
                    chk_ta11.Checked = Convert.ToBoolean(row["ta11"].ToString().Trim());
                    chk_ta11.Text = row["talla11"].ToString().Trim();
                    chk_ta12.Checked = Convert.ToBoolean(row["ta12"].ToString().Trim());
                    chk_ta12.Text = row["talla12"].ToString().Trim();

                    txtvariante.Text = row["variante"].ToString();
                    txtcodtizados.Text = row["codinge"].ToString();

                    prec_costo.Text = row["prec_costo"].ToString();
                    real_costo.Text = row["real_costo"].ToString();
                    precventa_cre_mayor.Text = row["precventa_cre_mayor"].ToString();
                    precventa_cre_menor.Text = row["precventa_cre_menor"].ToString();
                    precventa_tda_mayor.Text = row["precventa_tda_mayor"].ToString();
                    precventa_tda_menor.Text = row["precventa_tda_menor"].ToString();
                    precventa_csc_mayor.Text = row["precventa_csc_mayor"].ToString();
                    precventa_csc_menor.Text = row["precventa_csc_menor"].ToString();
                    prec_etiq.Text = row["prec_etiq"].ToString();
                    prec_ofer.Text = row["prec_ofer"].ToString();

                    var BE = new tb_pt_articulo();
                    var BL = new tb_pt_articuloBL();
                    var dt = new DataTable();
                    BE.articidold = articidold.Text.Trim();
                    dt = BL.GetAll_foto(EmpresaID, BE).Tables[0];
                    if (dt.Rows.Count > 0)
                    {
                        if (dt.Rows[0]["foto"].ToString() != string.Empty)
                        {
                            var MyData1 = (byte[])null;
                            MyData1 = (byte[])(dt.Rows[0]["foto"]);

                            if (MyData1 != null && MyData1.Length != 0)
                            {
                                vmContenidoFile = MyData1;
                                foto.Visible = true;
                                foto.Image = null;
                                var ms = new System.IO.MemoryStream();
                                _nombreFoto = dt.Rows[0]["docname"].ToString();
                                ms.Write(MyData1, 0, MyData1.Length);
                                foto.Image = Image.FromStream(ms);
                            }
                            else
                            {
                                foto.Visible = false;
                                foto.ImageLocation = string.Empty;
                            }
                        }
                        else
                        {
                            foto.Visible = false;
                            foto.ImageLocation = string.Empty;
                        }
                    }
                    else
                    {
                        foto.Visible = false;
                        foto.ImageLocation = string.Empty;
                    }
                    btn_nuevo.Enabled = true;
                    btn_editar.Enabled = true;
                    btn_eliminar.Enabled = true;
                    btn_imprimir.Enabled = true;

                    btn_primero.Enabled = false;
                    btn_anterior.Enabled = false;
                    btn_siguiente.Enabled = false;
                    btn_ultimo.Enabled = false;

                    btn_log.Enabled = true;
                    btn_salir.Enabled = true;
                }
            }
        }
 private void ValidaInsert_Update()
 {
     var BL = new tb_pt_articuloBL();
     var BE = new tb_pt_articulo();
     var dt = new DataTable();
     BE.articidold = articidold.Text.Trim();
     dt = BL.GetAll_CODdbf(EmpresaID, BE).Tables[0];
     if (dt.Rows.Count > 0)
     {
         var n = Convert.ToInt32(dt.Rows[0]["cant"].ToString());
         if (n > 0)
         {
             Update_DBF();
         }
         else
         {
             Insert_DBF();
         }
     }
 }
        private void Combinación_Marca_Modelo_Tela()
        {
            var BE = new tb_pt_articulo();
            var BL = new tb_pt_articuloBL();
            var dt = new DataTable();
            BE.marcaid = marcaid.Text.Trim();
            BE.modeloid = modeloid.Text.Trim();
            BE.familiatelaid = familiatelaid.Text.Trim();

            dt = BL.GeneraCod2(EmpresaID, BE).Tables[0];
            if (dt.Rows[0]["codigo"].ToString() != string.Empty)
            {
                articidold.Text = dt.Rows[0]["codigo"].ToString();
                bloqueo_paneles(true);
                pnl_02.Enabled = false;
                pnl_06.Enabled = false;
                pnl_05.Enabled = false;
                pnl_03.Enabled = true;
            }
            else
            {
                MessageBox.Show("!!!... Ya Existe Combinación ...!!!");
                limpiar_documento();
                grupoid.Focus();
                bloqueo_paneles(false);
                pnl_02.Enabled = false;
                pnl_06.Enabled = false;
                pnl_05.Enabled = false;
                return;
            }
        }
        private void Update_DBF()
        {
            try
            {
                if (articid.Text.Trim().Length != 4)
                {
                    MessageBox.Show("Falta Codigo Artículo !!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    if (grupoid.Text.Trim().Length == 0)
                    {
                        MessageBox.Show("Falta Codigo de Proveedor", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                        return;
                    }
                    else
                    {
                        if (marcaid.Text.Trim().Length == 0)
                        {
                            MessageBox.Show("Falta Codigo de Marca", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                            return;
                        }
                        else
                        {
                            if (lineaid.Text.Trim().Length == 0)
                            {
                                MessageBox.Show("Falta Codigo de Linea", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                return;
                            }
                            else
                            {
                                if (articidold.Text.Trim().Length == 0)
                                {
                                    MessageBox.Show("Falta Codigo de Articulo-Generado", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                    return;
                                }
                                else
                                {
                                    if (cmb_categoriaid.SelectedIndex == -1)
                                    {
                                        MessageBox.Show("Falta Seleccionar La Categoria", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                        return;
                                    }
                                    else
                                    {
                                        if (cmb_generoid.SelectedIndex == -1)
                                        {
                                            MessageBox.Show("Falta Seleccionar el Genero", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                            return;
                                        }
                                        else
                                        {
                                            if (cmb_tallaid.SelectedIndex == -1)
                                            {
                                                MessageBox.Show("Falta Seleccionar Talla", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                return;
                                            }
                                            else
                                            {
                                                if (cmb_procedenciaid.SelectedIndex == -1)
                                                {
                                                    MessageBox.Show("Falta Seleccionar Procedencia", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                    return;
                                                }
                                                else
                                                {
                                                    if (cmb_estadoid.SelectedIndex == -1)
                                                    {
                                                        MessageBox.Show("Falta Seleccionar Situación", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                        return;
                                                    }
                                                    else
                                                    {
                                                        if (prec_costo.Text.Trim().Length == 0)
                                                        {
                                                            MessageBox.Show("Falta Ingresar el Prec-Costo", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                                                            return;
                                                        }
                                                        else
                                                        {
                                                            var BL = new tb_pt_articuloBL();
                                                            var BE = new tb_pt_articulo();

                                                            BE.articid = articid.Text.Trim();
                                                            BE.articidold = articidold.Text.Trim();
                                                            BE.articname = articname.Text.Trim();
                                                            BE.articdsav = string.Empty;
                                                            BE.preccosto = Convert.ToDecimal(prec_costo.Text.Trim());
                                                            if (real_costo.Text.Length > 0)
                                                            {
                                                                BE.real_costo = Convert.ToDecimal(real_costo.Text.Trim());
                                                            }
                                                            else
                                                            {
                                                                BE.real_costo = Convert.ToDecimal("0.00".ToString());
                                                            }
                                                            BE.precventa_cre_mayor = Convert.ToDecimal(precventa_cre_mayor.Text.Trim());
                                                            BE.precventa_cre_menor = Convert.ToDecimal(precventa_cre_menor.Text.Trim());
                                                            BE.precventa_tda_mayor = Convert.ToDecimal(precventa_tda_mayor.Text.Trim());
                                                            BE.precventa_tda_menor = Convert.ToDecimal(precventa_tda_menor.Text.Trim());
                                                            BE.precventa_csc_mayor = Convert.ToDecimal(precventa_csc_mayor.Text.Trim());
                                                            BE.precventa_csc_menor = Convert.ToDecimal(precventa_csc_menor.Text.Trim());

                                                            BE.categoriaid = Equivalencias.Right(cmb_categoriaid.SelectedValue.ToString(), 1);

                                                            BE.marcaid = marcaid.Text.Trim();
                                                            BE.lineaid = lineaid.Text.Trim();

                                                            BE.generoid = cmb_generoid.SelectedValue.ToString();

                                                            if (cmb_generoid.SelectedValue.ToString() == "1".ToString())
                                                            {
                                                                BE.generoid2 = "C".ToString();
                                                            }
                                                            if (cmb_generoid.SelectedValue.ToString() == "2".ToString())
                                                            {
                                                                BE.generoid2 = "D".ToString();
                                                            }
                                                            if (cmb_generoid.SelectedValue.ToString() == "3".ToString())
                                                            {
                                                                BE.generoid2 = "N".ToString();
                                                            }

                                                            BE.tejidoid = _tejidoid.ToString();
                                                            BE.familiatelaid = familiatelaid.Text.Trim();

                                                            if (cmb_botapieid.SelectedIndex != -1)
                                                            {
                                                                BE.botapieid = cmb_botapieid.SelectedValue.ToString();
                                                            }
                                                            else
                                                            {
                                                                BE.botapieid = string.Empty.ToString();
                                                            }

                                                            if (cmb_entalleid.SelectedIndex != -1)
                                                            {
                                                                BE.entalleid = cmb_entalleid.SelectedValue.ToString();
                                                            }
                                                            else
                                                            {
                                                                BE.entalleid = string.Empty.ToString();
                                                            }

                                                            BE.coleccionid = coleccionid.Text.Trim();
                                                            BE.subcoleccionid = subcoleccionid.Text.Trim();

                                                            if (cmb_temporadaid.SelectedIndex != -1)
                                                            {
                                                                BE.temporadaid = cmb_temporadaid.SelectedValue.ToString();
                                                            }
                                                            else
                                                            {
                                                                BE.temporadaid = string.Empty;
                                                            }

                                                            BE.telaidvfp = string.Empty;
                                                            BE.modeloid = modeloid.Text.Trim();
                                                            BE.estructuraid = _estructuraid.ToString();

                                                            if (cmb_estacionid.SelectedValue != null)
                                                            {
                                                                BE.estacionid = cmb_estacionid.SelectedValue.ToString();
                                                            }
                                                            else
                                                            {
                                                                BE.estacionid = string.Empty.ToString();
                                                            }

                                                            if (cmb_temporadaid.SelectedValue != null)
                                                            {
                                                                BE.temporadaid = cmb_temporadaid.SelectedValue.ToString();
                                                            }
                                                            else
                                                            {
                                                                BE.temporadaid = string.Empty.ToString();
                                                            }

                                                            BE.procedenciaid = cmb_procedenciaid.SelectedValue.ToString();
                                                            BE.grupoid = grupoid.Text.Trim();
                                                            BE.rubroid = string.Empty;
                                                            if (cmb_parteid.SelectedIndex != -1)
                                                            {
                                                                BE.parte = cmb_parteid.SelectedValue.ToString();
                                                            }
                                                            else
                                                            {
                                                                BE.parte = string.Empty.ToString();
                                                            }
                                                            BE.tallaid = cmb_tallaid.SelectedValue.ToString();
                                                            BE.ta01 = chk_ta01.Checked;
                                                            BE.ta02 = chk_ta02.Checked;
                                                            BE.ta03 = chk_ta03.Checked;
                                                            BE.ta04 = chk_ta04.Checked;
                                                            BE.ta05 = chk_ta05.Checked;
                                                            BE.ta06 = chk_ta06.Checked;
                                                            BE.ta07 = chk_ta07.Checked;
                                                            BE.ta08 = chk_ta08.Checked;
                                                            BE.ta09 = chk_ta09.Checked;
                                                            BE.ta10 = chk_ta10.Checked;
                                                            BE.ta11 = chk_ta11.Checked;
                                                            BE.ta12 = chk_ta12.Checked;
                                                            BE.variante = txtvariante.Text.Trim();
                                                            BE.codinge = txtcodtizados.Text.Trim();
                                                            BE.prec_etiq = Convert.ToDecimal(prec_etiq.Text.ToString());
                                                            BE.prec_ofer = Convert.ToDecimal(prec_ofer.Text.ToString());
                                                            BE.fechpi = DateTime.Today;
                                                            BE.fechui = DateTime.Today;

                                                            if (cmb_estadoid.SelectedValue.ToString() == "SA")
                                                            {
                                                                BE.estado2 = true;
                                                            }
                                                            else
                                                            {
                                                                BE.estado2 = false;
                                                            }
                                                            BE.estado = cmb_estadoid.SelectedValue.ToString();

                                                            if (cmb_esmercaderia.SelectedIndex != -1)
                                                            {
                                                                BE.es_mercaderia = Convert.ToBoolean(cmb_esmercaderia.SelectedIndex);
                                                            }

                                                            BE.status = "0";
                                                            BE.usuar = VariablesPublicas.Usuar.Trim();

                                                            BE.marcaname = marcaname.Text.ToString();
                                                            BE.lineaidold = _xlineaidold.ToString();
                                                            BE.marcaidold = _xmarcaidold.ToString();

                                                            if (BL.Update_dbf(EmpresaID, BE))
                                                            {
                                                                MessageBox.Show("Datos Modificados Correctamente !!!", "Confirmación", MessageBoxButtons.OK, MessageBoxIcon.Information);
                                                                procesado = true;
                                                            }
                                                        }
                                                    }
                                                }
                                            }
                                        }
                                    }
                                }
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void Update_Foto()
        {
            try
            {
                var BL = new tb_pt_articuloBL();
                var BE = new tb_pt_articulo();
                BE.articidold = articidold.Text.Trim();
                BE.docname = _nombreFoto.ToString();
                var ms = new System.IO.MemoryStream();

                if (foto.Image != null)
                {
                    foto.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
                }

                BE.Foto = ms.GetBuffer();
                BL.Update_foto(EmpresaID, BE);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #6
0
        void ValidaArticulo2()
        {
            if (txt_articidoldbus.Text.ToString().Length == 7)
            {
                DataTable Data = new DataTable();
                String Query = " SELECT DISTINCT a.articid,articidold,articname,max(rd.[version])'version' " +
                               " FROM tb_pt_articulo a " +
                               " INNER JOIN tb_pp_recetadet rd ON a.articid = rd.articid " +
                               " WHERE articidold = '" + txt_articidoldbus.Text + "' GROUP BY a.articid,articidold,articname ";
                Data = DatosSQL(Query);

                if (Data.Rows.Count > 0)
                {
                    xarticid = Data.Rows[0]["articid"].ToString();
                    txt_articidoldbus.Text = Data.Rows[0]["articidold"].ToString();
                    txt_articnamebus.Text = Data.Rows[0]["articname"].ToString();
                    txt_versionbus.Text = Data.Rows[0]["version"].ToString();

                    tb_pt_articuloBL BL = new tb_pt_articuloBL();
                    tb_pt_articulo BE = new tb_pt_articulo();
                    DataTable dt = new DataTable();
                    BE.articid = Data.Rows[0]["articid"].ToString();
                    BE.top = true;
                    dt = BL.GetAll_Color(EmpresaID, BE).Tables[0];
                    if (dt.Rows.Count > 0)
                    {
                        dgv_color.Columns[2].HeaderText = dt.Rows[0]["talla01"].ToString();
                        dgv_color.Columns[3].HeaderText = dt.Rows[0]["talla02"].ToString();
                        dgv_color.Columns[4].HeaderText = dt.Rows[0]["talla03"].ToString();
                        dgv_color.Columns[5].HeaderText = dt.Rows[0]["talla04"].ToString();
                        dgv_color.Columns[6].HeaderText = dt.Rows[0]["talla05"].ToString();
                        dgv_color.Columns[7].HeaderText = dt.Rows[0]["talla06"].ToString();
                        dgv_color.Columns[8].HeaderText = dt.Rows[0]["talla07"].ToString();
                        dgv_color.Columns[9].HeaderText = dt.Rows[0]["talla08"].ToString();
                        dgv_color.Columns[10].HeaderText = dt.Rows[0]["talla09"].ToString();
                        dgv_color.Columns[11].HeaderText = dt.Rows[0]["talla10"].ToString();
                        dgv_color.Columns[12].HeaderText = dt.Rows[0]["talla11"].ToString();
                        dgv_color.Columns[13].HeaderText = dt.Rows[0]["talla12"].ToString();
                        dgv_color.AutoGenerateColumns = false;
                        dgv_color.DataSource = dt;
                        dgv_color.Enabled = true;
                    }

                    PintarCeldas();
                }
                else
                {
                    MessageBox.Show("El Articulo No tiene Recetas...!!!", "Confirmación", MessageBoxButtons.OK, MessageBoxIcon.Information);
                }
            }
        }
 private void toolRegenDenom_Click(object sender, EventArgs e)
 {
     //CargarDatosVariantes(txtvariante.Text.ToString());
     //cmb_generoid_SelectedIndexChanged(sender, e);
     //cmb_entalleid_SelectedIndexChanged(sender, e);
     //cmb_botapieid_SelectedIndexChanged(sender, e);
     var BL = new tb_pt_articuloBL();
     var BE = new tb_pt_articulo();
     DataTable dt = new DataTable();
     BE.variante = txtvariante.Text.ToString().ToUpper().Trim();
     dt = BL.GetAll_DESCORT(EmpresaID, BE).Tables[0];
     if (dt.Rows.Count > 0)
     {
         _xmarcadescort = dt.Rows[0]["marcadescort"].ToString();
         _xlineadescort = dt.Rows[0]["lineadescort"].ToString();
         _xmodelodescort = dt.Rows[0]["modelodescort"].ToString();
         _xentalledescort = dt.Rows[0]["entalledescort"].ToString();
         _xbotapiedescort = dt.Rows[0]["botapiedescort"].ToString();
         _xgenerodescort = dt.Rows[0]["generodescort"].ToString();
         _GenerarNombre();
     }
 }
 void act_Nombre()
 {
     var BL = new tb_pt_articuloBL();
     var BE = new tb_pt_articulo();
     DataTable dt = new DataTable();
     BE.variante = txtvariante.Text.ToString().ToUpper().Trim();
     dt = BL.GetAll_DESCORT(EmpresaID, BE).Tables[0];
     if (dt.Rows.Count > 0)
     {
         _xmarcadescort = dt.Rows[0]["marcadescort"].ToString();
         _xlineadescort = dt.Rows[0]["lineadescort"].ToString();
         _xmodelodescort = dt.Rows[0]["modelodescort"].ToString();
         _xentalledescort = dt.Rows[0]["entalledescort"].ToString();
         _xbotapiedescort = dt.Rows[0]["botapiedescort"].ToString();
         _xgenerodescort = dt.Rows[0]["generodescort"].ToString();
         _GenerarNombre();
     }
 }
        private void Delete()
        {
            try
            {
                if (articid.Text.Trim().Length != 4)
                {
                    MessageBox.Show("Falta Codigo Artículo !!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    var BL = new tb_pt_articuloBL();
                    var BE = new tb_pt_articulo();
                    BE.articid = articid.Text.Trim().PadLeft(4, '0');

                    if (BL.Delete(EmpresaID, BE))
                    {
                        SEGURIDAD_LOG("E");
                        MessageBox.Show("Datos Eliminados Correctamente !!!", "Confirmación", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        NIVEL_FORMS();
                        form_bloqueado(false);
                        data_Tablaarticulo();
                        btn_nuevo.Enabled = true;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    private void MetodoCargarLineal()
    {
        tb_pt_articuloBL BL = new tb_pt_articuloBL();
        tb_pt_articulo BE = new tb_pt_articulo();
        DataTable dt = new DataTable();
        BE.articidold = txt_articidold.Text.ToUpper();
        dt = BL.GetAll(Session["ssEmpresaID"].ToString(), BE).Tables[0];

        if (dt.Rows.Count > 0)
        {
            Session["bd_marcaid"] = dt.Rows[0]["marcaid"].ToString();
            txt_marcaname.Text = dt.Rows[0]["marcaname"].ToString();
            Session["bd_articid"] = dt.Rows[0]["articid"].ToString();
            txt_articname.Text = dt.Rows[0]["articname"].ToString();
            txt_precventa_cre_menor.Text = dt.Rows[0]["precventa_cre_menor"].ToString();
            Session["bd_tallaid"] = dt.Rows[0]["tallaid"].ToString();
            // Metodos De Cargar Combos
            CargarComboArticuloColor(dt.Rows[0]["articid"].ToString());
            CargarComboArticuloTallas(dt.Rows[0]["tallaid"].ToString());

            btn_add.Enabled = true;
            btn_add.CssClass = "boton_add2";
        }
    }
예제 #11
0
        private void data_Tablaarticulo()
        {
            try
            {
                if (Tablaarticulo.Rows.Count > 0)
                {
                    Tablaarticulo.Rows.Clear();
                }

                var BL = new tb_pt_articuloBL();
                var BE = new tb_pt_articulo();

                BE.articname = txt_criterio.Text.Trim().ToUpper();

                Tablaarticulo = BL.GetAll2(EmpresaID, BE).Tables[0];
                if (Tablaarticulo.Rows.Count > 0)
                {
                    btn_imprimir.Enabled = true;
                    mdi_gridarticulo.DataSource = Tablaarticulo;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
    private void data_gridArticulo()
    {
        tb_pt_articuloBL BL = new tb_pt_articuloBL();
        tb_pt_articulo BE = new tb_pt_articulo();
        DataTable dt = new DataTable();
        BE.articidold = txt_articidold.Text.ToUpper();

        switch (cbo_filtro.SelectedValue)
        {
            case "01":
                BE.articidold = txt_filter.Text.Trim().ToUpper();
                break;
            case "02":
                BE.articname = txt_filter.Text.Trim().ToUpper();
                break;
            default:
                //**
                break;
        }
        try
        {
            //Eliminar Columnas Actuales(Opcional):
            GridView1.Columns.Clear();
            GridView1.Width = 550;
            //Objeto Columna:
            CommandField image;
            //Crear Columna:
            image = new CommandField();
            image.ButtonType = ButtonType.Image;
            image.SelectImageUrl = "~/Images/go-search.png";
            image.ShowSelectButton = true;
            image.ItemStyle.Width = 10;
            image.ItemStyle.Wrap = true;
            GridView1.Columns.Add(image);

            BoundField ARTICIDOLD;
            ARTICIDOLD = new BoundField();
            ARTICIDOLD.DataField = "articidold";
            ARTICIDOLD.HeaderText = "CODIGO_OLD";
            ARTICIDOLD.ItemStyle.Width = 70;
            GridView1.Columns.Add(ARTICIDOLD);

            BoundField ARTICNAME;
            ARTICNAME = new BoundField();
            ARTICNAME.DataField = "articname";
            ARTICNAME.HeaderText = "ARTICULO";
            ARTICNAME.ItemStyle.Width = 250;
            GridView1.Columns.Add(ARTICNAME);

            GridView1.DataSource = BL.GetAll(Session["ssEmpresaID"].ToString(), BE);
            GridView1.DataBind();
            GridView1.Visible = true;
        }
        catch (Exception ex)
        {
            ClientMessage(ex.Message);
        }
    }
        void ValidaArticulo()
        {
            try
            {
                tb_pt_articuloBL BL = new tb_pt_articuloBL();
                tb_pt_articulo BE = new tb_pt_articulo();
                DataTable dt = new DataTable();

                BE.top = true;
                BE.articidold = txt_articidold.Text;
                if (txt_articidold.Text.ToString().Trim().Length == 7)
                {
                    dt = BL.GetAll(EmpresaID, BE).Tables[0];
                    if (dt.Rows.Count > 0)
                    {
                        /**************************
                        * PONEMOS NOMBRE A LAS COLUMNAS DEACUERDO A LA TALLAID
                        * ***************/
                        tb_pt_tallaBL BL4 = new tb_pt_tallaBL();
                        tb_pt_talla BE4 = new tb_pt_talla();
                        DataTable tall = new DataTable();
                        BE4.tallaid = dt.Rows[0]["tallaid"].ToString();
                        tall = BL4.GetAll(EmpresaID, BE4).Tables[0];

                        dgv_color.Columns[3].HeaderText = tall.Rows[0]["talla01"].ToString();
                        dgv_color.Columns[4].HeaderText = tall.Rows[0]["talla02"].ToString();
                        dgv_color.Columns[5].HeaderText = tall.Rows[0]["talla03"].ToString();
                        dgv_color.Columns[6].HeaderText = tall.Rows[0]["talla04"].ToString();
                        dgv_color.Columns[7].HeaderText = tall.Rows[0]["talla05"].ToString();
                        dgv_color.Columns[8].HeaderText = tall.Rows[0]["talla06"].ToString();
                        dgv_color.Columns[9].HeaderText = tall.Rows[0]["talla07"].ToString();
                        dgv_color.Columns[10].HeaderText = tall.Rows[0]["talla08"].ToString();
                        dgv_color.Columns[11].HeaderText = tall.Rows[0]["talla09"].ToString();
                        dgv_color.Columns[12].HeaderText = tall.Rows[0]["talla10"].ToString();
                        dgv_color.Columns[13].HeaderText = tall.Rows[0]["talla11"].ToString();
                        dgv_color.Columns[14].HeaderText = tall.Rows[0]["talla12"].ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }
        }
예제 #14
0
 private void ValidamosCombinación()
 {
     var BE = new tb_pt_articulo();
     var BL = new tb_pt_articuloBL();
     var dt = new DataTable();
     BE.marcaid = marcaid.Text.Trim();
     BE.lineaid = lineaid.Text.Trim();
     BE.modeloid = modeloid.Text.Trim();
     BE.familiatelaid = familiatelaid.Text.Trim();
     dt = BL.GeneraCod(EmpresaID, BE).Tables[0];
     if (dt.Rows[0]["codigo"].ToString() != string.Empty)
     {
         codtizado.Text = dt.Rows[0]["codigo"].ToString();
         pnl_02.Enabled = false;
     }
     else
     {
         MessageBox.Show("Ya Existe Combinación ...!!!");
         limpiar_documento();
         pnl_02.Enabled = true;
         return;
     }
 }
 private void ValidaArticulo(String xcod)
 {
     var  BE = new tb_pt_articulo();
     var BL = new tb_pt_articuloBL();
     var dt = new DataTable();
     BE.articid = xcod.Trim();
     dt = BL.GetAll(EmpresaID, BE).Tables[0];
     if (dt.Rows.Count > 0)
     {
         articid.Text = dt.Rows[0]["articid"].ToString();
         articidold.Text = dt.Rows[0]["articidold"].ToString();
         articname.Text = dt.Rows[0]["articname"].ToString();
     }
     else
     {
         articid.Text = string.Empty;
         articidold.Text = string.Empty;
         articname.Text = string.Empty;
     }
 }
예제 #16
0
        private void Insert_Foto()
        {
            try
            {
                var BL = new tb_pt_articuloBL();
                var BE = new tb_pt_articulo();
                BE.articidold = articidold.Text.Trim();
                BE.docname = _nombreFoto.ToString();
                var ms = new System.IO.MemoryStream();
                if (foto.Image != null)
                {
                    foto.Image.Save(ms, System.Drawing.Imaging.ImageFormat.Jpeg);
                }

                BE.Foto = ms.GetBuffer();
                BL.Insert_Foto(EmpresaID, BE);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        void ValidaArticulo()
        {
            tb_pt_articuloBL BL = new tb_pt_articuloBL();
            tb_pt_articulo BE = new tb_pt_articulo();
            DataTable dt = new DataTable();

            ArmaGrilla();

            BE.top = true;
            BE.articidold = txt_articid.Text.ToString().ToUpper();
            if (txt_articid.Text.ToString().Length == 7)
            {
                dt = BL.GetAll(EmpresaID, BE).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    xarticid = dt.Rows[0]["articid"].ToString();
                    txt_articid.Text = dt.Rows[0]["articidold"].ToString();
                    txt_articname.Text = dt.Rows[0]["articname"].ToString();
                    txt_marcaname.Text = dt.Rows[0]["marcaname"].ToString();
                    txt_lineaname.Text = dt.Rows[0]["lineaname"].ToString();
                    txt_generoname.Text = dt.Rows[0]["generoname"].ToString();
                    txt_temporadaname.Text = dt.Rows[0]["temporadaname"].ToString();
                    txt_familiatelaname.Text = dt.Rows[0]["familianame"].ToString();
                    cmb_canalvta.SelectedValue = dt.Rows[0]["canalventaid"].ToString();
                    txt_variante.Text = dt.Rows[0]["variante"].ToString();

                    tb_pt_tallaBL BL2 = new tb_pt_tallaBL();
                    tb_pt_talla BE2 = new tb_pt_talla();
                    DataTable tall = new DataTable();
                    BE2.tallaid = dt.Rows[0]["tallaid"].ToString();
                    tall = BL2.GetAll(EmpresaID, BE2).Tables[0];

                    dgv_grilla.Columns[1].HeaderText = tall.Rows[0]["talla01"].ToString();
                    dgv_grilla.Columns[2].HeaderText = tall.Rows[0]["talla02"].ToString();
                    dgv_grilla.Columns[3].HeaderText = tall.Rows[0]["talla03"].ToString();
                    dgv_grilla.Columns[4].HeaderText = tall.Rows[0]["talla04"].ToString();
                    dgv_grilla.Columns[5].HeaderText = tall.Rows[0]["talla05"].ToString();
                    dgv_grilla.Columns[6].HeaderText = tall.Rows[0]["talla06"].ToString();
                    dgv_grilla.Columns[7].HeaderText = tall.Rows[0]["talla07"].ToString();
                    dgv_grilla.Columns[8].HeaderText = tall.Rows[0]["talla08"].ToString();
                    dgv_grilla.Columns[9].HeaderText = tall.Rows[0]["talla09"].ToString();
                    dgv_grilla.Columns[10].HeaderText = tall.Rows[0]["talla10"].ToString();
                    dgv_grilla.Columns[11].HeaderText = tall.Rows[0]["talla11"].ToString();
                    dgv_grilla.Columns[12].HeaderText = tall.Rows[0]["talla12"].ToString();

                    dgv_grilla.Columns[1].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta01"]);
                    dgv_grilla.Columns[1].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta01"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[2].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta02"]);
                    dgv_grilla.Columns[2].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta02"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[3].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta03"]);
                    dgv_grilla.Columns[3].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta03"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[4].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta04"]);
                    dgv_grilla.Columns[4].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta04"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[5].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta05"]);
                    dgv_grilla.Columns[5].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta05"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[6].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta06"]);
                    dgv_grilla.Columns[6].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta06"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[7].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta07"]);
                    dgv_grilla.Columns[7].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta07"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[8].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta08"]);
                    dgv_grilla.Columns[8].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta08"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[9].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta09"]);
                    dgv_grilla.Columns[9].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta09"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[10].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta10"]);
                    dgv_grilla.Columns[10].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta10"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[11].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta11"]);
                    dgv_grilla.Columns[11].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta11"])) == true ? Color.LightSteelBlue : Color.Teal;
                    dgv_grilla.Columns[12].ReadOnly = !Convert.ToBoolean(dt.Rows[0]["ta12"]);
                    dgv_grilla.Columns[12].DefaultCellStyle.BackColor = !(Convert.ToBoolean(dt.Rows[0]["ta12"])) == true ? Color.LightSteelBlue : Color.Teal;

                    lbltaco01.Text = tall.Rows[0]["talla01"].ToString();
                    lbltaco02.Text = tall.Rows[0]["talla02"].ToString();
                    lbltaco03.Text = tall.Rows[0]["talla03"].ToString();
                    lbltaco04.Text = tall.Rows[0]["talla04"].ToString();
                    lbltaco05.Text = tall.Rows[0]["talla05"].ToString();
                    lbltaco06.Text = tall.Rows[0]["talla06"].ToString();
                    lbltaco07.Text = tall.Rows[0]["talla07"].ToString();
                    lbltaco08.Text = tall.Rows[0]["talla08"].ToString();
                    lbltaco09.Text = tall.Rows[0]["talla09"].ToString();
                    lbltaco10.Text = tall.Rows[0]["talla10"].ToString();
                    lbltaco11.Text = tall.Rows[0]["talla11"].ToString();
                    lbltaco12.Text = tall.Rows[0]["talla12"].ToString();

                    txt_taco01.Enabled = Convert.ToBoolean(dt.Rows[0]["ta01"]);
                    txt_taco01.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta01"])) == true ? Color.Teal : Color.White;
                    txt_taco01.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta01"])) == true ? Color.White : Color.Black;
                    txt_taco02.Enabled = Convert.ToBoolean(dt.Rows[0]["ta02"]);
                    txt_taco02.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta02"])) == true ? Color.Teal : Color.White;
                    txt_taco02.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta02"])) == true ? Color.White : Color.Black;
                    txt_taco03.Enabled = Convert.ToBoolean(dt.Rows[0]["ta03"]);
                    txt_taco03.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta03"])) == true ? Color.Teal : Color.White;
                    txt_taco03.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta03"])) == true ? Color.White : Color.Black;
                    txt_taco04.Enabled = Convert.ToBoolean(dt.Rows[0]["ta04"]);
                    txt_taco04.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta04"])) == true ? Color.Teal : Color.White;
                    txt_taco04.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta04"])) == true ? Color.White : Color.Black;
                    txt_taco05.Enabled = Convert.ToBoolean(dt.Rows[0]["ta05"]);
                    txt_taco05.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta05"])) == true ? Color.Teal : Color.White;
                    txt_taco05.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta05"])) == true ? Color.White : Color.Black;
                    txt_taco06.Enabled = Convert.ToBoolean(dt.Rows[0]["ta06"]);
                    txt_taco06.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta06"])) == true ? Color.Teal : Color.White;
                    txt_taco06.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta06"])) == true ? Color.White : Color.Black;
                    txt_taco07.Enabled = Convert.ToBoolean(dt.Rows[0]["ta07"]);
                    txt_taco07.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta07"])) == true ? Color.Teal : Color.White;
                    txt_taco07.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta07"])) == true ? Color.White : Color.Black;
                    txt_taco08.Enabled = Convert.ToBoolean(dt.Rows[0]["ta08"]);
                    txt_taco08.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta08"])) == true ? Color.Teal : Color.White;
                    txt_taco08.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta08"])) == true ? Color.White : Color.Black;
                    txt_taco09.Enabled = Convert.ToBoolean(dt.Rows[0]["ta09"]);
                    txt_taco09.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta09"])) == true ? Color.Teal : Color.White;
                    txt_taco09.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta09"])) == true ? Color.White : Color.Black;
                    txt_taco10.Enabled = Convert.ToBoolean(dt.Rows[0]["ta10"]);
                    txt_taco10.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta10"])) == true ? Color.Teal : Color.White;
                    txt_taco10.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta10"])) == true ? Color.White : Color.Black;
                    txt_taco11.Enabled = Convert.ToBoolean(dt.Rows[0]["ta11"]);
                    txt_taco11.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta11"])) == true ? Color.Teal : Color.White;
                    txt_taco11.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta11"])) == true ? Color.White : Color.Black;
                    txt_taco12.Enabled = Convert.ToBoolean(dt.Rows[0]["ta12"]);
                    txt_taco12.BackColor = (Convert.ToBoolean(dt.Rows[0]["ta12"])) == true ? Color.Teal : Color.White;
                    txt_taco12.ForeColor = (Convert.ToBoolean(dt.Rows[0]["ta12"])) == true ? Color.White : Color.Black;

                    //dgv_grilla.Columns[12].HeaderText = tall.Rows[0]["talla12"].ToString();
                    dgv_ordenprodcolor.Columns[6].HeaderText = tall.Rows[0]["talla01"].ToString();
                    dgv_ordenprodcolor.Columns[7].HeaderText = tall.Rows[0]["talla02"].ToString();
                    dgv_ordenprodcolor.Columns[8].HeaderText = tall.Rows[0]["talla03"].ToString();
                    dgv_ordenprodcolor.Columns[9].HeaderText = tall.Rows[0]["talla04"].ToString();
                    dgv_ordenprodcolor.Columns[10].HeaderText = tall.Rows[0]["talla05"].ToString();
                    dgv_ordenprodcolor.Columns[11].HeaderText = tall.Rows[0]["talla06"].ToString();
                    dgv_ordenprodcolor.Columns[12].HeaderText = tall.Rows[0]["talla07"].ToString();
                    dgv_ordenprodcolor.Columns[13].HeaderText = tall.Rows[0]["talla08"].ToString();
                    dgv_ordenprodcolor.Columns[14].HeaderText = tall.Rows[0]["talla09"].ToString();
                    dgv_ordenprodcolor.Columns[15].HeaderText = tall.Rows[0]["talla10"].ToString();
                    dgv_ordenprodcolor.Columns[16].HeaderText = tall.Rows[0]["talla11"].ToString();
                    dgv_ordenprodcolor.Columns[17].HeaderText = tall.Rows[0]["talla12"].ToString();

                }
            }
        }
예제 #18
0
        void ValidaArticulo()
        {
            tb_pt_articuloBL BL = new tb_pt_articuloBL();
            tb_pt_articulo BE = new tb_pt_articulo();
            tb_pt_articulo BE2 = new tb_pt_articulo();
            DataTable dt = new DataTable();
            BE.articidold = txt_articidold.Text;
            dt = BL.GetAll(EmpresaID,BE).Tables[0];

            if (dt.Rows.Count > 0)
            {
                txt_articidold.Text = dt.Rows[0]["articidold"].ToString();
                txt_articname.Text = dt.Rows[0]["articname"].ToString();
                BE2.articid = dt.Rows[0]["articid"].ToString();
                xarticid = dt.Rows[0]["articid"].ToString();
                // Aca Generamos el Nuevo Correlativo
                GeneraVersion(dt.Rows[0]["articid"].ToString());
                BE2.top = true;

                if (txt_articidold.Text.ToString().Length == 7 || txt_articidoldbus.Text.ToString().Length == 7)
                {
                    dt = BL.GetAll_Color(EmpresaID, BE2).Tables[0];
                    if (dt.Rows.Count > 0)
                    {
                        dgv_color.Columns[2].HeaderText = dt.Rows[0]["talla01"].ToString();
                        dgv_color.Columns[3].HeaderText = dt.Rows[0]["talla02"].ToString();
                        dgv_color.Columns[4].HeaderText = dt.Rows[0]["talla03"].ToString();
                        dgv_color.Columns[5].HeaderText = dt.Rows[0]["talla04"].ToString();
                        dgv_color.Columns[6].HeaderText = dt.Rows[0]["talla05"].ToString();
                        dgv_color.Columns[7].HeaderText = dt.Rows[0]["talla06"].ToString();
                        dgv_color.Columns[8].HeaderText = dt.Rows[0]["talla07"].ToString();
                        dgv_color.Columns[9].HeaderText = dt.Rows[0]["talla08"].ToString();
                        dgv_color.Columns[10].HeaderText = dt.Rows[0]["talla09"].ToString();
                        dgv_color.Columns[11].HeaderText = dt.Rows[0]["talla10"].ToString();
                        dgv_color.Columns[12].HeaderText = dt.Rows[0]["talla11"].ToString();
                        dgv_color.Columns[13].HeaderText = dt.Rows[0]["talla12"].ToString();
                        dgv_color.AutoGenerateColumns = false;
                        dgv_color.DataSource = dt;
                        dgv_color.Enabled = true;
                    }
                }
            }
        }