private void data_Tablacolor() { try { Tablacolor = new DataTable(); if (Tablacolor.Rows.Count > 0) { Tablacolor.Rows.Clear(); } var BL = new tb_pt_articulocolorBL(); var BE = new tb_pt_articulocolor(); BE.articid = articid.Text.Trim(); BE.colorname = txt_criterio.Text.Trim().ToUpper(); Tablacolor = BL.GetAll(EmpresaID, BE).Tables[0]; if (Tablacolor.Rows.Count > 0) { btn_imprimir.Enabled = true; MDI_gridcolor.DataSource = Tablacolor; } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
void ValidaArticuloColor() { if (xarticid.Length == 0) { MessageBox.Show("Seleccione Primero Un Articulo !!!", "InformaciĆ³n"); return; } else { tb_pt_articulocolorBL BL = new tb_pt_articulocolorBL(); tb_pt_articulocolor BE = new tb_pt_articulocolor(); DataTable dt = new DataTable(); BE.articid = xarticid.ToString(); BE.colorid = txt_colorid.Text.ToString().ToUpper(); BE.status = "0".ToString(); BE.filtro = "1"; dt = BL.GetAll(EmpresaID, BE).Tables[0]; if (dt.Rows.Count > 0) { txt_colorid.Text = dt.Rows[0]["colorid"].ToString(); txt_colorname.Text = dt.Rows[0]["colorname"].ToString(); btn_add.Enabled = true; } } }
private void CargarComboArticuloColor(String xarticid) { // Cargamos el Combo de Colores de Acuerdo al Articulo tb_pt_articulocolorBL BL2 = new tb_pt_articulocolorBL(); tb_pt_articulocolor BE2 = new tb_pt_articulocolor(); DataTable dt2 = new DataTable(); BE2.articid = xarticid.ToString(); dt2 = BL2.GetAll(Session["ssEmpresaID"].ToString(), BE2).Tables[0]; cmb_colorid.DataSource = dt2; cmb_colorid.ValueField = "colorid"; cmb_colorid.TextField = "colorname"; cmb_colorid.DataBind(); }