Beispiel #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();

                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }
                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                if (Session["user"] == null)
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }

                _operator = Session["user"].ToString();

                try
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                catch (Exception)
                {
                    _idioma = "INGLES";
                }


                string        strError = string.Empty;
                Ent_ttccol301 data     = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString().Trim(),
                    come    = "Drop Warehouse Transfer",
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            this.Form.DefaultButton = this.btnContinue.UniqueID;

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();


                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = this.GetType().BaseType.Name,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);

                this.txtMachine.Attributes.Add("onchange", "validarMaquina(this)");
                this.txtIdentifier.Attributes.Add("onchange", "validarIdentifier(this)");

                this.txtMachine.Attributes.Add("onkeypress", "_toUpper(this)");
                this.txtIdentifier.Attributes.Add("onkeypress", "_toUpper(this)");
            }
        }
Beispiel #3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            CicloPaginacion    = Convert.ToInt32(ConfigurationManager.AppSettings["CicloPaginacion"].ToString());
            CicloActualizacion = Convert.ToInt32(ConfigurationManager.AppSettings["CicloActualizacion"].ToString());


            Ent_ttccol301 data = new Ent_ttccol301()
            {
                user    = HttpContext.Current.Session["user"].ToString(),
                come    = this.GetType().BaseType.Name,
                refcntd = 0,
                refcntu = 0
            };

            List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();

            datalog.Add(data);

            new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Session["user"] == null)
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }
                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                _operator = Session["user"].ToString();
                try
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                catch (Exception)
                {
                    _idioma = "INGLES";
                }


                CargarIdioma();

                string strTitulo = mensajes("encabezadot");
                control.Text = strTitulo;

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);
            }
            lstWarehouses = ListWarehouses();
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            lblMensaje.ForeColor = System.Drawing.Color.Black;
            if (!IsPostBack)
            {
                InicializarControles();

                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = this.GetType().BaseType.Name,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            CicloPaginacion    = Convert.ToInt32(ConfigurationManager.AppSettings["CicloPaginacion"].ToString());
            CicloActualizacion = Convert.ToInt32(ConfigurationManager.AppSettings["CicloActualizacion"].ToString());
            if (Session["user"] == null)
            {
                if (Request.QueryString["Valor1"] == null || Request.QueryString["Valor1"] == "")
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }
                else
                {
                    _operator        = Request.QueryString["Valor1"];
                    Session["user"]  = _operator;
                    Session["logok"] = "OKYes";
                    //txtNumeroOrden.Enabled = false;
                }
            }
            else
            {
                _operator = Session["user"].ToString();
            }


            Ent_ttccol301 data = new Ent_ttccol301()
            {
                user    = HttpContext.Current.Session["user"].ToString(),
                come    = this.GetType().BaseType.Name,
                refcntd = 0,
                refcntu = 0
            };

            List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();

            datalog.Add(data);

            new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                if (Session["IsPreviousPage"] == null)
                {
                    Session.Clear();
                }

                string strTitulo = "Spare Delivery";
                Label  control   = (Label)Page.Controls[0].FindControl("lblPageTitle");
                control.Text            = strTitulo;
                Page.Form.DefaultButton = btnSend.UniqueID;
                divOptButtons.Visible   = false;


                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
            }
            this.txtWorkOrder.Attributes.Add("onkeypress", "button_click(this," + this.txtWorkOrder.ClientID + ")");
        }
Beispiel #8
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                lblError.Text = String.Empty;
                lblConfirm.Text = String.Empty;

                if (Session["user"] == null)
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }

                 _operator = Session["user"].ToString();

                try
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                catch (Exception)
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                //if (_idioma == "ESPAÑOL")
                //{
                //    IdiomaEspañol();
                //}
                //else
                //{
                //    IdiomaIngles();
                //}

                string strTitulo = mensajes("encabezado");
                control.Text = strTitulo;

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user = HttpContext.Current.Session["user"].ToString(),
                    come = mensajes("encabezado"),
                    refcntd = 0,
                    refcntu = 0
                };

                List<Ent_ttccol301> datalog = new List<Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);

                btnGuardarRecepcion.Visible = false;
            }
        }
