예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    //Empresa_Cargar();
                    //cboEmpresa.SelectedValue = ((Usuario_LoginResult)Session["Usuario"]).idEmpresa.ToString();

                    if (Request.QueryString["objPerfil"] == "")
                    {
                        Title = "Registrar proyección";
                        ///*cboEmpresa*/.SelectedValue = ((Usuario_LoginResult)Session["Usuario"]).idEmpresa.ToString();

                        lblMensaje.Text     = "Listo para cargar masivamente la proyección";
                        lblMensaje.CssClass = "mensajeExito";
                    }
                }
            }
            catch (Exception ex) {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    EgresosVarios_Cargar(int.Parse((Request.QueryString["idOperacion"])));
                    this.Title = "Resumen de planilla de pago";
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    Empresa_Cargar();
                    if (Request.QueryString["objUsuario"] != "")
                    {
                        Title = "Modificar Usuario";
                        string obj = Request.QueryString["objUsuario"];

                        Usuario_BuscarResult objUsuario = JsonHelper.JsonDeserialize <Usuario_BuscarResult>(Request.QueryString["objUsuario"]);
                        ViewState["lstUsuario"] = JsonHelper.JsonSerializer(objUsuario);

                        cboEmpresa.SelectedValue = objUsuario.idEmpresa.ToString();
                        Perfil_Cargar(int.Parse(cboEmpresa.SelectedValue), "");
                        cboEmpresa.Enabled = false;

                        txtNombre.Text = objUsuario.nombres;
                        txtLogin.Text  = objUsuario.loginUsuario;
                        txtCorreo.Text = objUsuario.correo;

                        cboPerfil.SelectedValue = Convert.ToInt32(objUsuario.idPerfil).ToString();
                        txtNroDocumento.Text    = objUsuario.nroDocumento;

                        txtClave.Text            = objUsuario.password;
                        txtClaveGenesys.Text     = objUsuario.passwordGenesys;
                        txtClaveGenesys.ReadOnly = true;

                        lblCodigoUsuario.Value = objUsuario.codigoUsuario.ToString();

                        btnCambioClave.Checked = !objUsuario.cambioPassword;
                        btnCambioAmbos.Checked = objUsuario.cambiarAmbos;

                        lblIdUsuario.Value = objUsuario.idUsuario.ToString();

                        cboEstado.SelectedValue = Convert.ToInt32(objUsuario.activo).ToString();


                        lblMensaje.Text     = "Listo para modificar usuario";
                        lblMensaje.CssClass = "mensajeExito";
                    }
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    Session["idAlmacen"]   = null;
                    Session["idAlmacen"]   = cboAlmacen.SelectedValue;
                    cboTipoMaterial.Filter = (RadComboBoxFilter)Convert.ToInt32(1);
                    cboAlmacen.Filter      = (RadComboBoxFilter)Convert.ToInt32(1);
                    cboMarca.Filter        = (RadComboBoxFilter)Convert.ToInt32(1);

                    Almacen_Cargar();
                    TipoProducto_Cargar();
                    MarcaProducto_Cargar();

                    int verStock = (int)((Usuario_LoginResult)Session["Usuario"]).verStock;
                    Ocultar_Columnas(verStock);
                }
            }
            catch (Exception ex) {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #5
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    //txtMensaje.MaxLength = 159;


                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);
                    Lista_Perfiles();
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }
            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    Title = "Registrar producto";
                    Item_Buscar(Request.QueryString["idItem"], Request.QueryString["idProveedor"], decimal.Parse(Request.QueryString["idAlmacen"]),
                                Convert.ToBoolean(Int32.Parse(Request.QueryString["nuevo"])), Request.QueryString["idMoneda"]);
                }
                lblMensaje.Text     = "Datos del producto se cargo correctamente.";
                lblMensaje.CssClass = "mensajeExito";
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    dpBuscar.SelectedDate = DateTime.Now;
                    var idEmpresa     = ((Usuario_LoginResult)Session["Usuario"]).idEmpresa;
                    var codigoUsuario = ((Usuario_LoginResult)Session["Usuario"]).codigoUsuario;
                    var periodo       = dpBuscar.SelectedDate.Value.Month.ToString("D2") + "/" + dpBuscar.SelectedDate.Value.Year;
                    CierreContable_Cargar(idEmpresa, codigoUsuario, periodo);
                    CierreContableByPlan_Cargar(idEmpresa, codigoUsuario, "0");

                    lblMensaje.Text     = "Se cargó con exito.";
                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    if (Request.QueryString["idMenu"] == "0")
                    {
                        this.Title = "Registrar Item en Raíz";
                    }
                    else
                    {
                        this.Title = "Registrar Item";
                    }
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    //Fecha Desde, primer dia del mes anterior
                    dpFecDesde.SelectedDate = new DateTime(DateTime.Now.AddMonths(-1).Year, DateTime.Now.AddMonths(-1).Month, 1);
                    //Fecha Hasta, ultimo dia del mes anterior
                    dpFecHasta.SelectedDate = new DateTime(DateTime.Now.Year, DateTime.Now.Month, 1).AddDays(-1);

                    //dpFecDesde.SelectedDate = new DateTime(2017, 4, 1);
                    //dpFecHasta.SelectedDate = new DateTime(2017, 7, 18);

                    Reporte_Cargar();
                }
            }
            catch (Exception ex) {
                this.lblRegistros.Text = ex.Message + "- Load ";
                lblRegistros.CssClass  = "mensajeError";
                rwmReporte.RadAlert(ex.Message, 500, 100, "Error", "");
            }
        }
