Exemplo n.º 1
0
        private void ValidaColor_nuevo()
        {
            if (colorid.Text.Trim().Length != 3)
            {
                return;
            }
            var BL = new tb_60colorBL();
            var BE = new tb_60color();
            var dt = new DataTable();
            BE.moduloid = modulo;
            BE.colorid = colorid.Text.Trim();

            dt = BL.GetOne(EmpresaID, BE).Tables[0];
            if (dt.Rows.Count > 0)
            {
                mensaje.Text = "YA EXISTE";
                mensaje.ForeColor = Color.Red;
                colorname.Text = string.Empty;
            }
            else
            {
                mensaje.Text = "VALIDO";
                mensaje.ForeColor = Color.Green;
                colorid.Text = colorid.Text.Trim().ToUpper();
                form_bloqueado(true);
                btn_cancelar.Enabled = true;
                btn_grabar.Enabled = true;
            }
        }
Exemplo n.º 2
0
        private void ValidaColor_nuevo()
        {
            if (colorid.Text.Trim().Length != 3)
            {
                return;
            }
            var BL = new tb_60colorBL();
            var BE = new tb_60color();
            var dt = new DataTable();
            BE.moduloid = moduloiddes.SelectedValue.ToString();
            if (moduloiddes.SelectedValue.ToString() == "0000")
            {
                MessageBox.Show("Seleccione Almacen", "Information");
                return;
            }

            BE.colorid = colorid.Text.Trim();

            dt = BL.GetOne(EmpresaID, BE).Tables[0];
            if (dt.Rows.Count > 0)
            {
                mensaje.Text = "YA EXISTE";
                mensaje.ForeColor = Color.Red;
                colorname.Text = string.Empty;
            }
            else
            {
                mensaje.Text = "VALIDO";
                mensaje.ForeColor = Color.Green;
                colorid.Text = colorid.Text.Trim().ToUpper();
                form_bloqueado(true);
                btn_cancelar.Enabled = true;
                btn_grabar.Enabled = true;
            }
        }
Exemplo n.º 3
0
        private void ValidaColor()
        {
            if (colorid.Text.Trim().Length != 3)
            {
                return;
            }
            var BL = new tb_60colorBL();
            var BE = new tb_60color();
            var dt = new DataTable();
            BE.moduloid = modulo;
            BE.colorid = colorid.Text.Trim();

            dt = BL.GetOne(EmpresaID, BE).Tables[0];
            if (dt.Rows.Count > 0)
            {
                colorid.Text = dt.Rows[0]["colorid"].ToString().Trim();
                colorname.Text = dt.Rows[0]["colorname"].ToString().Trim();
            }
            else
            {
                colorid.Text = string.Empty;
                colorname.Text = string.Empty;
            }
        }
Exemplo n.º 4
0
        private void ValidaColor()
        {
            if (colorid.Text.Trim().Length != 3)
            {
                return;
            }
            var BL = new tb_60colorBL();
            var BE = new tb_60color();
            var dt = new DataTable();
            BE.moduloid = moduloiddes.SelectedValue.ToString();
            if (moduloiddes.SelectedValue.ToString() == "0000")
            {
                MessageBox.Show("Seleccione Almacen", "Information");
                return;
            }
            BE.colorid = colorid.Text.Trim();

            dt = BL.GetOne(EmpresaID, BE).Tables[0];
            if (dt.Rows.Count > 0)
            {
                colorid.Text = dt.Rows[0]["colorid"].ToString().Trim();
                colorname.Text = dt.Rows[0]["colorname"].ToString().Trim();
            }
            else
            {
                colorid.Text = string.Empty;
                colorname.Text = string.Empty;
            }
        }