Beispiel #9
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("en-US");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }
                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                lblError.Text   = "";
                lblConfirm.Text = "";

                if (Session["user"] == null)
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }

                _operator = Session["user"].ToString();

                try
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                catch (Exception)
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                string strTitulo = mensajes("encabezado");
                control.Text = strTitulo;

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = mensajes("encabezado"),
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);


                if (Request.QueryString["tipoFormulario"] != null)
                {
                    _tipoFormulario = Request.QueryString["tipoFormulario"].ToString().ToUpper().Trim();
                }
                else
                {
                    _tipoFormulario = "PALLET";
                }

                txtOrderNumber.Text = Session["SqnbAnuncioAutomatico"] == null ? String.Empty : Session["SqnbAnuncioAutomatico"].ToString();

                //if (!_procesoAutomatico)
                //{
                //    if (Session["SqnbAnuncioAutomatico"] == null)
                //    {
                //        lblError.Text = mensajes("No se pudo correr el proceso automatico, no se inicializo la variable de sesión sqnb");
                //        return;
                //    }

                //    txtOrderNumber.Text = Session["SqnbAnuncioAutomatico"].ToString();
                //    //btnConsultar_Click(btnConsultar, null);
                //}
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            txtWorkOrder.Focus();

            Page.Form.DefaultButton = btnSend.UniqueID;

            var ctrlName = Request.Params[Page.postEventSourceID];
            var args     = Request.Params[Page.postEventArgumentID];

            //HandleCustomPostbackEvent(ctrlName, args);
            //lblOrder.Visible = false;

            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("en-US");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                Session["save"] = null;
                formName        = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                if (Session["user"] == null)
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }

                _operator = Session["user"].ToString();

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                string strTitulo = mensajes("encabezado");
                Label  control   = (Label)Page.Controls[0].FindControl("lblPageTitle");
                control.Text = strTitulo;
                if (control != null)
                {
                    control.Text = strTitulo;
                }

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = _operator,
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);
            }

            csType      = this.GetType();
            scriptBlock = Page.ClientScript;

            StringBuilder script = new StringBuilder();

            // Crear el script para la ejecucion de la forma
            script.Append("<script type=\"text/javascript\">function button_click(objTextBox,objBtnID) {");
            script.Append("if(window.event.keyCode==13)");
            script.Append("{");
            script.Append("document.getElementById(objBtnID).focus();");
            script.Append("document.getElementById(objBtnID).click();");
            script.Append("}}");
            script.Append("</script>");

            scriptBlock.RegisterClientScriptBlock(csType, "button_click", script.ToString(), false);
            this.txtWorkOrder.Attributes.Add("onkeypress", "button_click(this," + this.btnSend.ClientID + ")");
        }
Beispiel #11
0
        protected void Page_Load(object sender, EventArgs e)
        {
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                lblError.Visible     = false;
                lblResult.Visible    = false;
                divWarehouse.Visible = false;
                divItem.Visible      = false;
                divCantidad.Visible  = false;
                txtLot.Enabled       = false;

                if (Session["IsPreviousPage"] == null)
                {
                    Session.Clear();
                }

                string strTitulo = mensajes("encabezado");
                Label  control   = (Label)Page.Controls[0].FindControl("lblPageTitle");
                control.Text = strTitulo;
                //Page.Form.DefaultButton = btnQuery.UniqueID;

                if (lblIngreso.Text == "")
                {
                    lblIngreso.Text = "1";
                }


                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            XmlDocument xmlD = new XmlDocument();

            xmlD.Load(AppDomain.CurrentDomain.SetupInformation.ConfigurationFile);
            bool verificacionCicloPaginacion    = false;
            bool verificacionCicloActualizacion = false;

            foreach (XmlElement element in xmlD.DocumentElement)
            {
                if (element.Name.Equals("appSettings"))
                {
                    foreach (XmlNode node in element.ChildNodes)
                    {
                        if (node.Attributes != null)
                        {
                            switch (node.Attributes[0].Value)
                            {
                            case "CicloPaginacion":
                                CicloPaginacion = node.Attributes[1].Value;
                                break;

                            case "CicloActualizacion":
                                CicloActualizacion = node.Attributes[1].Value;
                                break;

                            case "numberRetryOnSave":
                                numberRetryOnSave = node.Attributes[1].Value;
                                break;

                            case "bodyColor":
                                bodyColor = node.Attributes[1].Value;
                                break;

                            case "owner":
                                owner = node.Attributes[1].Value;
                                break;

                            case "env":
                                env = node.Attributes[1].Value;
                                break;

                            case "InitialVector":
                                InitialVector = node.Attributes[1].Value;
                                break;

                            case "KeyAlgorithm":
                                KeyAlgorithm = node.Attributes[1].Value;
                                break;

                            case "envCol":
                                envCol = node.Attributes[1].Value;
                                break;

                            case "envt":
                                envt = node.Attributes[1].Value;
                                break;

                            case "cia":
                                cia = node.Attributes[1].Value;
                                break;

                            case "DefaultZone":
                                DefaultZone = node.Attributes[1].Value;
                                break;

                            case "WarehouseReq":
                                WarehouseReq = node.Attributes[1].Value;
                                break;

                            case "BalanceMachines":
                                BalanceMachines = node.Attributes[1].Value;
                                break;

                            case "BalanceMachinesRetail":
                                BalanceMachinesRetail = node.Attributes[1].Value;
                                break;

                            case "Disposition":
                                Disposition = node.Attributes[1].Value;
                                break;

                            case "timeOutRollSave":
                                timeOutRollSave = node.Attributes[1].Value;
                                break;

                            case "initialConsecTagId":
                                initialConsecTagId = node.Attributes[1].Value;
                                break;

                            case "usershoplogix":
                                usershoplogix = node.Attributes[1].Value;
                                break;

                            case "passshoplogix":
                                passshoplogix = node.Attributes[1].Value;
                                break;

                            case "userImpersonation":
                                userImpersonation = node.Attributes[1].Value;
                                break;

                            case "passImpersonation":
                                passImpersonation = node.Attributes[1].Value;
                                break;

                            case "domaImpersonation":
                                domaImpersonation = node.Attributes[1].Value;
                                break;

                            case "anuncioAutomatico":
                                anuncioAutomatico = node.Attributes[1].Value;
                                break;

                            case "tiempoCambioContrasena":
                                tiempoCambioContrasena = node.Attributes[1].Value;
                                break;

                            case "sitioConRetorno":
                                sitioConRetorno = node.Attributes[1].Value;
                                break;

                            case "calcLabelPalletTag":
                                calcLabelPalletTag = node.Attributes[1].Value;
                                break;

                            case "calcAnuncioOrd":
                                calcAnuncioOrd = node.Attributes[1].Value;
                                break;

                            case "calcInvLabel":
                                calcInvLabel = node.Attributes[1].Value;
                                break;
                            }
                        }
                    }
                }
            }

            Ent_ttccol301 data = new Ent_ttccol301()
            {
                user    = HttpContext.Current.Session["user"].ToString(),
                come    = this.GetType().BaseType.Name,
                refcntd = 0,
                refcntu = 0
            };

            List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();

            datalog.Add(data);

            new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
        }