예제 #10
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    if (!string.IsNullOrEmpty(Request.QueryString["Kardex"]))
                    {
                        Title = "Gestión Stock";

                        int Kardex     = JsonHelper.JsonDeserialize <int>(Request.QueryString["Kardex"]);
                        int ID_Almacen = JsonHelper.JsonDeserialize <int>(Request.QueryString["ID_Almacen"]);

                        Item_GestionStock(0, ID_Almacen, Kardex, 0, "");
                    }
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    cboPeriodo.SelectedIndex = 0;
                    Periodos_ComboBox();
                    Productos_Cargar();
                    lblMensaje.Text     = "Se cargo la información con éxito";
                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex) {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    Title = "Plan de producción del periodo " + Request.QueryString["periodo"];

                    CierreCostoWCFClient objCierreCostoWCF = new CierreCostoWCFClient();
                    int      periodo     = int.Parse(Request.QueryString["periodo"]);
                    int      kardex      = int.Parse(Request.QueryString["kardex"]);
                    DateTime fechaInicio = new DateTime((periodo - periodo % 100) / 100, periodo % 100, 1);
                    DateTime fechaFinal  = fechaInicio.AddMonths(1).AddDays(-1);

                    grdMateriaPrima.DataSource = objCierreCostoWCF.Produccion_Listar_PlanProd(((Usuario_LoginResult)Session["Usuario"]).idEmpresa,
                                                                                              ((Usuario_LoginResult)Session["Usuario"]).codigoUsuario, fechaInicio, fechaFinal, kardex);
                    grdMateriaPrima.DataBind();

                    lblMensaje.Text     = "Los datos han sido cargados correctamente.";
                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex) {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    EstadoCliente_Cargar();
                    rmpPeriodo.SelectedDate = DateTime.Now;
                    ReporteVenta_Cliente(rmpPeriodo.SelectedDate.Value.Month, rmpPeriodo.SelectedDate.Value.Year);
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    cboMes.SelectedValue   = "0";
                    lblNroDocumento.Text   = "NRO.DOC.";
                    lblNombres.Text        = "NOMBRES DEL PERSONAL";
                    lblEmmprePersonal.Text = "EMPRESA";
                    Empresa_ComboBox();
                    Personal_Cargar();
                }
            }
            catch (Exception ex) {
                throw ex;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);


                    Title = "Modificar perfil";
                    string obj = Request.QueryString["objMantModulos"];
                    GS_GetAllModulosResult objModulo = JsonHelper.JsonDeserialize <GS_GetAllModulosResult>(Request.QueryString["objMantModulos"]);
                    ViewState["id_Modulo"]  = objModulo.id_Modulo;
                    txtModulo.Text          = objModulo.nombre;
                    cboEstado.SelectedValue = Convert.ToInt32(objModulo.id_Estado).ToString();
                    lblMensaje.Text         = "Listo para modificar estado";
                    lblMensaje.CssClass     = "mensajeExito";
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    List <gsReporte_IndicadoresCreditosResult> lst = new List <gsReporte_IndicadoresCreditosResult>();

                    grdIndicadores.DataSource        = lst;
                    dpFechaHastaCliente.SelectedDate = DateTime.Now;
                    //dpFechaDesdeCliente.SelectedDate = DateTime.Now;
                }
            }

            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #17
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    var idMarca = (Request.QueryString["idMarca"]);
                    var imagen  = (Request.QueryString["imagen"]);
                    Page.Title       = "Logo Marca";
                    imgLogo.ImageUrl = "Documentos/" + idMarca + "/" + imagen;

                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);
                }
            }
            catch (Exception ex)
            {
            }
        }
