예제 #1
0
 /// <summary>
 /// Obtiene un lista paginada
 /// </summary>
 /// <param name="pagina"></param>
 /// <param name="filtro"></param>
 /// <returns></returns>
 public ResultadoInfo <TipoCambioInfo> ObtenerPorPagina(PaginacionInfo pagina, TipoCambioInfo filtro)
 {
     try
     {
         Logger.Info();
         var tipoCambioBL = new TipoCambioBL();
         ResultadoInfo <TipoCambioInfo> result = tipoCambioBL.ObtenerPorPagina(pagina, filtro);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
예제 #2
0
 /// <summary>
 ///  Obtiene una lista filtrando por el estatus Activo = 1, Inactivo = 0
 /// </summary>
 /// <returns></returns>
 public IList <TipoCambioInfo> ObtenerTodos(EstatusEnum estatus)
 {
     try
     {
         Logger.Info();
         var tipoCambioBL = new TipoCambioBL();
         IList <TipoCambioInfo> result = tipoCambioBL.ObtenerTodos(estatus);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
예제 #3
0
 /// <summary>
 /// Obtiene una entidad por su Id
 /// </summary>
 /// <param name="tipoCambioID"></param>
 /// <returns></returns>
 public TipoCambioInfo ObtenerPorID(int tipoCambioID)
 {
     try
     {
         Logger.Info();
         var            tipoCambioBL = new TipoCambioBL();
         TipoCambioInfo result       = tipoCambioBL.ObtenerPorID(tipoCambioID);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
예제 #4
0
 /// <summary>
 /// Obtiene una entidad por su descripción
 /// </summary>
 /// <param name="descripcion"></param>
 ///  <param name="fecha"></param>
 /// <returns></returns>
 public TipoCambioInfo ObtenerPorDescripcionFecha(string descripcion, DateTime fecha)
 {
     try
     {
         Logger.Info();
         var            tipoCambioBL = new TipoCambioBL();
         TipoCambioInfo result       = tipoCambioBL.ObtenerPorDescripcionFecha(descripcion, fecha);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
예제 #5
0
 /// <summary>
 /// Metodo para Guardar/Modificar una entidad TipoCambio
 /// </summary>
 /// <param name="info">Representa la entidad que se va a grabar</param>
 public int Guardar(TipoCambioInfo info)
 {
     try
     {
         Logger.Info();
         var tipoCambioBL = new TipoCambioBL();
         int result       = tipoCambioBL.Guardar(info);
         return(result);
     }
     catch (ExcepcionGenerica)
     {
         throw;
     }
     catch (Exception ex)
     {
         Logger.Error(ex);
         throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
     }
 }
예제 #6
0
        /// <summary>
        /// Obtiene un listado de tipo cambio por fecha
        /// </summary>
        /// <returns></returns>
        public List <TipoCambioInfo> ObtenerPorFechaActual()
        {
            List <TipoCambioInfo> result;

            try
            {
                Logger.Info();
                var tipoCambioBL = new TipoCambioBL();
                result = tipoCambioBL.ObtenerPorFechaActual();
            }
            catch (ExcepcionGenerica)
            {
                throw;
            }
            catch (Exception ex)
            {
                Logger.Error(ex);
                throw new ExcepcionDesconocida(MethodBase.GetCurrentMethod(), ex);
            }
            return(result);
        }
예제 #7
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        //ClienteVO VOcliente = new ClienteVO();
        //ClienteBL BLcliente = new ClienteBL();

        //VOcliente.Cliente_codigo = VOcotizacion.CodigoCliente;
        //VOcliente.Operacion = ClienteVO.BUSCAR_ADMIN_CODIGO;
        //VOcliente = (ClienteVO)BLcliente.execute(VOcliente);
        //if (VOcliente.Cliente_rfc != null)
        //{
        //    dblDescuento = VOcliente.Cliente_descuento;
        //}

        // ---------------------
        if (Session["OrderNumber"] != null)
        {
            cotizacionVO VOcotizacion = new cotizacionVO();
            CotizacionBL BLcotizacion = new CotizacionBL();

            VOcotizacion.Operacion    = cotizacionVO.BUSCAR;
            VOcotizacion.CotizacionId = Int32.Parse(Session["OrderNumber"].ToString());
            VOcotizacion = (cotizacionVO)BLcotizacion.execute(VOcotizacion);

            TipoCambioVO VOTipoCambio = new TipoCambioVO();
            TipoCambioBL BLTipoCambio = new TipoCambioBL();

            VOTipoCambio.MonedaId        = VOcotizacion.TipoMoneda;
            VOTipoCambio.FechaTipoCambio = VOcotizacion.Fecha;
            VOTipoCambio.Operacion       = TipoCambioVO.BUSCAR_TIPOS_CAMBIOS;
            VOTipoCambio = (TipoCambioVO)BLTipoCambio.execute(VOTipoCambio);

            conversionMoneda = VOTipoCambio.ArrCambios;

            //Label FVlblTipoMoneda = (Label)FormViewDisplay.FindControl("lblTipoMoneda");
            //FVlblTipoMoneda.Text = get_tipoMoneda(VOcotizacion.TipoMoneda);
        }

        // ---------------------

        if (!IsPostBack)
        {
//        String prodId = Request.QueryString["Modelo"];
//        DataTable datos = null;
//        //String agno = DateTime.Today.Year.ToString();
//        //String mes = DateTime.Today.Month.ToString().PadLeft(2, '0');
//        //String dia = DateTime.Today.Day.ToString().PadLeft(2, '0');
//        //Double existencia = new Double();
//        //String carpetaEmpresa = "C:/Compacw/Empresas/CALVEK";
//        StringBuilder salida = new StringBuilder();
//        if(prodId != null)
//        {
//            listaAlmacenTableAdapter tabla = new listaAlmacenTableAdapter();
//            datos = tabla.GetData();
//            ArrayList listaNueva = new ArrayList();
//            int index = 0;
////            long prueba = 0;

//            //saludo nuevo = new saludo();
//            //nuevo.fInicializaSDKW();
//            //nuevo.fAbreEmpresaW(carpetaEmpresa);

//            salida.Append("<table cellspacing='0' cellpadding='5' rules='all' border='1' style='border-collapse:collapse;margin-top:10px>");
//            salida.Append("<tr style='color:White;background-color:#990000;'>");
//            salida.Append("<td>");
//            salida.Append("Codigo Almacen.");
//            salida.Append("</td>");
//            salida.Append("<td>");
//            salida.Append("Almacen.");
//            salida.Append("</td>");
//            salida.Append("<td>");
//            salida.Append("Existencias.");
//            salida.Append("</td>");
//            salida.Append("</tr>");
//            while (index < datos.Rows.Count)
//            {
//                salida.Append("<tr>");
//                salida.Append("<td>");
//                salida.Append(datos.Rows[index]["CCODIGOA01"].ToString());
//                salida.Append("</td>");
//                salida.Append("<td>");
//                salida.Append(datos.Rows[index]["CNOMBREA01"].ToString());
//                salida.Append("</td>");
//                salida.Append("<td>");
//                //prueba = nuevo.fRegresaExistenciaW(prodId, datos.Rows[index]["CCODIGOA01"].ToString(), agno, mes, dia, ref existencia);
//                //salida.Append(existencia);

//                salida.Append(Get_Existencia(prodId, Int32.Parse(datos.Rows[index]["CIDALMACEN"].ToString().Trim())));
//                salida.Append("</td>");
//                index++;
//                salida.Append("</tr>");
//            }
//            salida.Append("</table>");

//            //nuevo.fCierraEmpresaW();
//            //nuevo.fTerminaSDKW();
//            tablaExistencia.Text = salida.ToString();
//        }
        }
    }
예제 #8
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        log.Info("Entrando en la busqueda de productos");
        String Criterion = Request.QueryString["Criterion"];
        String textoCat  = Request.QueryString["textoCat"];

        Books.EmptyDataText = "No se encontro el registro.";

        String Category = Request.QueryString["Categoria"];

        Books.DataSourceID       = "";
        Books.PagerSettings.Mode = PagerButtons.NextPreviousFirstLast;
        Books.AllowPaging        = true;

        //-----------------------------

        if (Session["OrderNumber"] != null)
        {
            cotizacionVO VOcotizacion = new cotizacionVO();
            CotizacionBL BLcotizacion = new CotizacionBL();

            //ClienteVO VOcliente = new ClienteVO();
            //ClienteBL BLcliente = new ClienteBL();

            TipoCambioVO VOTipoCambio = new TipoCambioVO();
            TipoCambioBL BLTipoCambio = new TipoCambioBL();

            VOcotizacion.Operacion    = cotizacionVO.BUSCAR;
            VOcotizacion.CotizacionId = Int32.Parse(Session["OrderNumber"].ToString());
            VOcotizacion = (cotizacionVO)BLcotizacion.execute(VOcotizacion);

            intEstatusCotizacion = VOcotizacion.EstatusCotizacionId;

            VOTipoCambio.MonedaId        = VOcotizacion.TipoMoneda;
            VOTipoCambio.FechaTipoCambio = VOcotizacion.Fecha;
            VOTipoCambio.Operacion       = TipoCambioVO.BUSCAR_TIPOS_CAMBIOS;
            VOTipoCambio = (TipoCambioVO)BLTipoCambio.execute(VOTipoCambio);

            conversionMoneda = VOTipoCambio.ArrCambios;

            lblTipoMoneda.Text = get_tipoMoneda(VOcotizacion.TipoMoneda);


            //for (int i =0; i<=conversionMoneda.GetLength(1)-1;i++)
            //{
            //    lblTipoMoneda.Text = lblTipoMoneda.Text + "<BR>" + conversionMoneda[0,i] +"-"+ conversionMoneda[1,i];
            //}

            if (!IsPostBack)
            {
                Session["vistaMode"] = 0;
            }
        }


        //-----------------------------

        Books.PageSize = 10;

        if (Category != null)
        {
            Type.Text          = " Productos: " + textoCat;
            Books.DataSourceID = "ObjectDataSourceProd";
        }
        else if (Criterion != null)
        {
            Type.Text          = "Resultados de la Busqueda: " + Criterion;
            Books.DataSourceID = "ObjectDataSourceProd2";
        }

        if (Session["OrderNumber"] == null)
        {
            lkbAltaProductoComodin.Visible = false;
            Books.Columns[3].Visible       = false;
        }
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        lblCodigo.Text  = "intGuardar: " + Request.QueryString["intGuardar"];
        lblCodigo.Text += " intDay: " + Request.QueryString["intDay"];
        lblCodigo.Text += " intMonth: " + Request.QueryString["intMonth"];
        lblCodigo.Text += " intYear: " + Request.QueryString["intYear"];

        String strDay   = "";
        String strMonth = "";
        String strYear  = "";

        DateTime CurrTime = DateTime.Now;

        if (Request.QueryString["intDay"] != null && Request.QueryString["intMonth"] != null && Request.QueryString["intYear"] != null)
        {
            strDay   = Request.QueryString["intDay"].ToString();
            strMonth = Request.QueryString["intMonth"].ToString();
            strYear  = Request.QueryString["intYear"].ToString();
        }
        else
        {
            strDay   = Right("00" + CurrTime.Day.ToString(), 2);
            strMonth = Right("00" + CurrTime.Month.ToString(), 2);
            strYear  = CurrTime.Year.ToString();
        }

        // strfecha = strDay + "/" + strMonth + "/" + strYear;

        string fileName = "E:\\cotizador\\CotizadorCalvek\\Logs\\logTipoCambio.txt";
        //FileStream stream = new FileStream(fileName, FileMode.OpenOrCreate, FileAccess.Write);
        FileStream   stream = new FileStream(fileName, FileMode.Append);
        StreamWriter writer = new StreamWriter(stream);

        writer.WriteLine("--------------------  {0:d}  --------------------", CurrTime);

        try
        {
            String baseUri = "http://www.diariooficial.gob.mx/indicadores_detalle.php?cod_tipo_indicador=158&dfecha=" + strDay + "%2F" + strMonth + "%2F" + strYear + "&hfecha=" + strDay + "%2F" + strMonth + "%2F" + strYear;
            lblCodigo.Text += "<BR>" + baseUri;
            HttpWebRequest connection =
                (HttpWebRequest)HttpWebRequest.Create(baseUri);

            connection.Method = "GET";
            HttpWebResponse response = (HttpWebResponse)connection.GetResponse();

            StreamReader sr = new StreamReader(response.GetResponseStream(), Encoding.UTF8);

            string    sLine   = "";
            ArrayList arrText = new ArrayList();

            while (sLine != null)
            {
                sLine = sr.ReadLine();
                if (sLine != null)
                {
                    arrText.Add(sLine);
                }
            }
            sr.Close();

            String strCadena;
            int    intConteo = 0;
            foreach (string sOutput in arrText)
            {
                if (System.Text.RegularExpressions.Regex.IsMatch(sOutput, "width=\"52%\"", System.Text.RegularExpressions.RegexOptions.IgnoreCase))
                {
                    strCadena = sOutput.Trim();
                    strCadena = strCadena.Replace('<', ',');
                    strCadena = strCadena.Replace('>', ',');
                    string[] words = strCadena.Split(',');
                    ////lblCodigo.Text += "<BR>" + sOutput.Trim();
                    //foreach (string s in words)
                    //{
                    //    lblCogido.Text += "<BR>" + s;
                    //}
                    intConteo++;

                    lblCodigo.Text += "<BR>Conteo: " + intConteo + " valor:" + words[2].Trim();

                    if (intConteo == 2)
                    {
                        if (Request.QueryString["intGuardar"] != null && Request.QueryString["intGuardar"].ToString() == "1")
                        {
                            TipoCambioVO VO = new TipoCambioVO();
                            TipoCambioBL BL = new TipoCambioBL();
                            DateTime     fechaTipoCambio = new DateTime(Int32.Parse(strYear), Int32.Parse(strMonth), Int32.Parse(strDay));
                            //VO.MonedaId = 1;
                            VO.FechaTipoCambio = fechaTipoCambio;
                            VO.Cambio          = Double.Parse(words[2].Trim());
                            VO.Operacion       = TipoCambioVO.INSERTAR;
                            VO = (TipoCambioVO)BL.execute(VO);
                            if (VO.Resultado == 0)
                            {
                                lblCodigo.Text += "<BR>SE INSERTO CORRECTAMENTE";
                                writer.WriteLine("SE INSERTO CORRECTAMENTE EN BD");
                                //try
                                //                {
                                //                String baseUri2 = "http://mexmessag.nextelinternational.com/cgi/iPageExt.dll?ignore=4421481820&subject=alerta_TipoCambio&message=" + VO.FechaTipoCambio + "%20Tipo%20de%20cambio:%20" + VO.Cambio + "%20correctamente%20Y%20Pagina&oneWayPTNs=4421481820&cmd=sendPage";
                                //                HttpWebRequest connection2 = (HttpWebRequest)HttpWebRequest.Create(baseUri2);

                                //                connection.Method = "GET";
                                //                HttpWebResponse response2 = (HttpWebResponse)connection2.GetResponse();
                                //                //----
                                //                }
                                //                catch (Exception ex)
                                //                {
                                //                    writer.WriteLine("Excepcion: " + ex.Message);
                                //                }
                            }
                            else
                            {
                                lblCodigo.Text += "<BR>FALLO LA INSERCION";
                                writer.WriteLine("NO SE INSERTO EL REGISTRO EN BD");
                            }
                        }
                    }
                    writer.WriteLine("" + words[2].Trim());
                }
            }
        }
        catch (Exception ex)
        {
            writer.WriteLine("Excepcion: " + ex.Message);
        }


        writer.Close();
        //Response.Write("<script type=\"text/javascript\">window.open('','_self','');window.close();</script>");
    }
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        //String carpetaEmpresa = "C:/Compacw/Empresas/CALVEK";
        //saludo nuevo = new saludo();
        //nuevo.fInicializaSDKW();
        //nuevo.fAbreEmpresaW(carpetaEmpresa);
        //long resultadoAdminpaq;
        //String strRazonSocial = "                                   ";

        //// determinar si el usuario tiene los permisos para aceptar una cotizacion.
        //String error1 = Utilis.validaPermisos(Session, 14);
        //if (error1.Equals(""))
        //    {
        //    blnBanderaAceptaCotizacion = true;
        //    }

        //// determinar si el usuario tiene los permisos para aceptar una cotizacion con descuento.
        //String error2 = Utilis.validaPermisos(Session, 15);
        //if (error2.Equals(""))
        //    {
        //    blnBanderaAceptaCotizacionDescuento = true;
        //    }

        Double dblDescuento = 0;

        cotizacionVO VOcotizacion = new cotizacionVO();
        CotizacionBL BLcotizacion = new CotizacionBL();

        ClienteVO VOcliente = new ClienteVO();
        ClienteBL BLcliente = new ClienteBL();

        TipoCambioVO VOtipoCambio = new TipoCambioVO();
        TipoCambioBL BLtipoCambio = new TipoCambioBL();

        usuarioVO VOUsuario = new usuarioVO();
        UsuarioBL BLUsuario = new UsuarioBL();

        if (Request["cotizacionid"] != null)
        {
            Session["OrderNumber"]    = Request["cotizacionid"];
            VOcotizacion.Operacion    = cotizacionVO.BUSCAR;
            VOcotizacion.CotizacionId = Int32.Parse(Request["cotizacionid"]);
            VOcotizacion = (cotizacionVO)BLcotizacion.execute(VOcotizacion);
        }

        if (!Page.IsPostBack)
        {
            OrderNumberLabel.Text = (String)Session["OrderNumber"];
        }

        lbEstatusCotizacion.Text = VOcotizacion.EstatusCotizacionNombre;//Request["Estatus"];
        intEstatusCotizacion     = VOcotizacion.EstatusCotizacionId;

        //resultadoAdminpaq = nuevo.fBuscaCteProvW(VOcotizacion.CodigoCliente);
        //resultadoAdminpaq = nuevo.fLeeDatoCteProvW("CRAZONSO01", ref strRazonSocial, 30);
        //lblRazonSocial.Text = strRazonSocial;

        lblRazonSocial.Text = VOcotizacion.ClienteIdNuevo.ToString();

        VOcliente.Cliente_codigo = VOcotizacion.CodigoCliente;
        VOcliente.Operacion      = ClienteVO.BUSCAR_ADMIN_CODIGO;
        VOcliente = (ClienteVO)BLcliente.execute(VOcliente);
        if (VOcliente.Cliente_rfc != null)
        {
            lblRazonSocial.Text = VOcliente.Cliente_razonSocial;
            dblDescuento        = VOcliente.Cliente_descuento;
        }
        else
        {
            if (VOcotizacion.ClienteIdNuevo > 0)
            {
                VOcliente.Clienteid = VOcotizacion.ClienteIdNuevo;
                VOcliente.Operacion = ClienteVO.BUSCAR;
                VOcliente           = (ClienteVO)BLcliente.execute(VOcliente);
                if (VOcliente.Cliente_razonSocial != null)
                {
                    lblRazonSocial.Text = VOcliente.Cliente_razonSocial;
                    dblDescuento        = 0;
                }
            }
        }

        //nuevo.fCierraEmpresaW();
        //nuevo.fTerminaSDKW();

        VOtipoCambio.MonedaId  = VOcotizacion.TipoMoneda;
        VOtipoCambio.Operacion = TipoCambioVO.BUSCAR;
        VOtipoCambio           = (TipoCambioVO)BLtipoCambio.execute(VOtipoCambio);

        if (VOtipoCambio.Descripcion != null)
        {
            strTipoMonedaDescripcion = VOtipoCambio.Descripcion;
            //dblConversionCambio = VOtipoCambio.Cambio;
            lblMoneda.Text = strTipoMonedaDescripcion;
        }

        lblNumMoneda.Text = (VOcotizacion.TipoMoneda).ToString();

        if (VOcotizacion.TipoMoneda == 1)
        {
            lblTipoCambio.Text = "1";
        }
        else
        {
            VOtipoCambio.Operacion       = TipoCambioVO.BUSCAR_TIPOS_CAMBIOS;
            VOtipoCambio.FechaTipoCambio = VOcotizacion.Fecha;
            VOtipoCambio.MonedaId        = 1;
            VOtipoCambio = (TipoCambioVO)BLtipoCambio.execute(VOtipoCambio);
            String[,] conversionMoneda = VOtipoCambio.ArrCambios;

            for (int i = 0; i <= conversionMoneda.GetLength(1) - 1; i++)
            {
                if (Int32.Parse(conversionMoneda[0, i]) == VOcotizacion.TipoMoneda)
                {
                    lblTipoCambio.Text = conversionMoneda[1, i];
                }
            }
        }

        lblFechaCotizacion.Text = VOcotizacion.Fecha.ToString();
        lblCodigoCliente.Text   = VOcotizacion.CodigoCliente;

        VOUsuario.Usuarioid = VOcotizacion.UsuarioId;
        VOUsuario.Operacion = usuarioVO.BUSCAR;
        VOUsuario           = (usuarioVO)BLUsuario.execute(VOUsuario);

        lblCodigoAgente.Text = VOUsuario.Usuario_codigoUsuarioAdmin;
    }
예제 #11
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        int usuario_OficinaId = 0;

        InfoSessionVO infoSession;

        infoSession       = (InfoSessionVO)Session["InfoSession"];
        usuario_OficinaId = (int)infoSession.getValor(InfoSessionVO.OFICINA);

        OrdenCompraBL OCBL = new OrdenCompraBL();
        OrdenCompraVO OCVO = new OrdenCompraVO();

        OCVO.Operacion     = OrdenCompraVO.BUSCAR;
        OCVO.OrdenCompraId = Int32.Parse(Request["ordenCompraId"].ToString());
        OCVO = (OrdenCompraVO)OCBL.execute(OCVO);

        int idOficinaBusqueda = OCVO.OficinaId;

        //CALVEK DEL CENTRO - TEL OFICINA SLP
        if (idOficinaBusqueda == 2)
        {
            lblRazonSoc.Text       = "CALVEK COMPONENTES DEL CENTRO SA DE CV";
            lblrfcRazon.Text       = "CCC111122IZ5";
            lblcalleRazon.Text     = "Carretera Central KM 423 Local 7,";
            lbldireccionRazon.Text = "Don MIguel, C.P.:78395, San Luis Potosí, S. L. P.";
            lbltelRazon.Text       = "(444) 567-53-27,128-61-20";
            lblfaxRazon.Text       = "(444) 128-61-22";
        }
        //CALVEK BAJIO
        if (idOficinaBusqueda == 3)
        {
            lblRazonSoc.Text       = "CALVEK COMPONENTES BAJIO SA DE CV";
            lblrfcRazon.Text       = "CCB121019IE1";
            lblcalleRazon.Text     = "Calle San Pedro No. 70 ";
            lbldireccionRazon.Text = "Rinconada de San Pedro, C.P.:78434, Soledad De Graciano Sánchez, S. L. P.";
            //TELEFONOS QUERETARO
            if (usuario_OficinaId == 6)
            {
                lbltelRazon.Text = "(442) 298-00-31,298-02-15";
                lblfaxRazon.Text = "(442) 298-01-07";
            }
            //TELEFONOS CELAYA
            if (usuario_OficinaId == 7)
            {
                lbltelRazon.Text = "(461) 615-47-64";
                lblfaxRazon.Text = "(461) 609-09-94";
            }
            //TELEFONOS IRAPUATO
            if (usuario_OficinaId == 8)
            {
                lbltelRazon.Text = "(462) 624-50-19";
                lblfaxRazon.Text = "(462) 624-50-19";
            }
        }
        //CALVEK SA - TEL OFICINA MATRIZ
        if (idOficinaBusqueda == 1)
        {
            lblRazonSoc.Text       = "CALVEK SA";
            lblrfcRazon.Text       = "CAL980715AA3";
            lblcalleRazon.Text     = "Calle San Pedro No. 70 ";
            lbldireccionRazon.Text = "Rinconada de San Pedro, C.P.:78434, Soledad De Graciano Sánchez, S. L. P.";
            lbltelRazon.Text       = "(444) 818-38-07";
            lblfaxRazon.Text       = "(444) 818-38-07";
        }


        lblFecha.Text = OCVO.FechaAlta.ToString("d");

        lblFechaEntrega.Text          = OCVO.FechaEntrega;
        lblContacto.Text              = OCVO.Contacto;
        lblDatosTransferencia.Text    = OCVO.DatosTransferencia;
        lblInstruccionesEmbarque.Text = OCVO.InstruccionesEmbarque;
        lblTerminos.Text              = OCVO.Terminos;
        lblFob.Text         = OCVO.Fob;
        lblProyecto.Text    = OCVO.NombreProyecto;
        lblJob.Text         = OCVO.NombreJob;
        lblViaEmbarque.Text = OCVO.ViaEmbarque;
        lblMoneda.Text      = OCVO.MonedaId.ToString();
        Label6.Text         = OCVO.OrdenServicio.ToString();
        lblNombreJefe.Text  = OCVO.NombreJefe;

        lblDescuento.Text      = OCVO.PorcentajeDescuento.ToString("F2");
        lblEnvio.Text          = String.Format("{0:#,##0.00}", OCVO.CostoEnvio);       //OCVO.CostoEnvio.ToString("F2");
        lblImpuesto.Text       = OCVO.PorcentajeImpuesto.ToString("F2");
        lblImpImportacion.Text = String.Format("{0:#,##0.00}", OCVO.CostoImportacion); //OCVO.CostoImportacion.ToString("F2");

        try
        {
            if (OCVO.AccountName.Trim().Length == 0)
            {
                ((Panel)GridView1.FooterRow.FindControl("pnlBankInformation")).Visible = false;
            }
            else
            {
                ((Label)GridView1.FooterRow.FindControl("lblAccountName")).Text   = OCVO.AccountName;
                ((Label)GridView1.FooterRow.FindControl("lblNameAddress")).Text   = OCVO.Address;
                ((Label)GridView1.FooterRow.FindControl("lblBankName")).Text      = OCVO.BankName;
                ((Label)GridView1.FooterRow.FindControl("lblAccountNumber")).Text = OCVO.AccountNumber;
                ((Label)GridView1.FooterRow.FindControl("lblAba")).Text           = OCVO.Aba;
                ((Label)GridView1.FooterRow.FindControl("lblBankAddress")).Text   = OCVO.BankAddress;
            }
        }
        catch (Exception ex)
        {
            //((Panel)GridView1.FooterRow.FindControl("pnlBankInformation")).Visible = false;
        }

        lblOrdenCompraId.Text = "Q" + (OCVO.OrigenId == 1 ? "N-" + OCVO.IdNacional.ToString() : "I-" + OCVO.IdInternacional.ToString());

        ProveedoresBL BL = new ProveedoresBL();
        ProveedoresVO VO = new ProveedoresVO();

        VO.Operacion   = ProveedoresVO.BUSCAR;
        VO.ProveedorId = OCVO.ProveedorId;
        VO             = (ProveedoresVO)BL.execute(VO);

        //txtContacto.Text = VO.Representante;
        lblProveedor.Text       = VO.Nombre;
        lblNombreProveedor.Text = VO.Nombre;
        lblRFC.Text             = VO.Rfc;

        DireccionesBL DBL = new DireccionesBL();
        DireccionesVO DVO = new DireccionesVO();

        DVO.Operacion   = DireccionesVO.BUSCAR;
        DVO.DireccionId = VO.DireccionId;
        DVO             = (DireccionesVO)DBL.execute(DVO);


        lblDireccion.Text = DVO.Calle + " " + DVO.NoExterior + " " + DVO.NoInterior + ", " + DVO.Colonia + ", " + DVO.Cp + ", " + DVO.Ciudad + ", " + DVO.Estado;
        lblEMail.Text     = DVO.Email;

        lblTelefono.Text = DVO.Telefono1;
        lblFax.Text      = DVO.Fax;

        TipoCambioVO VOtipoCambio = new TipoCambioVO();
        TipoCambioBL BLtipoCambio = new TipoCambioBL();

        VOtipoCambio.MonedaId  = OCVO.MonedaId;
        VOtipoCambio.Operacion = TipoCambioVO.BUSCAR;
        VOtipoCambio           = (TipoCambioVO)BLtipoCambio.execute(VOtipoCambio);

        if (VOtipoCambio.Descripcion != null)
        {
            lblMoneda.Text = VOtipoCambio.Descripcion;
        }

        usuarioVO VOUsuario = new usuarioVO();
        UsuarioBL BLUsuario = new UsuarioBL();

        VOUsuario.Operacion = usuarioVO.BUSCAR;
        VOUsuario.Usuarioid = OCVO.UsuarioId;
        VOUsuario           = (usuarioVO)BLUsuario.execute(VOUsuario);

        lblNombreAgente.Text = VOUsuario.Usuario_nombrecompleto;

        //InfoSessionVO infoSession = (InfoSessionVO)Session["InfoSession"];
        if (Int32.Parse(infoSession.getValor(InfoSessionVO.OFICINA).ToString()) != 4)
        {
            Image1.ImageUrl = "~/Imagenes/caidaCalvek.JPG";
        }
        else
        {
            Image1.ImageUrl = "~/Imagenes/logoCalvekAutomation.jpg";
        }

        OCBL        = null;
        OCVO        = null;
        BL          = null;
        VO          = null;
        DBL         = null;
        DVO         = null;
        VOUsuario   = null;
        BLUsuario   = null;
        infoSession = null;
    }
예제 #12
0
    protected void Page_Load(object sender, EventArgs e)
    {
        String error = Utilis.validaPermisos(Session, NUMFUNCION);

        if (!error.Equals(""))
        {
            Response.Redirect(error);
        }

        OrdenCompraBL OCBL = new OrdenCompraBL();
        OrdenCompraVO OCVO = new OrdenCompraVO();

        OCVO.Operacion     = OrdenCompraVO.BUSCAR;
        OCVO.OrdenCompraId = Int32.Parse(Request["ordenCompraId"].ToString());
        OCVO = (OrdenCompraVO)OCBL.execute(OCVO);

        lblFecha.Text = OCVO.FechaAlta.ToString("d");

        lblFechaEntrega.Text          = OCVO.FechaEntrega;
        lblContacto.Text              = OCVO.Contacto;
        lblDatosTransferencia.Text    = OCVO.DatosTransferencia;
        lblInstruccionesEmbarque.Text = OCVO.InstruccionesEmbarque;
        lblTerminos.Text              = OCVO.Terminos;
        lblFob.Text         = OCVO.Fob;
        lblProyecto.Text    = OCVO.NombreProyecto;
        lblJob.Text         = OCVO.NombreJob;
        lblViaEmbarque.Text = OCVO.ViaEmbarque;
        lblMoneda.Text      = OCVO.MonedaId.ToString();
        Label6.Text         = OCVO.OrdenServicio.ToString();
        lblNombreJefe.Text  = OCVO.NombreJefe;

        lblDescuento.Text      = OCVO.PorcentajeDescuento.ToString("F2");
        lblEnvio.Text          = String.Format("{0:#,##0.00}", OCVO.CostoEnvio);       //OCVO.CostoEnvio.ToString("F2");
        lblImpuesto.Text       = OCVO.PorcentajeImpuesto.ToString("F2");
        lblImpImportacion.Text = String.Format("{0:#,##0.00}", OCVO.CostoImportacion); //OCVO.CostoImportacion.ToString("F2");

        try
        {
            if (OCVO.AccountName.Trim().Length == 0)
            {
                ((Panel)GridView1.FooterRow.FindControl("pnlBankInformation")).Visible = false;
            }
            else
            {
                ((Label)GridView1.FooterRow.FindControl("lblAccountName")).Text   = OCVO.AccountName;
                ((Label)GridView1.FooterRow.FindControl("lblNameAddress")).Text   = OCVO.Address;
                ((Label)GridView1.FooterRow.FindControl("lblBankName")).Text      = OCVO.BankName;
                ((Label)GridView1.FooterRow.FindControl("lblAccountNumber")).Text = OCVO.AccountNumber;
                ((Label)GridView1.FooterRow.FindControl("lblAba")).Text           = OCVO.Aba;
                ((Label)GridView1.FooterRow.FindControl("lblBankAddress")).Text   = OCVO.BankAddress;
            }
        }
        catch (Exception ex)
        {
            //((Panel)GridView1.FooterRow.FindControl("pnlBankInformation")).Visible = false;
        }

        lblOrdenCompraId.Text = (OCVO.OrigenId == 1 ? "N-" + OCVO.IdNacional.ToString() : "I-" + OCVO.IdInternacional.ToString());

        ProveedoresBL BL = new ProveedoresBL();
        ProveedoresVO VO = new ProveedoresVO();

        VO.Operacion   = ProveedoresVO.BUSCAR;
        VO.ProveedorId = OCVO.ProveedorId;
        VO             = (ProveedoresVO)BL.execute(VO);

        //txtContacto.Text = VO.Representante;
        lblProveedor.Text       = VO.Nombre;
        lblNombreProveedor.Text = VO.Nombre;
        lblRFC.Text             = VO.Rfc;

        DireccionesBL DBL = new DireccionesBL();
        DireccionesVO DVO = new DireccionesVO();

        DVO.Operacion   = DireccionesVO.BUSCAR;
        DVO.DireccionId = VO.DireccionId;
        DVO             = (DireccionesVO)DBL.execute(DVO);


        lblDireccion.Text = DVO.Calle + " " + DVO.NoExterior + " " + DVO.NoInterior + ", " + DVO.Colonia + ", " + DVO.Cp + ", " + DVO.Ciudad + ", " + DVO.Estado;
        lblEMail.Text     = DVO.Email;

        lblTelefono.Text = DVO.Telefono1;
        lblFax.Text      = DVO.Fax;

        TipoCambioVO VOtipoCambio = new TipoCambioVO();
        TipoCambioBL BLtipoCambio = new TipoCambioBL();

        VOtipoCambio.MonedaId  = OCVO.MonedaId;
        VOtipoCambio.Operacion = TipoCambioVO.BUSCAR;
        VOtipoCambio           = (TipoCambioVO)BLtipoCambio.execute(VOtipoCambio);

        if (VOtipoCambio.Descripcion != null)
        {
            lblMoneda.Text = VOtipoCambio.Descripcion;
        }

        usuarioVO VOUsuario = new usuarioVO();
        UsuarioBL BLUsuario = new UsuarioBL();

        VOUsuario.Operacion = usuarioVO.BUSCAR;
        VOUsuario.Usuarioid = OCVO.UsuarioId;
        VOUsuario           = (usuarioVO)BLUsuario.execute(VOUsuario);

        lblNombreAgente.Text = VOUsuario.Usuario_nombrecompleto;

        InfoSessionVO infoSession = (InfoSessionVO)Session["InfoSession"];

        if (Int32.Parse(infoSession.getValor(InfoSessionVO.OFICINA).ToString()) != 4)
        {
            Image1.ImageUrl = "~/Imagenes/caidaCalvek.JPG";
        }
        else
        {
            Image1.ImageUrl = "~/Imagenes/logoCalvekAutomation.jpg";
        }

        OCBL        = null;
        OCVO        = null;
        BL          = null;
        VO          = null;
        DBL         = null;
        DVO         = null;
        VOUsuario   = null;
        BLUsuario   = null;
        infoSession = null;
    }
예제 #13
0
    protected void Page_Load(object sender, EventArgs e)
    {
        lblCotizacion.Text = Request["cotizacionid"].ToString();

        int intLogoComponentes = Int32.Parse(Request.QueryString["intLogoComponentes"]);

        cotizacionVO VOcotizacion = new cotizacionVO();
        CotizacionBL BLcotizacion = new CotizacionBL();

        ClienteVO VOcliente = new ClienteVO();
        ClienteBL BLcliente = new ClienteBL();

        TipoCambioVO VOtipoCambio = new TipoCambioVO();
        TipoCambioBL BLtipoCambio = new TipoCambioBL();

        usuarioVO VOUsuario = new usuarioVO();
        UsuarioBL BLUsuario = new UsuarioBL();

        if (Request["cotizacionid"] != null)
        {
            VOcotizacion.Operacion    = cotizacionVO.BUSCAR;
            VOcotizacion.CotizacionId = Int32.Parse(Request["cotizacionid"]);
            VOcotizacion = (cotizacionVO)BLcotizacion.execute(VOcotizacion);
        }

        lblFechaCotizacion.Text = String.Format("{0:dd/MM/yyyy}", VOcotizacion.FechaCaida.ToString());

        lblLAB.Text             = VOcotizacion.LAB;
        lblCondicionesPago.Text = VOcotizacion.CondicionesPago;
        lblRepresentante.Text   = VOcotizacion.RepresentanteLegal;

        VOUsuario.Operacion = usuarioVO.BUSCAR;
        VOUsuario.Usuarioid = VOcotizacion.UsuarioId;
        VOUsuario           = (usuarioVO)BLUsuario.execute(VOUsuario);

        lblAsesor.Text   = VOUsuario.Usuario_nombrecompleto;
        lblAsesor2.Text  = VOUsuario.Usuario_nombrecompleto;
        lblEmail.Text    = VOUsuario.Usuario_correoElectronico;
        lblRadio.Text    = VOUsuario.Usuario_radio;
        lblVigencia.Text = VOcotizacion.FechaVencimiento;

        VOcliente.Clienteid = VOcotizacion.ClienteIdNuevo;
        VOcliente.Operacion = ClienteVO.BUSCAR;
        VOcliente           = (ClienteVO)BLcliente.execute(VOcliente);
        if (VOcliente.Cliente_razonSocial != null)
        {
            lblRazonSocial.Text      = VOcliente.Cliente_razonSocial;
            lblDireccionCliente.Text = VOcliente.Cliente_calle;
            lblTelefonoCliente.Text  = VOcliente.Cliente_TelefonoContacto;
        }

        VOtipoCambio.MonedaId  = VOcotizacion.TipoMoneda;
        VOtipoCambio.Operacion = TipoCambioVO.BUSCAR;
        VOtipoCambio           = (TipoCambioVO)BLtipoCambio.execute(VOtipoCambio);

        lblNotas.Text = VOcotizacion.Notas.ToString().ToUpper();

        if (VOtipoCambio.Descripcion != null)
        {
            lblMoneda.Text  = VOtipoCambio.Descripcion;
            lblMoneda2.Text = VOtipoCambio.Descripcion;
        }

        lblCondicion1.Text = "Los Precios anteriores están en " + lblMoneda2.Text + ", al tipo de cambio del día de pago (con excepción de los indicados en M.N).";
        lblCondicion2.Text = "Condiciones de pago:" + lblCondicionesPago.Text;
        lblCondicion3.Text = "LAB:" + lblLAB.Text;
        lblCondicion4.Text = "TODA CANCELACIÓN CAUSARA UN CARGO DEL 30% SOBRE EL MONTO DEL PEDIDO.";
        lblCondicion5.Text = "EXISTENCIA SUJETA AL DIA DE FECHA DE COTIZACION, SALVO PREVIA VENTA.";

        lblCondicion4.Font.Bold = true;
        lblCondicion5.Font.Bold = true;
        lblCondicion4.Font.Size = 10;
        lblCondicion5.Font.Size = 8;
        lblCondicion3.Font.Size = 8;
        lblCondicion2.Font.Size = 8;
        lblCondicion1.Font.Size = 8;


        if (lblMoneda.Text == "PESOS")
        {
            lblCondicion1.Text = "Condiciones de pago:" + lblCondicionesPago.Text;
            lblCondicion2.Text = "LAB:" + lblLAB.Text;
            lblCondicion3.Text = "TODA CANCELACIÓN CAUSARA UN CARGO DEL 30% SOBRE EL MONTO DEL PEDIDO.";
            lblCondicion4.Text = "EXISTENCIA SUJETA AL DIA DE FECHA DE COTIZACION, SALVO PREVIA VENTA.";

            lblCondicion3.Font.Bold = true;
            lblCondicion4.Font.Bold = true;
            lblCondicion3.Font.Size = 10;
            lblCondicion4.Font.Size = 8;
            lblCondicion2.Font.Size = 8;
            lblCondicion1.Font.Size = 8;
            lblCondicion5.Visible   = false;
        }
        else
        {
            lblCondicion1.Text = "Los Precios anteriores están en " + lblMoneda2.Text + ", sujeto al tipo de cambio del día de pago.";
            lblCondicion2.Text = "Condiciones de pago:" + lblCondicionesPago.Text;
            lblCondicion3.Text = "LAB:" + lblLAB.Text;
            lblCondicion4.Text = "TODA CANCELACIÓN CAUSARA UN CARGO DEL 30% SOBRE EL MONTO DEL PEDIDO.";
            lblCondicion5.Text = "EXISTENCIA SUJETA AL DIA DE FECHA DE COTIZACION, SALVO PREVIA VENTA.";

            lblCondicion4.Font.Bold = true;
            lblCondicion5.Font.Bold = true;
            //lblCondicion4.Font.Size = 10;
            //lblCondicion5.Font.Size = 7;
            //lblCondicion3.Font.Size = 8;
            //lblCondicion2.Font.Size = 8;
            //lblCondicion1.Font.Size = 8;
            lblCondicion4.Font.Size = 10;
            lblCondicion5.Font.Size = 8;
            lblCondicion3.Font.Size = 8;
            lblCondicion2.Font.Size = 8;
            lblCondicion1.Font.Size = 8;
        }


        //InfoSessionVO infoSession = (InfoSessionVO)Session["InfoSession"];
        //if (Int32.Parse(infoSession.getValor(InfoSessionVO.OFICINA).ToString()) == 2)
        //{
        if (intLogoComponentes == 0)
        {
            Image1.ImageUrl = "~/Imagenes/caida1.JPG";


            lblCuenta1.Text = "BBVA MX : No. Cuenta 0448265798 / Cbe. Interbancaria 012700004482657983";
            lblCuenta2.Text = "BBVA DLLS : No. Cuenta 0448265828 / Cbe. Interbancaria 012700004482658283";
            lblCuenta3.Text = "BANAMEX MX : No. Cuenta 5492531 / Cbe. Interbancaria 002700038354925318";
            lblCuenta4.Text = "BANAMEX DLLS : No. Cuenta 9440978 / Cbe. Interbancaria 002700038394409784";
        }
        if (intLogoComponentes == 1)
        {
            Image1.ImageUrl = "~/Imagenes/caidaCalvekComponentes.JPG";

            lblCuenta1.Text = "BBVA MX : No. Cuenta 0188427836 / Cbe. Interbancaria 012700001884278361";
            lblCuenta2.Text = "BBVA DLLS : No. Cuenta 0188588643 / Cbe. Interbancaria 012700001885886435";
            lblCuenta3.Text = "BANAMEX MX : No. Cuenta 2504076 / Cbe. Interbancaria 002700700325040767";
            lblCuenta4.Text = "BANAMEX DLLS : No. Cuenta 9442067 / Cbe. Interbancaria 002700038394420670";
        }
        if (intLogoComponentes == 2)
        {
            Image1.ImageUrl = "~/Imagenes/caidaCalvekBajio.JPG";

            lblCuenta1.Text = "BBVA MX : No. Cuenta 0191998102 / Cbe. Interbancaria 012700001919981028";
            lblCuenta2.Text = "BBVA DLLS : No. Cuenta 0191998153 / Cbe. Interbancaria 012700001919981536";
            lblCuenta3.Text = "BANAMEX MX : No. Cuenta 2162880 / Cbe. Interbancaria 002700700521628802";
            lblCuenta4.Text = "BANAMEX DLLS : No. Cuenta 9442180 / Cbe. Interbancaria 002700038394421801";
        }



        //}
    }