Beispiel #13
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                lblError.Text   = String.Empty;
                lblConfirm.Text = String.Empty;

                if (Session["user"] == null)
                {
                    if (Request.QueryString["Valor1"] == null || Request.QueryString["Valor1"] == "")
                    {
                        Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                    }
                    else
                    {
                        _operator        = Request.QueryString["Valor1"];
                        Session["user"]  = _operator;
                        Session["logok"] = "OKYes";
                    }
                }
                else
                {
                    _operator = Session["user"].ToString();
                }

                //Session["user"] = "******";
                //Session["username"] = "******";



                if (Session["ddlIdioma"] == null)
                {
                    Session["ddlIdioma"] = "INGLES";
                }

                _idioma = Session["ddlIdioma"].ToString();

                CargarIdioma();

                //if (_idioma == "ESPAÑOL")
                //{
                //    IdiomaEspañol();
                //}
                //else
                //{
                //    IdiomaIngles();
                //}

                string strTitulo = mensajes("encabezado");
                control.Text = strTitulo;

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = mensajes("encabezado"),
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);

                var username = Session["username"] == null ? Request.QueryString["Valor3"].ToString() : Session["username"].ToString();

                txtOperator.Text            = HttpContext.Current.Session["user"].ToString() + " - " + username;
                divUniqueIdentifier.Visible = false;
                lblHora.Text = DateTime.Now.ToString();
            }
        }
