public bool Delete(string empresaid, tb_pt_talla BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
     {
         using (SqlCommand cmd = new SqlCommand("gspTbPtTalla_DELETE", cnx))
         {
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@tallaid", SqlDbType.Char, 2).Value = BE.tallaid;
             }
             try
             {
                 cnx.Open();
                 if (cmd.ExecuteNonQuery() > 0)
                 {
                     return true;
                 }
                 else
                 {
                     return false;
                 }
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
         }
     }
 }
 public DataSet GetAll(string empresaid, tb_pt_talla BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
     {
         using (SqlCommand cmd = new SqlCommand("gspTbPtTalla_SEARCH", cnx))
         {
             DataSet ds = new DataSet();
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@tallaid", SqlDbType.Char, 2).Value = BE.tallaid;
                 cmd.Parameters.Add("@tallaname", SqlDbType.VarChar, 20).Value = BE.tallaname;
                 cmd.Parameters.Add("@talla01", SqlDbType.Char, 2).Value = BE.talla01;
                 cmd.Parameters.Add("@talla02", SqlDbType.Char, 2).Value = BE.talla02;
                 cmd.Parameters.Add("@talla03", SqlDbType.Char, 2).Value = BE.talla03;
                 cmd.Parameters.Add("@talla04", SqlDbType.Char, 2).Value = BE.talla04;
                 cmd.Parameters.Add("@talla05", SqlDbType.Char, 2).Value = BE.talla05;
                 cmd.Parameters.Add("@talla06", SqlDbType.Char, 2).Value = BE.talla06;
                 cmd.Parameters.Add("@talla07", SqlDbType.Char, 2).Value = BE.talla07;
                 cmd.Parameters.Add("@talla08", SqlDbType.Char, 2).Value = BE.talla08;
                 cmd.Parameters.Add("@talla09", SqlDbType.Char, 2).Value = BE.talla09;
                 cmd.Parameters.Add("@talla10", SqlDbType.Char, 2).Value = BE.talla10;
                 cmd.Parameters.Add("@usuar", SqlDbType.Char, 15).Value = BE.usuar;
             }
             try
             {
                 cnx.Open();
                 using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                 {
                     da.Fill(ds);
                 }
                 return ds;
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
         }
     }
 }
 public DataSet GetAll_paginacion(string empresaid, tb_pt_talla BE)
 {
     return tablaDA.GetAll_paginacion(empresaid, BE);
 }
 public bool Delete(string empresaid, tb_pt_talla BE)
 {
     return tablaDA.Delete(empresaid, BE);
 }
 private void cmb_tallaid_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (cmb_tallaid.SelectedIndex >= 0)
     {
         var BE = new tb_pt_talla();
         var BL = new tb_pt_tallaBL();
         var dt = new DataTable();
         BE.tallaid = cmb_tallaid.SelectedValue.ToString();
         dt = BL.GetAll(EmpresaID, BE).Tables[0];
         foreach (DataRow fila in dt.Rows)
         {
             chk_ta01.Text = fila["talla01"].ToString();
             chk_ta02.Text = fila["talla02"].ToString();
             chk_ta03.Text = fila["talla03"].ToString();
             chk_ta04.Text = fila["talla04"].ToString();
             chk_ta05.Text = fila["talla05"].ToString();
             chk_ta06.Text = fila["talla06"].ToString();
             chk_ta07.Text = fila["talla07"].ToString();
             chk_ta08.Text = fila["talla08"].ToString();
             chk_ta09.Text = fila["talla09"].ToString();
             chk_ta10.Text = fila["talla10"].ToString();
             chk_ta11.Text = fila["talla11"].ToString();
             chk_ta12.Text = fila["talla12"].ToString();
         }
     }
 }
 private void Cargar_cmbTalla()
 {
     tb_pt_talla BE = new tb_pt_talla();
     tb_pt_tallaBL BL = new tb_pt_tallaBL();
     DataTable dt = new DataTable();
     dt = BL.GetAll(EmpresaID, BE).Tables[0];
     if (dt.Rows.Count > 0)
     {
         cmb_tallaid.DataSource = dt;
         cmb_tallaid.ValueMember = "tallaid";
         cmb_tallaid.DisplayMember = "tallaname";
     }
 }
 private void CargarComboArticuloTallas(String xtallaid)
 {
     //Cargamos el Combo de Tallas ----> Que biene en forma Vertical
     tb_pt_tallaBL BL3 = new tb_pt_tallaBL();
     tb_pt_talla BE3 = new tb_pt_talla();
     DataTable dt3 = new DataTable();
     BE3.tallaid = xtallaid.ToString();
     dt3 = BL3.GetAll_vertical(Session["ssEmpresaID"].ToString(), BE3).Tables[0];
     cmb_tallaid.DataSource = dt3;
     cmb_tallaid.ValueField = "talla";
     cmb_tallaid.TextField = "talla";
     cmb_tallaid.DataBind();
 }
        private void data_Tablatalla()
        {
            try
            {
                if (Tablatalla.Rows.Count > 0)
                    Tablatalla.Rows.Clear();
                tb_pt_tallaBL BL = new tb_pt_tallaBL();
                tb_pt_talla BE = new tb_pt_talla();

                switch (cbo_buscar.SelectedIndex)
                {
                    case 0:
                        BE.tallaname = txt_criterio.Text.Trim();
                        break;
                    case 1:
                        if (txt_criterio.Text.Trim().Length > 0)
                        {
                            BE.tallaid = txt_criterio.Text.Trim().ToUpper().PadLeft(2, '0');
                        }
                        break;
                    default:
                        //**
                        break;
                }

                Tablatalla = BL.GetAll(EmpresaID, BE).Tables[0];
                if (Tablatalla.Rows.Count > 0)
                {
                    btn_imprimir.Enabled = true;
                    gridtalla.DataSource = Tablatalla;
                    gridtalla.Rows[0].Selected = false;
                    gridtalla.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 public bool Update(string empresaid, tb_pt_talla BE)
 {
     return tablaDA.Update(empresaid, BE);
 }
        public bool Update(string empresaid, tb_pt_talla BE)
        {
            using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
            {
                using (SqlCommand cmd = new SqlCommand("gspTbPtTalla_UPDATE", cnx))
                {

                    {
                        cmd.CommandType = CommandType.StoredProcedure;
                        cmd.Parameters.Add("@tallaid", SqlDbType.Char, 2).Value = BE.tallaid;
                        cmd.Parameters.Add("@tallaname", SqlDbType.VarChar, 20).Value = BE.tallaname;
                        cmd.Parameters.Add("@talla01", SqlDbType.Char, 2).Value = BE.talla01;
                        cmd.Parameters.Add("@talla02", SqlDbType.Char, 2).Value = BE.talla02;
                        cmd.Parameters.Add("@talla03", SqlDbType.Char, 2).Value = BE.talla03;
                        cmd.Parameters.Add("@talla04", SqlDbType.Char, 2).Value = BE.talla04;
                        cmd.Parameters.Add("@talla05", SqlDbType.Char, 2).Value = BE.talla05;
                        cmd.Parameters.Add("@talla06", SqlDbType.Char, 2).Value = BE.talla06;
                        cmd.Parameters.Add("@talla07", SqlDbType.Char, 2).Value = BE.talla07;
                        cmd.Parameters.Add("@talla08", SqlDbType.Char, 2).Value = BE.talla08;
                        cmd.Parameters.Add("@talla09", SqlDbType.Char, 2).Value = BE.talla09;
                        cmd.Parameters.Add("@talla10", SqlDbType.Char, 2).Value = BE.talla10;
                        cmd.Parameters.Add("@talla11", SqlDbType.Char, 2).Value = BE.talla11;
                        cmd.Parameters.Add("@talla12", SqlDbType.Char, 2).Value = BE.talla12;
                        cmd.Parameters.Add("@usuar", SqlDbType.Char, 15).Value = BE.usuar;
                    }
                    try
                    {
                        cnx.Open();
                        if (cmd.ExecuteNonQuery() > 0)
                        {
                            return true;
                        }
                        else
                        {
                            return false;
                        }
                    }
                    catch (Exception ex)
                    {
                        throw new Exception(ex.Message);
                    }
                }
            }
        }
        private void llenar_GridExaminar()
        {
            try
            {
                var BL = new pt_tallaBL();
                var BE = new tb_pt_talla();

                BE.coltall = txtDescrip.Text;

                PCGCURSOR = BL.GetAll_vertical(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 12
0
        private void Update()
        {
            try
            {
                if (tallaid.Text.Trim().Length != 2)
                {
                    MessageBox.Show("Falta Codigo Talla !!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else if (tallaname.Text.Trim().Length == 0)
                {
                    MessageBox.Show("Ingrese Nombre de Talla", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    tb_pt_tallaBL BL = new tb_pt_tallaBL();
                    tb_pt_talla BE = new tb_pt_talla();

                    BE.tallaid = tallaid.Text.Trim().PadLeft(2, '0');
                    BE.tallaname = tallaname.Text.ToUpper();
                    BE.talla01 = talla01.Text;
                    BE.talla02 = talla02.Text;
                    BE.talla03 = talla03.Text;
                    BE.talla04 = talla04.Text;
                    BE.talla05 = talla05.Text;
                    BE.talla06 = talla06.Text;
                    BE.talla07 = talla07.Text;
                    BE.talla08 = talla08.Text;
                    BE.talla09 = talla09.Text;
                    BE.talla10 = talla10.Text;
                    BE.talla11 = talla11.Text;
                    BE.talla12 = talla12.Text;

                    BE.usuar = VariablesPublicas.Usuar.Trim();

                    if (BL.Update(EmpresaID, BE))
                    {
                        SEGURIDAD_LOG("M");
                        MessageBox.Show("Datos Modificado Correctamente !!!", "Confirmación", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        procesado = true;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 13
0
        private void form_cargar_datos(String posicion)
        {
            try
            {
                tb_pt_tallaBL BL = new tb_pt_tallaBL();
                tb_pt_talla BE = new tb_pt_talla();
                DataTable dt = new DataTable();

                if (tallaid.Text.Trim().Length > 0){
                    BE.tallaid = tallaid.Text.Trim().PadLeft(2, '0');
                }

                BE.posicion = posicion.Trim();

                dt = BL.GetAll_paginacion(EmpresaID, BE).Tables[0];

                if (dt.Rows.Count > 0)
                {
                    limpiar_documento();
                    ssModo = "EDIT";

                    tallaid.Text = dt.Rows[0]["tallaid"].ToString().Trim();
                    tallaname.Text = dt.Rows[0]["tallaname"].ToString().Trim();
                    talla01.Text = dt.Rows[0]["talla01"].ToString().Trim();
                    talla02.Text = dt.Rows[0]["talla02"].ToString().Trim();
                    talla03.Text = dt.Rows[0]["talla03"].ToString().Trim();
                    talla04.Text = dt.Rows[0]["talla04"].ToString().Trim();
                    talla05.Text = dt.Rows[0]["talla05"].ToString().Trim();
                    talla06.Text = dt.Rows[0]["talla06"].ToString().Trim();
                    talla07.Text = dt.Rows[0]["talla07"].ToString().Trim();
                    talla08.Text = dt.Rows[0]["talla08"].ToString().Trim();
                    talla09.Text = dt.Rows[0]["talla09"].ToString().Trim();
                    talla10.Text = dt.Rows[0]["talla10"].ToString().Trim();
                    talla11.Text = dt.Rows[0]["talla11"].ToString().Trim();
                    talla12.Text = dt.Rows[0]["talla12"].ToString().Trim();

                    btn_editar.Enabled = true;
                    btn_eliminar.Enabled = true;
                    btn_imprimir.Enabled = true;

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

                    btn_log.Enabled = true;
                    btn_salir.Enabled = true;
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Esempio n. 14
0
        private void Delete()
        {
            try
            {
                if (tallaid.Text.Trim().Length != 2)
                {
                    MessageBox.Show("Falta Codigo Talla !!!", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                    return;
                }
                else
                {
                    tb_pt_tallaBL BL = new tb_pt_tallaBL();
                    tb_pt_talla BE = new tb_pt_talla();

                    BE.tallaid = tallaid.Text.Trim().PadLeft(2, '0');
                    //BE.tallaname = tallaname.Text.ToUpper();
                    //BE.usuar = VariablesPublicas.Usuar.Trim();

                    if (BL.Delete(EmpresaID, BE))
                    {
                        SEGURIDAD_LOG("E");
                        MessageBox.Show("Datos Eliminado Correctamente !!!", "Confirmación", MessageBoxButtons.OK, MessageBoxIcon.Information);
                        NIVEL_FORMS();
                        limpiar_documento();
                        form_bloqueado(false);
                        data_Tablatalla();
                        btn_nuevo.Enabled = true;
                    }
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
 public DataSet GetAll_vertical(string empresaid, tb_pt_talla BE)
 {
     return tablaDA.GetAll_vertical(empresaid, BE);
 }
 public DataSet GetAll_paginacion(string empresaid, tb_pt_talla BE)
 {
     using (SqlConnection cnx = new SqlConnection(conex.empConexion(empresaid)))
     {
         using (SqlCommand cmd = new SqlCommand("gspTbPtTalla_SEARCH_paginacion", cnx))
         {
             DataSet ds = new DataSet();
             {
                 cmd.CommandType = CommandType.StoredProcedure;
                 cmd.Parameters.Add("@tallaid", SqlDbType.Char, 2).Value = BE.tallaid;
                 cmd.Parameters.Add("@posicion", SqlDbType.Char, 10).Value = BE.posicion;
             }
             try
             {
                 cnx.Open();
                 using (SqlDataAdapter da = new SqlDataAdapter(cmd))
                 {
                     da.Fill(ds);
                 }
                 return ds;
             }
             catch (Exception ex)
             {
                 throw new Exception(ex.Message);
             }
         }
     }
 }
 public bool Insert(string empresaid, tb_pt_talla BE)
 {
     return tablaDA.Insert(empresaid, BE);
 }
        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);
            }
        }
        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();

                }
            }
        }
    private void CargarComboArticuloTallas(String xtallaid)
    {
        //Cargamos el Combo de Tallas ----> Que biene en forma Vertical
        tb_pt_tallaWebBL BL3 = new tb_pt_tallaWebBL();
        tb_pt_talla BE3 = new tb_pt_talla();
        DataTable dt3 = new DataTable();

        BE3.tallaid = xtallaid.ToString();
        TablaTallas = BL3.GetAll_vertical(Session["ssEmpresaID"].ToString(), BE3).Tables[0];

        DataTable dtDatos = new DataTable();
        if (TablaTallas.Rows.Count > 0)
        {
            dtDatos.Columns.Add("tallaid");
            dtDatos.Columns.Add("tallacol");
            dtDatos.Columns.Add("talla");
            string talla0 = " - [ Talla: ";
            string talla1 = "";
            for (int i = 0; i < TablaTallas.Rows.Count; i++)
            {
                DataRow dtRow = dtDatos.NewRow();
                dtRow["tallaid"] = TablaTallas.Rows[i]["tallaid"].ToString();
                talla1 = TablaTallas.Rows[i]["tallacol"].ToString().Substring(5, 2) + talla0.ToString() + TablaTallas.Rows[i]["talla"].ToString() +' '+']';
                dtRow["talla"] = talla1.ToString();
                //dtRow["tallacol"] = TablaTallas.Rows[i]["tallacol"].ToString();
                //dtRow["talla"] = TablaTallas.Rows[i]["talla"].ToString();
                dtDatos.Rows.Add(dtRow);
            }

        cmb_tallaid.DataSource = dtDatos;
        cmb_tallaid.DataValueField = "tallaid";
        cmb_tallaid.DataTextField = "talla";
        cmb_tallaid.DataBind();

        }
    }