private void ValidaLinea()
        {
            if (lineaid.Text.Trim().Length > 0)
            {
                var BL = new tb_60lineaBL();
                var BE = new tb_60linea();
                var dt = new DataTable();

                BE.moduloid = modulo;
                BE.lineaid = lineaid.Text.Trim().PadLeft(3, '0');

                dt = BL.GetAll(EmpresaID, BE).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    lineaid.Text = dt.Rows[0]["lineaid"].ToString().Trim();
                    lineaname.Text = dt.Rows[0]["lineaname"].ToString().Trim();
                }
                else
                {
                    lineaid.Text = string.Empty;
                    lineaname.Text = string.Empty;
                }
            }
            else
            {
                lineaid.Text = string.Empty;
                lineaname.Text = string.Empty;
            }
        }
Ejemplo n.º 2
0
        private void ValidaLinea()
        {
            if (lineaid.Text.Trim().Length > 0 && ssModo == "NEW")
            {
                var BL = new tb_60lineaBL();
                var BE = new tb_60linea();
                var dt = new DataTable();

                BE.moduloid = moduloiddes.SelectedValue.ToString();
                if (moduloiddes.SelectedValue.ToString() == "0000")
                {
                    MessageBox.Show("Seleccione Almacen", "Information");
                    return;
                }
                BE.lineaid = lineaid.Text.Trim().PadLeft(3, '0');

                dt = BL.GetAll(EmpresaID, BE).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    lineaid.Text = dt.Rows[0]["lineaid"].ToString().Trim();
                    lineaname.Text = dt.Rows[0]["lineaname"].ToString().Trim();
                    generar_denominacion();
                }
                else
                {
                    lineaid.Text = string.Empty;
                    lineaname.Text = string.Empty;
                    generar_denominacion();
                }
            }
            if (lineaid.Text.Trim().Length == 0 && ssModo == "NEW")
            {
                lineaid.Text = string.Empty;
                lineaname.Text = string.Empty;
                generar_denominacion();
            }
        }
 void CargarCmbLineaTela()
 {
     tb_60lineaBL BL = new tb_60lineaBL();
     tb_60linea BE = new tb_60linea();
     DataTable dt = new DataTable();
     BE.moduloid = "0320";
     dt = BL.GetAll(EmpresaID, BE).Tables[0];
     if (dt.Rows.Count > 0)
     {
         cmb_lineatelaid.DataSource = dt;
         cmb_lineatelaid.ValueMember = "lineaid";
         cmb_lineatelaid.DisplayMember = "lineaname";
     }
 }
        private void Data_cbo_tejidoid()
        {
            var BL = new tb_60lineaBL();
            var BE = new tb_60linea();

            if (cboModuloID.SelectedIndex != -1)
            {
                BE.moduloid = cboModuloID.SelectedValue.ToString();
                try
                {
                    if (BE.moduloid.Length == 4 && BE.moduloid != "0200")
                    {
                        tejidoid.DataSource = BL.GetAll(EmpresaID, BE).Tables[0];
                        tejidoid.ValueMember = "lineaid";
                        tejidoid.DisplayMember = "lineaname";
                    }
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
        }
        private void cargar_lineanoLSI()
        {
            try
            {
                var BE = new tb_60linea();
                var BL = new tb_60lineaBL();

                BE.moduloid = modulo;
                BE.local = local;
                var table = BL.GetAll(EmpresaID, BE).Tables[0];

                cmblinea2.DataSource = table;
                cmblinea2.ValueMember = "lineaid";
                cmblinea2.DisplayMember = "lineaname";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void ValidaLinea()
        {
            if (serop_ini.Text.Trim().Length > 0)
            {
                tb_60lineaBL BL = new tb_60lineaBL();
                tb_60linea BE = new tb_60linea();
                DataTable dt = new DataTable();

                BE.moduloid = modulo;
                BE.lineaid = serop_ini.Text.Trim().PadLeft(3, '0');

                dt = BL.GetAll(EmpresaID, BE).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    serop_ini.Text = dt.Rows[0]["lineaid"].ToString().Trim();
                    numop_ini.Text = dt.Rows[0]["lineaname"].ToString().Trim();
                }
                else
                {
                    serop_ini.Text = "";
                    numop_ini.Text = "";
                }
            }
            else
            {
                serop_ini.Text = "";
                numop_ini.Text = "";
            }
        }
Ejemplo n.º 7
0
        private void data_Tablatejido()
        {
            try
            {
                if (Tablatejido.Rows.Count > 0)
                {
                    Tablatejido.Rows.Clear();
                }
                var BL = new tb_60lineaBL();
                var BE = new tb_60linea();

                BE.moduloid = modulo;
                BE.lineaname = txt_criterio.Text.Trim().ToUpper();

                Tablatejido = BL.GetAll(EmpresaID, BE).Tables[0];
                if (Tablatejido.Rows.Count > 0)
                {
                    btn_imprimir.Enabled = true;
                    gridtejido.DataSource = Tablatejido;
                    gridtejido.Rows[0].Selected = false;
                    gridtejido.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 8
0
        private void active_linea()
        {
            try
            {
                var path = string.Empty;
                var directorios = Application.StartupPath.Split('\\');
                if (directorios.Length > 0)
                {
                    path = directorios[0] + "\\" + directorios[1];
                }
                var reportelinea = new CR_linea();

                var BL = new tb_60lineaBL();
                var BE = new tb_60linea();
                var dt = new DataTable();
                BE.moduloid = moduloid.ToString();
                dt = BL.GetAll(VariablesPublicas.EmpresaID.ToString(), BE).Tables[0];
                if (dt.Rows.Count > 0)
                {
                    reportelinea.DataDefinition.FormulaFields["empresaname"].Text = "'EMPRESA: " + VariablesPublicas.EmpresaName.Trim() + "'";
                    reportelinea.DataDefinition.FormulaFields["empresaruc"].Text = "'RUC: " + VariablesPublicas.EmpresaRuc.Trim() + "'";
                    reportelinea.SetDataSource(Movimiento_linea());
                    crystalReportViewer1.ReportSource = reportelinea;
                    crystalReportViewer1.Show();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
        private void data_cbo_tejidoid()
        {
            var BL = new tb_60lineaBL();
            var BE = new tb_60linea();

            BE.moduloid = "0320";
            BE.estructuraid = estructuraid.SelectedValue.ToString();
            try
            {
                tejidoid.DataSource = BL.GetAll(EmpresaID, BE).Tables[0];
                tejidoid.ValueMember = "lineaid";
                tejidoid.DisplayMember = "lineaname";
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }
Ejemplo n.º 10
0
        private void data_Tablalinea()
        {
            try
            {
                if (Tablalinea.Rows.Count > 0)
                {
                    Tablalinea.Rows.Clear();
                }
                var BL = new tb_60lineaBL();
                var BE = new tb_60linea();

                BE.moduloid = moduloiddes.SelectedValue.ToString();
                if (moduloiddes.SelectedValue.ToString() == "0000")
                {
                    MessageBox.Show("Seleccione Almacen", "Information");
                    return;
                }

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

                Tablalinea = BL.GetAll(EmpresaID, BE).Tables[0];
                if (Tablalinea.Rows.Count > 0)
                {
                    btn_imprimir.Enabled = true;
                    gridlinea.DataSource = Tablalinea;
                    gridlinea.Rows[0].Selected = false;
                    gridlinea.Focus();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
            }
        }