Beispiel #14
0
        protected void Page_Load(object sender, EventArgs e)
        {
            formName = Request.Url.AbsoluteUri.Split('/').Last();
            if (formName.Contains('?'))
            {
                formName = formName.Split('?')[0];
            }

            if (Session["ddlIdioma"] != null)
            {
                _idioma = Session["ddlIdioma"].ToString();
            }
            else
            {
                _idioma = "INGLES";
            }

            CargarIdioma();

            txtWorkOrder.Focus();
            Page.Form.DefaultButton = btnSend.UniqueID;

            var ctrlName = Request.Params[Page.postEventSourceID];
            var args     = Request.Params[Page.postEventArgumentID];

            lblOrder.Visible = false;
            String strTitulo = "Imprimir Etiquetas Genericos";

            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                if (control != null)
                {
                    control.Text = strTitulo;
                }


                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
            }

            csType      = this.GetType();
            scriptBlock = Page.ClientScript;

            StringBuilder script = new StringBuilder();

            // Crear el script para la ejecucion de la forma
            script.Append("<script type=\"text/javascript\">function button_click(objTextBox,objBtnID) {");
            script.Append("if(window.event.keyCode==13)");
            script.Append("{");
            script.Append("document.getElementById(objBtnID).focus();");
            script.Append("document.getElementById(objBtnID).click();");
            script.Append("}}");
            script.Append("</script>");

            scriptBlock.RegisterClientScriptBlock(csType, "button_click", script.ToString(), false);
            this.txtWorkOrder.Attributes.Add("onkeypress", "button_click(this," + this.btnSend.ClientID + ")");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                tipoFormulario = Request.QueryString["tipoFormulario"];
                tipoFormulario = tipoFormulario.ToUpper();
                string strTitulo = "";
                lblError.Text       = String.Empty;
                lblConfirm.Text     = String.Empty;
                dvDataTruck.Visible = false;

                if (Session["user"] == null)
                {
                    if (Request.QueryString["Valor1"] == null || Request.QueryString["Valor1"] == "")
                    {
                        Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                    }
                    else
                    {
                        _operator        = Request.QueryString["Valor1"];
                        Session["user"]  = _operator;
                        Session["logok"] = "OKYes";
                    }
                }
                else
                {
                    _operator = Session["user"].ToString();
                }
                //Session["user"] = "******";
                //Session["username"] = "******";

                //_operator = Session["user"].ToString();

                if (Session["ddlIdioma"] == null)
                {
                    Session["ddlIdioma"] = "INGLES";
                }

                _idioma = Session["ddlIdioma"].ToString();

                CargarIdioma();

                //if (_idioma == "ESPAÑOL")
                //{
                //    IdiomaEspañol();
                //}
                //else
                //{
                //    IdiomaIngles();
                //}


                if (tipoFormulario != null)
                {
                    switch (tipoFormulario)
                    {
                    case "PICKING":
                        btnEndPicking.Visible = true;
                        btnEndReceipt.Visible = false;
                        break;

                    case "RECEIVE":
                        btnEndPicking.Visible = false;
                        btnEndReceipt.Visible = true;
                        break;

                    default:
                        btnEndPicking.Visible = true;
                        btnEndReceipt.Visible = false;
                        tipoFormulario        = "PICKING";
                        break;
                    }
                }

                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                strTitulo    = tipoFormulario == "PICKING" ? mensajes("encabezadopicking") : mensajes("encabezadoreceive");
                control.Text = strTitulo;

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = mensajes("encabezado"),
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);
            }
        }
