Пример #1
0
        public static string validaInfo(string valor, string tipo, string orden = null)
        {
            string    strSecondVal = string.Empty;
            string    strError     = string.Empty;
            string    retorno      = string.Empty;
            DataTable resultado    = new DataTable();

            InterfazDAL_ttwhcol016 idal016 = new InterfazDAL_ttwhcol016();
            Ent_ttwhcol016         obj016  = new Ent_ttwhcol016();

            InterfazDAL_tticol090 idal = new InterfazDAL_tticol090();
            Ent_tticol090         obj  = new Ent_tticol090();

            if (tipo == "1") // Items
            {
                obj.item = valor;
                obj.fpdn = orden;

                resultado = idal.lineClearance_verificaRegistrosOrden_Param(ref obj, ref strError);
            }

            if (tipo == "2") // Lote
            {
                String[] valores = valor.Split('|');

                obj016.clot = valores[0].Trim().ToUpperInvariant();
                obj016.item = valores[1].Trim().ToUpperInvariant();
                obj.fpdn    = orden;

                resultado = idal016.TakeMaterialInv_verificaLote_Param(ref obj016, ref strError);
                strError  = _idioma == "INGLES" ? "Lot code doesn´t exist. Cannot Continue" : "Codigo de lote no existe, no se puede continuar.";
                if (string.IsNullOrEmpty(strError))
                {
                    resultado = idal.lineClearance_verificaRegistrosOrden_Param(ref obj, ref obj016, ref strError);
                }
                strError = _idioma == "INGLES" ? "Lot code was not on Work Order. Cannot Continue" : "Codigo de lote no es de la orden de trabajo, no se puede continuar.";
            }

            // Validar si el numero de orden trae registros
            if (strError != string.Empty)
            {
                return("BAAN: " + strError);
            }
            if (resultado.Rows.Count > 0)
            {
                retorno = resultado.Rows[0]["DESCRIPCION"].ToString();
            }

            return(retorno);
        }
Пример #2
0
        public static string validaInfo(string valor, string tipo, string orden = null)
        {
            string    strSecondVal = string.Empty;
            string    strError     = string.Empty;
            string    retorno      = string.Empty;
            DataTable resultado    = new DataTable();

            InterfazDAL_ttwhcol016 idal016 = new InterfazDAL_ttwhcol016();
            Ent_ttwhcol016         obj016  = new Ent_ttwhcol016();

            InterfazDAL_tticol090 idal = new InterfazDAL_tticol090();
            Ent_tticol090         obj  = new Ent_tticol090();

            if (tipo == "1") // Items
            {
                obj.item = valor;
                obj.fpdn = orden;

                resultado = idal.lineClearance_verificaRegistrosOrden_Param(ref obj, ref strError);
            }

            if (tipo == "2") // Lote
            {
                String[] valores = valor.Split('|');

                obj016.clot = valores[0].Trim().ToUpperInvariant();
                obj016.item = valores[1].Trim().ToUpperInvariant();
                obj.fpdn    = orden;

                resultado = idal016.TakeMaterialInv_verificaLote_Param(ref obj016, ref strError);

                if (string.IsNullOrEmpty(strError))
                {
                    resultado = idal.lineClearance_verificaRegistrosOrden_Param(ref obj, ref obj016, ref strError);
                }
            }

            // Validar si el numero de orden trae registros
            if (strError != string.Empty)
            {
                return("BAAN: " + strError);
            }
            if (resultado.Rows.Count > 0)
            {
                retorno = resultado.Rows[0]["DESCRIPCION"].ToString();
            }

            return(retorno);
        }