예제 #18
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    Empresa_Cargar();
                    //Marca_Cargar();
                    Tipo_Cargar();
                    Titular_Cargar();
                    Pais_Cargar();

                    dpFechaDesde.SelectedDate = DateTime.Now.Date;
                    dpFechaHasta.SelectedDate = DateTime.Now.AddYears(10).Date;

                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #19
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    dpFechaInicio.SelectedDate = DateTime.Now.AddMonths(-3);
                    dpFechaFinal.SelectedDate  = DateTime.Now;
                    //Producto_Cargar();
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    Session["lstproductos"] = null;
                    Moneda_Cargar();
                    dpFechaInicio.SelectedDate = DateTime.Now;
                    dpFechaFinal.SelectedDate  = DateTime.Now;
                    //if ((Request.QueryString["id"]) == "0")
                    //{
                    //    Title = "Registrar precio por cliente";
                    //    btnGuardar.Enabled = false;
                    //}
                    Title = "Registrar precio por cliente";
                    btnGuardar.Enabled = false;
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #21
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    int month = DateTime.Now.Month;

                    dpFecInicio.SelectedDate = DateTime.Now;
                    dpFecFinal.SelectedDate  = DateTime.Now.AddMonths(+11);


                    Zona_Cargar(0);
                    Carga_Vendedores(0, null);
                    Reporte_Cargar(0, null);
                }
            }
            catch (Exception ex)
            {
                rwmReporte.RadAlert(ex.Message, 500, 100, "Error al descargar el excel", "");
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    //Telerik.Web.UI.RadSkinManager.GetCurrent(this.Page).ApplySkin(gsReporteVentas_Familia, "BlackMetroTouch");
                    dpFecInicio.SelectedDate = DateTime.Now.AddMonths(-6);
                    dpFecFinal.SelectedDate  = DateTime.Now;

                    Vendedor_Listar();
                }
            }
            catch (Exception ex) {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    Empresa_Cargar();

                    cboEmpresa.SelectedValue = ((Usuario_LoginResult)Session["Usuario"]).idEmpresa.ToString();
                    Reporte_Cargar(0);
                }
            }

            catch (Exception ex) {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            if (!ConnectionHelpers.CheckForInternetConnection())
            {
                throw new ArgumentException("ERROR: Revisar su conexión a internet.");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    lblTitulo.Text = "Clases Marca";
                    Page.Title     = "Clases Marca";

                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    BuscarClases();
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    if (!string.IsNullOrEmpty(Request.QueryString["aprobacion"]))
                    {
                        List <string> objAprobacion = Request.QueryString["aprobacion"].Split(',').ToList();
                        lblMensaje.Text = "";
                        acbCliente.Text = objAprobacion[0].ToString() + '-' + objAprobacion[1];
                        Empresa_ComboBox();
                        Reporte_Cargar();
                    }
                }
            }

            catch (Exception ex)
            {
                lblMensaje.Text     = ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                Response.Redirect("~/Security/frmCerrar.aspx");
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    dpPeriodoInicio.DbSelectedDate = new DateTime(DateTime.Now.Year, 1, 1);
                    dpPeriodoFinal.DbSelectedDate  = DateTime.Now;

                    Zona_Cargar(0);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    lblOp.Value            = int.Parse((Request.QueryString["idOperacion"])).ToString();
                    Session["idOperacion"] = int.Parse((Request.QueryString["idOperacion"])).ToString();

                    Title = "Modificar una Guía de Venta";
                    //GuiaVentasFlujo_Cargar(int.Parse((Request.QueryString["idOperacion"])));

                    lblMensaje.Text = "Listo para modificar la Guia de Venta " + (Request.QueryString["idOrdenVenta"]);

                    lblMensaje.CssClass = "mensajeExito";
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    if (string.IsNullOrEmpty(Request.QueryString["objCierreContable"]))
                    {
                        LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                        objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                            ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                        Title = "Registrar Cierre Contable";

                        var lstCierreByPlan = CargarGridInsert();
                        grdCierreMng.DataSource = lstCierreByPlan;
                        grdCierreMng.DataBind();

                        HttpContext.Current.Session["lstCierreByPlan"] = lstCierreByPlan;
                        ViewState["idPlanificacion"] = string.Empty;

                        lblMensaje.Text     = "Listo para registrar Cierre Contable";
                        lblMensaje.CssClass = "mensajeExito";
                    }
                    else
                    {
                        Title = "Modificar perfil";
                        string obj = Request.QueryString["objPobjCierreContableerfil"];
                        GS_GetPlanDetalleToInsertResult objCierreContable = JsonHelper.JsonDeserialize <GS_GetPlanDetalleToInsertResult>(Request.QueryString["objCierreContable"]);
                        ViewState["idPlanificacion"] = objCierreContable.idPlanificacion;
                        CargarGridEdit();
                        dpPeriodo.SelectedDate = DateTime.Now;
                        lblMensaje.Text        = "Listo para modificar Cierre Contable";
                        lblMensaje.CssClass    = "mensajeExito";
                    }
                }
                else
                {
                    if (ViewState["txtInicio"] != null)
                    {
                        RadTextBox1.Text = ViewState["txtInicio"].ToString();
                    }
                    if (ViewState["txtFin"] != null)
                    {
                        RadTextBox2.Text = ViewState["txtFin"].ToString();
                    }
                }
            }
            catch (Exception ex)
            {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
예제 #29
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    Empresa_Cargar();
                    cboEmpresa.SelectedValue = ((Usuario_LoginResult)Session["Usuario"]).idEmpresa.ToString();

                    Zona_Cargar("0");


                    if (Request.QueryString["objZona"] == "")
                    {
                        Title = "Registrar Zona";
                        cboEmpresa.SelectedValue = ((Usuario_LoginResult)Session["Usuario"]).idEmpresa.ToString();

                        lblMensaje.Text     = "Listo para registrar Zona";
                        lblMensaje.CssClass = "mensajeExito";
                    }
                    else
                    {
                        decimal numero;
                        Title = "Modificar Zona";
                        string obj = Request.QueryString["objZona"];
                        ZonasPermisos_ListarResult objZona = JsonHelper.JsonDeserialize <ZonasPermisos_ListarResult>(Request.QueryString["objZona"]);
                        ViewState["ID"] = objZona.idPermiso;


                        cboEstado.SelectedValue  = Convert.ToInt32(objZona.activo).ToString();
                        cboEmpresa.SelectedValue = ((Usuario_LoginResult)Session["Usuario"]).idEmpresa.ToString();

                        cboZonas.SelectedValue = objZona.ID_Zona.ToString();
                        cboEmpresa.Enabled     = false;
                        cboZonas.Enabled       = false;


                        lblMensaje.Text     = "Listo para modificar Zona";
                        lblMensaje.CssClass = "mensajeExito";
                    }

                    Session["idempresa"] = cboEmpresa.SelectedValue;
                }
            }
            catch (Exception ex) {
                lblMensaje.Text     = "ERROR: " + ex.Message;
                lblMensaje.CssClass = "mensajeError";
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (Session["Usuario"] == null)
            {
                ScriptManager.RegisterStartupScript(Page, this.GetType(), "mykey", "CancelEdit();", true);
            }

            try
            {
                if (!Page.IsPostBack)
                {
                    LoginWCF.LoginWCFClient objLoginWCF = new LoginWCF.LoginWCFClient();
                    objLoginWCF.AuditoriaMenu_Registrar(System.Web.HttpContext.Current.Request.Url.AbsolutePath, Environment.MachineName,
                                                        ((Usuario_LoginResult)System.Web.HttpContext.Current.Session["Usuario"]).idUsuario);

                    if (!string.IsNullOrEmpty(Request.QueryString["objHistorial"]))
                    {
                        Title = "Historial";
                        string obj = Request.QueryString["objHistorial"];
                        gsReporte_DocumentosPendientesResult objCierreContable = JsonHelper.JsonDeserialize <gsReporte_DocumentosPendientesResult>(Request.QueryString["objHistorial"]);
                        ViewState["ID_Financiamiento"] = objCierreContable.ID_Financiamiento;
                        //CargarGridEdit();

                        //Label1.Text = objCierreContable.ID_Financiamiento.ToString();


                        var idEmpresa     = ((Usuario_LoginResult)Session["Usuario"]).idEmpresa;
                        var codigoUsuario = ((Usuario_LoginResult)Session["Usuario"]).codigoUsuario;
                        EstadoCuentaWCFClient objEstadoCuentaWCF = new EstadoCuentaWCFClient();
                        var lstSource = objEstadoCuentaWCF.GetCicloLetras(idEmpresa, codigoUsuario, (decimal)objCierreContable.ID_Financiamiento);
                        grdHistorial.DataSource = lstSource;
                        grdHistorial.DataBind();

                        var lstEstados = new List <string>
                        {
                            "Cancelado",
                            "Letra Aprobada",
                            "Letra Renovada",
                            "Letra Protestada"
                        };

                        var lstChart = (from item in lstEstados let sum = lstSource.Count(x => x.Estado == item) select new ChartClass {
                            AxisX = item, SerieDecimal = sum
                        }).ToList();

                        //RadHtmlChart1.DataSource = lstChart;
                        //RadHtmlChart1.DataBind();
                    }
                }
            }
            catch (Exception ex)
            {
                //lblMensaje.Text = "ERROR: " + ex.Message;
                //lblMensaje.CssClass = "mensajeError";
            }
        }