Beispiel #16
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }
                string strTitulo = "";
                lblError.Text   = String.Empty;
                lblConfirm.Text = String.Empty;

                tipoFormulario = Request.QueryString["tipoFormulario"];

                if (Session["user"] == null)
                {
                    if (Request.QueryString["Valor1"] == null || Request.QueryString["Valor1"] == "")
                    {
                        Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                    }
                    else
                    {
                        _operator        = Request.QueryString["Valor1"];
                        Session["user"]  = _operator;
                        Session["logok"] = "OKYes";
                    }
                }
                else
                {
                    _operator = Session["user"].ToString();
                }


                if (Session["ddlIdioma"] == null)
                {
                    Session["ddlIdioma"] = "INGLES";
                }

                _idioma = Session["ddlIdioma"].ToString();


                CargarIdioma();

                //if (_idioma == "ESPAÑOL")
                //{
                //    IdiomaEspañol();
                //}
                //else
                //{
                //    IdiomaIngles();
                //}

                if (tipoFormulario != null)
                {
                    tipoFormulario = tipoFormulario.ToUpper();

                    switch (tipoFormulario)
                    {
                    case "LOAD":
                        btnConfirmPalletLoad.Visible    = true;
                        btnConfirmPalletReceive.Visible = false;
                        trLocation.Visible = true;
                        txtUnit.Visible    = true;
                        tdUnit.Visible     = true;
                        tdItem.Style.Add("width", "80%");
                        break;

                    case "RECEIVE":
                        btnConfirmPalletLoad.Visible    = false;
                        btnConfirmPalletReceive.Visible = true;
                        trLocation.Visible = false;
                        txtUnit.Visible    = false;
                        tdUnit.Visible     = false;
                        tdItem.Style.Add("width", "100%");
                        break;

                    default:
                        btnConfirmPalletLoad.Visible    = true;
                        btnConfirmPalletReceive.Visible = false;
                        tipoFormulario     = "LOAD";
                        trLocation.Visible = true;
                        txtUnit.Visible    = true;
                        tdUnit.Visible     = true;
                        tdItem.Style.Add("width", "80%");
                        break;
                    }
                }
                else
                {
                    btnConfirmPalletLoad.Visible    = true;
                    btnConfirmPalletReceive.Visible = false;
                    tipoFormulario     = "LOAD";
                    trLocation.Visible = true;
                    txtUnit.Visible    = true;
                    tdUnit.Visible     = true;
                    tdItem.Style.Add("width", "80%");
                }

                cargarUID(tipoFormulario);

                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                strTitulo               = tipoFormulario == "LOAD" ? mensajes("encabezadoLoad") : mensajes("encabezadoReceive");
                control.Text            = strTitulo;
                trDataAditional.Visible = false;


                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = _operator,
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            txtWorkOrder.Focus();
            this.SetFocus(Page.Form.UniqueID);



            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                string strTitulo = mensajes("encabezado");

                // Si la llamada no proviene de otro formulario
                if (Session["IsPreviousPage"] == null)
                {
                    Session.Clear();
                }

                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                if (control != null)
                {
                    control.Text = strTitulo;
                }
                Page.Form.DefaultButton = btnSend.UniqueID;

                if (Session["resultado"] != null)
                {
                    resultado             = (DataTable)Session["resultado"];
                    grdRecords.DataSource = resultado;
                    grdRecords.DataBind();
                    if (PreviousPage != null)
                    {
                        if (PreviousPage.IsValid)
                        {
                            txtWorkOrder.Text = ((TextBox)Page.PreviousPage.FindControl(txtWorkOrder.UniqueID)).Text;
                        }
                    }
                    else if (Session["WorkOrder"] != null)
                    {
                        txtWorkOrder.Text = Session["WorkOrder"].ToString();
                    }
                    txtWorkOrder.ReadOnly = true;
                    lblOrder.Text         = _idioma == "INGLES" ? "Order:" : "Orden:" + txtWorkOrder.Text;
                    btnSend.Visible       = false;
                }

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("en-US");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                // Determinar existencia de las maquinas en web.config

                lblError.Visible = false;
                //if (ConfigurationManager.AppSettings.AllKeys.Contains("BalanceMachinesRetail"))
                //{
                //    string machines = ConfigurationManager.AppSettings["BalanceMachinesRetail"];

                //    var machineArray = machines.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries).ToList<string>();
                //    machineArray.Insert(0, "-- Select --");

                //    listMachine.DataSource = machineArray;
                //    listMachine.DataBind();
                //}
                //else { lblError.Visible = true; lblError.Text = "Machine List not found"; }

                if (Session["IsPreviousPage"] == null)
                {
                    Session.Clear();
                }

                string strTitulo = mensajes("encabezado");
                Label  control   = (Label)Page.Controls[0].FindControl("lblPageTitle");
                control.Text            = strTitulo;
                txtMachine.TextChanged += new EventHandler(txtMachine_listMachine);
                Page.Form.DefaultButton = btnChangeMac.UniqueID;

                if (lblIngreso.Text == "")
                {
                    lblIngreso.Text = "1";
                }

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Type csType = this.GetType();
            ClientScriptManager scriptBlock = Page.ClientScript;

            txtLabelId.Focus();
            this.SetFocus(Page.Form.UniqueID);

            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();


            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                //txtLabelId.Attributes.Add("onblur", "if(this.value != ''){ validaInfo(this.value, '1', 'Contenido_" + lblCwar.ID + "', this);}");

                try { DefaultZone = ConfigurationManager.AppSettings["DefaultZone"].ToString(); }
                catch { }

                if (String.IsNullOrEmpty(DefaultZone) && Session["DefaultZone"] == null)
                {
                }

                string strTitulo = mensajes("encabezado");

                if (Session["IsPreviousPage"] == null)
                {
                    Session.Clear();
                }

                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                control.Text            = strTitulo;
                Page.Form.DefaultButton = btnSearch.UniqueID;
                btnSearch.Enabled       = false;


                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
            }
            btnSend.Enabled = false;
            StringBuilder script = new StringBuilder();

            // Crear el script para la ejecucion de la forma
            script.Append("<script type=\"text/javascript\">function button_click(objTextBox,objBtnID) {");
            script.Append("if(window.event.keyCode==13)");
            script.Append("{");
            script.Append("document.getElementById(objBtnID).focus();");
            script.Append("document.getElementById(objBtnID).click();");
            script.Append("}}");
            script.Append("</script>");

            scriptBlock.RegisterClientScriptBlock(csType, "button_click", script.ToString(), false);
            txtLabelId.Attributes.Add("onkeypress", "button_click(this," + this.btnSearch.ClientID + ")");
            txtQuantity.Attributes.Add("onkeypress", "button_click(this," + this.btnSend.ClientID + ")");
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            RequestUrlAuthority = (string)Request.Url.Authority;
            //Remoto
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("en-US");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            //Local
            //Thread.CurrentThread.CurrentCulture = CultureInfo.CreateSpecificCulture("es-CO");
            //Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                HttpContext.Current.Session["TABLA"] = "";
                HttpContext.Current.Session["PAID"]  = "";
                HttpContext.Current.Session["ORNO"]  = "";
                HttpContext.Current.Session["CLOT"]  = "";
                HttpContext.Current.Session["CWAR"]  = "";
                HttpContext.Current.Session["LOCA"]  = "";
                HttpContext.Current.Session["QTYA"]  = "";

                formName = Request.Url.AbsoluteUri.Split('/').Last();

                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }
                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                if (Session["user"] == null)
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }

                _operator = Session["user"].ToString();

                try
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                catch (Exception)
                {
                    _idioma = "INGLES";
                }

                string strError = string.Empty;
                resultado = ITticol137.List_StatusPallet_OriginTable(ref strError);
                if (resultado.Rows.Count > 0)
                {
                    LstStatusTab = new List <StatusTab>();
                    foreach (DataRow reg in resultado.Rows)
                    {
                        StatusTab objStaTab = new StatusTab();
                        objStaTab.Table = reg["TAB"].ToString();
                        objStaTab.Code  = reg["CODE"].ToString();
                        objStaTab.Desc  = reg["DESCR"].ToString();
                        LstStatusTab.Add(objStaTab);
                    }
                }
                string strTitulo = mensajes("encabezado");
                control.Text = strTitulo;
                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            txtCwar.Focus();
            this.SetFocus(Page.Form.UniqueID);

            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            try { DefaultZone = ConfigurationManager.AppSettings["DefaultZone"].ToString(); }
            catch { DefaultZone = string.Empty; }
            try { ReqWareHouse = Convert.ToInt32(ConfigurationManager.AppSettings["WarehouseReq"].ToString()); }
            catch
            {
                ReqWareHouse        = 0;
                lblCwar.Visible     = true;
                txtCwar.Visible     = true;
                txtCwar.Enabled     = true;
                trWareHouse.Visible = true;
            }


            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                lblCwar.Visible = true;
                txtCwar.Visible = true;

                if (!String.IsNullOrEmpty(DefaultZone))
                {
                    txtZone.Text    = DefaultZone;
                    txtZone.Enabled = false;
                    ClientScript.RegisterStartupScript(this.GetType(), "validaInfo",
                                                       "if(this.value != ''){ validaInfo(" + DefaultZone + ", '2', 'Contenido_" + LblZone.ID + "', this);}",
                                                       true);
                }
                else
                {
                    txtZone.Text = string.Empty; txtZone.Enabled = true;
                }

                if (ReqWareHouse == 1)
                {
                    trWareHouse.Visible = true; lblCwar.Visible = true; txtCwar.Visible = true;
                }
                if (ReqWareHouse == 2)
                {
                    trWareHouse.Visible = false; lblCwar.Visible = false; txtCwar.Visible = false;
                }

                txtCwar.Attributes.Add("onblur", "if(this.value != ''){ validaInfo(this.value, '1', 'Contenido_" + lblCwar.ID + "', this);}");
                txtZone.Attributes.Add("onblur", "if(this.value != ''){ validaInfo(this.value, '2', 'Contenido_" + LblZone.ID + "', this);}");
                txtItem.Attributes.Add("onblur", "if(this.value != ''){ validaInfo(this.value, '3', 'Contenido_" + lblItem.ID + "', this);}");
                txtLote.Attributes.Add("onblur", "if(this.value != ''){ validaInfo(this.value, '4', 'Contenido_" + lblLotCode.ID + "', this);}");

                if (Session["IsPreviousPage"] == null)
                {
                    Session.Clear();
                }

                string strTitulo = mensajes("encabezado");
                Label  control   = (Label)Page.Controls[0].FindControl("lblPageTitle");
                control.Text            = strTitulo;
                Page.Form.DefaultButton = btnSend.UniqueID;

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
            }
        }
Beispiel #22
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("en-US");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            base.InitializeCulture();
            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }
                _operator = Session["user"].ToString();
                formName += "?Regrind";

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                if (Request.QueryString["tipoFormulario"] != null)
                {
                    _tipoFormulario = Request.QueryString["tipoFormulario"].ToString().ToUpper();
                }

                CargarIdioma();

                // Determinar existencia de las maquinas en web.config
                string[] opciones = new string[5];
                opciones[0] = (_idioma == "INGLES" ? "-- Select --" : "-- Seleccione --");
                opciones[1] = "1";
                opciones[2] = "2";
                opciones[3] = "3";
                opciones[4] = "4";

                ddRollWinder.DataSource = opciones;
                ddRollWinder.DataBind();
                lblError.Visible = false;
                if (_tipoFormulario.ToUpper() == "ROLLTAGS")
                {
                    if (ConfigurationManager.AppSettings.AllKeys.Contains("BalanceMachines"))
                    {
                        string machines = ConfigurationManager.AppSettings["BalanceMachines"];

                        var machineArray = machines.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries).ToList <string>();
                        machineArray.Insert(0, _idioma == "INGLES" ? "-- Select --" : "-- Seleccione --");

                        listMachine.DataSource = machineArray;
                        listMachine.DataBind();
                    }
                    else
                    {
                        lblError.Visible = true; lblError.Text = mensajes("machinelist");
                    }
                }
                else
                {
                    ddRollWinder.Visible  = false;
                    lblRollWinder.Visible = false;
                    if (ConfigurationManager.AppSettings.AllKeys.Contains("BalanceMachinesRetail"))
                    {
                        string machines = ConfigurationManager.AppSettings["BalanceMachinesRetail"];

                        var machineArray = machines.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries).ToList <string>();
                        machineArray.Insert(0, _idioma == "INGLES" ? "-- Select --" : "-- Seleccione --");

                        listMachine.DataSource = machineArray;
                        listMachine.DataBind();
                    }
                    else
                    {
                        lblError.Visible = true; lblError.Text = mensajes("machinelist");
                    }
                }

                if (Session["IsPreviousPage"] == null)
                {
                    Session.Clear();
                }
                //JC 04292022 Poner el título de acuerdo al formulario
                string strTitulo = "";
                if (_tipoFormulario.ToUpper() == "ROLLTAGS")
                {
                    strTitulo = mensajes("encabezado");
                }
                else
                {
                    strTitulo = mensajes("encabezadoregrind");
                }
                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                control.Text            = strTitulo;
                Page.Form.DefaultButton = btnSend.UniqueID;

                if (_procesoAutomatico && _tipoFormulario.ToUpper() == "ROLLTAGS")
                {
                    lblInfo.Text = "The process of automatic announcement is active.";
                }
                if (_procesConfirmacionAutomatica && _tipoFormulario.ToUpper() == "ROLLTAGS")
                {
                    lblInfo.Text = lblInfo.Text + "The process of confirm announcement is active.";
                }
                if (_procesoAutomatico && _tipoFormulario.ToUpper() == "GRINDER")
                {
                    lblInfo.Text = "The process of automatic announcement grinder is active.";
                }
                if (_procesConfirmacionAutomaticagrinder && _tipoFormulario.ToUpper() == "GRINDER")
                {
                    lblInfo.Text = lblInfo.Text + "The process of confirm announcement grinder is active.";
                }

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = _operator,
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);
            }
        }
Beispiel #23
0
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }
                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                lblError.Text   = "";
                lblConfirm.Text = "";

                if (Session["user"] == null)
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }

                _operator = Session["user"].ToString();

                try
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                catch (Exception)
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                if (Request.QueryString["tipoFormulario"] != null)
                {
                    _tipoFormulario = Request.QueryString["tipoFormulario"].ToString().ToUpper();
                }
                else
                {
                    _tipoFormulario = "FINISH";
                }

                string strTitulo = mensajes(_tipoFormulario == "FINISH" ? "encabezadofinish" : "encabezadoraw");
                control.Text = strTitulo;

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            // Cambiar cultura para manejo de separador decimal
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("en-US");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("en-US");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }
                Label control = (Label)Page.Controls[0].FindControl("lblPageTitle");
                lblError.Text   = "";
                lblConfirm.Text = "";

                if (Session["user"] == null)
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }

                _operator = Session["user"].ToString();

                try
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                catch (Exception)
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();

                if (Request.QueryString["tipoFormulario"] != null)
                {
                    _tipoFormulario = Request.QueryString["tipoFormulario"].ToString().ToUpper();
                }
                else
                {
                    _tipoFormulario = "PRINT";
                }

                if (_tipoFormulario == "REPRINT")
                {
                    trSecuence.Visible = true;
                }
                else
                {
                    trSecuence.Visible = false;
                }

                string strTitulo = _tipoFormulario == "PRINT" ? mensajes("encabezado") : mensajes("encabezadoreprint");
                control.Text = strTitulo;

                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = _operator,
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);

                if (_procesoAutomatico && _tipoFormulario != "REPRINT")
                {
                    lblInfo.Text = mensajes("automaticannounced");
                }
            }
            lblMsgMcnoActive.Visible = false;
            lblMsgMcnoActive.Text    = string.Empty;
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            Thread.CurrentThread.CurrentCulture   = CultureInfo.CreateSpecificCulture("es-CO");
            Thread.CurrentThread.CurrentUICulture = new CultureInfo("es-CO");
            base.InitializeCulture();

            if (!IsPostBack)
            {
                //Obtiene tipo de formulario
                var tipoFormulario = Request.QueryString["tipoFormulario"];

                if (tipoFormulario != null)
                {
                    tipoFormulario = tipoFormulario.ToUpper();

                    //Maneja visibilidad dependiendo del formulario
                    switch (tipoFormulario)
                    {
                    case "CREATE":
                        trPendiente.Visible    = true;
                        trAnunciado.Visible    = true;
                        trPorConfirmar.Visible = false;
                        trConfirmado.Visible   = false;
                        break;

                    case "CONFIRM":
                        trPendiente.Visible    = false;
                        trAnunciado.Visible    = false;
                        trPorConfirmar.Visible = true;
                        trConfirmado.Visible   = true;
                        break;

                    default:
                        trPendiente.Visible    = true;
                        trAnunciado.Visible    = true;
                        trPorConfirmar.Visible = false;
                        trConfirmado.Visible   = false;
                        break;
                    }
                }

                //valida inicio de sesion
                if (Session["user"] == null)
                {
                    Response.Redirect(ConfigurationManager.AppSettings["UrlBase"] + "/WebPages/Login/whLogIni.aspx");
                }

                _operator = Session["user"].ToString();

                //Valida idioma
                if (Session["ddlIdioma"] == null)
                {
                    Session["ddlIdioma"] = "INGLES";
                }

                _idioma = Session["ddlIdioma"].ToString();

                //Carga idiioma
                if (_idioma == "ESPAÑOL")
                {
                    IdiomaEspañol();
                }
                else
                {
                    IdiomaIngles();
                }

                string strTitulo = tipoFormulario == "CREATE" ? mensajes("encreate") : mensajes("confcreate");
                Label  control   = (Label)Page.Controls[0].FindControl("lblPageTitle");
                control.Text  = strTitulo;
                lblError.Text = String.Empty;

                trDataAditional.Visible = false;

                //Guarda log de ingreso
                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                _idalttccol301.insertarRegistro(ref datalog, ref strError);
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            corregible = false;
            //Obtencion de listas Asociadas a Lotes e items
            //ListaLotes = TraerListaLotes();
            ListaItems = TraerListaItems();
            //
            txtItem.Focus();
            Page.Form.DefaultButton = btnSend.UniqueID;

            var ctrlName = Request.Params[Page.postEventSourceID];
            var args     = Request.Params[Page.postEventArgumentID];

            //HandleCustomPostbackEvent(ctrlName, args);

            if (!IsPostBack)
            {
                formName = Request.Url.AbsoluteUri.Split('/').Last();
                if (formName.Contains('?'))
                {
                    formName = formName.Split('?')[0];
                }

                if (Session["ddlIdioma"] != null)
                {
                    _idioma = Session["ddlIdioma"].ToString();
                }
                else
                {
                    _idioma = "INGLES";
                }

                CargarIdioma();
                String strTitulo = mensajes("encabezado");
                Label  control   = (Label)Page.Controls[0].FindControl("lblPageTitle");
                if (control != null)
                {
                    control.Text = strTitulo;
                }


                Ent_ttccol301 data = new Ent_ttccol301()
                {
                    user    = HttpContext.Current.Session["user"].ToString(),
                    come    = strTitulo,
                    refcntd = 0,
                    refcntu = 0
                };

                List <Ent_ttccol301> datalog = new List <Ent_ttccol301>();
                datalog.Add(data);

                new InterfazDAL_ttccol301().insertarRegistro(ref datalog, ref strError);
            }

            Type csType = this.GetType();
            ClientScriptManager scriptBlock = Page.ClientScript;

            StringBuilder script = new StringBuilder();

            // Crear el script para la ejecucion de la forma
            script.Append("<script type=\"text/javascript\">function button_click(objTextBox,objBtnID) {");
            script.Append("if(window.event.keyCode==13)");
            script.Append("{");
            script.Append("document.getElementById(objBtnID).focus();");
            script.Append("document.getElementById(objBtnID).click();");
            script.Append("}}");
            script.Append("</script>");

            scriptBlock.RegisterClientScriptBlock(csType, "button_click", script.ToString(), false);
            //this.txtItem.Attributes.Add("onkeypress", "button_click(this," + this.btnSend.ClientID + ")");
            //this.txtLot.Attributes.Add("onkeypress", "button_click(this," + this.btnSend.ClientID + ")");
        }