示例#1
0
        private void loadFirstTime()
        {
            try
            {
                int IdEntradaPrint = 0;
                if (Request.QueryString["_kp"] != null)
                {
                    int.TryParse(Request.QueryString["_kp"].ToString(), out IdEntradaPrint);
                    printEntrada(IdEntradaPrint);
                }

                hf_clienteDocumento.Value = CatalogCtrl.Cliente_DocumentoLstToJson();
                hf_documentos.Value       = CatalogCtrl.DocumentoLstToJson();

                ControlsMng.fillBodega(ddlBodega);
                ControlsMng.fillTipoCarga(ddlTipoCarga);
                fillUser();
                ddlBodega_changed(null, null);

                Entrada oECache = ((Entrada)Cache.Get(((MstCasc)this.Master).getUsrLoged().Clave));
                if (oECache != null)
                {
                    fillEntradaCache(oECache);
                }
                //txt_hora_llegada.Text = ((Entrada)Cache.Get("nieto")).Hora;
                //Cache.Remove("nieto");
                //fillDataTest();
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#2
0
        private void loadFirstTime()
        {
            try
            {
                int Id_salida_orden_carga = 0;
                if (Request.QueryString["_kp"] != null)
                {
                    int.TryParse(Request.QueryString["_kp"].ToString(), out Id_salida_orden_carga);
                    printSalida(Id_salida_orden_carga);
                }

                if (Request.QueryString["_octc"] != null)
                {
                    int.TryParse(Request.QueryString["_octc"].ToString(), out Id_salida_orden_carga);
                    printTransCond(Id_salida_orden_carga);
                }

                ControlsMng.fillBodega(ddlBodega);
                fillControls();
                txt_fecha.Text = DateTime.Today.ToString("dd MMM yy");
            }
            catch
            {
                throw;
            }
        }
示例#3
0
        /// <summary>
        /// Click en entrada parcial
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        protected void btnEntPar_click(object sender, CommandEventArgs args)
        {
            hfTipoEntrada.Value = "parcial";
            Button      btn         = (Button)sender;
            HiddenField hfNoEntrada = btn.Parent.FindControl("hfNoEntrada") as HiddenField;
            int         IdEntrada   = 0;

            int.TryParse(args.CommandArgument.ToString(), out IdEntrada);
            try
            {
                ControlsMng.fillBodega(ddlBodega);
                fillUser();
                ddlBodega_changed(null, null);
                fillEntradaParcial(getEntradaParcial(IdEntrada), btn.Text, hfNoEntrada.Value);
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
            finally
            {
                txt_pedimento_consolidado.Text = string.Empty;
                setEnabledControls(false, new WebControl[] {
                    txt_referencia,
                    txt_mercancia,
                    ddlBodega,
                    ddlCliente,
                    chk_tipo_entrada,
                    cvReferencia
                });
            }
        }
示例#4
0
        private void fillReingreso(int idSalida)
        {
            try
            {
                Salida o = SalidaCtrl.SalidaGetAllDataById(idSalida);
                o.Folio = o.Folio + o.Folio_indice;

                #region ubicacion y cliente

                ControlsMng.fillBodega(ddlBodega);
                ddlBodega.SelectedValue = ((MstCasc)this.Master).getUsrLoged().Id_bodega.ToString();
                ControlsMng.fillCortinaByBodega(ddlCortina, Convert.ToInt32(ddlBodega.SelectedValue));

                ControlsMng.fillCliente(ddlCliente);
                ddlCliente.SelectedValue = o.Id_cliente.ToString();

                #endregion

                #region documentos

                pnl_documentos.Visible = true;
                clienteRequiereDocumentos(o.Id_cliente);

                List <Cliente_documento> lstCteDoc = CatalogCtrl.Cliente_DocumentoFillLstByCliente(o.Id_cliente);
                ddlDocumento.SelectedValue = lstCteDoc.First().Id_documento.ToString();
                txt_referencia.Text        = o.Referencia;
                VSLstSD = new List <Salida_documento>();
                lst_documento_recibido.Items.Clear();
                foreach (Salida_documento itemSD in o.PLstSalDoc)
                {
                    VSLstSD.Add(itemSD);
                    ListItem lstItemDoc = ddlDocumento.Items.FindByValue(itemSD.Id_documento.ToString());
                    lst_documento_recibido.Items.Add(new ListItem(lstItemDoc.Text + " -> " + itemSD.Referencia, itemSD.Id_documento.ToString()));
                }
                txt_referencia.Text = o.Referencia;
                #endregion

                #region Mercancia

                pnl_mercancia.Visible = true;
                txt_origen.Text       = o.Destino;
                txt_mercancia.Text    = o.Mercancia;

                #endregion

                setEnabledControls(false, new WebControl[] {
                    ddlCliente
                    , txt_origen
                    , txt_mercancia
                });
            }
            catch
            {
                throw;
            }
        }
 private void fillControls()
 {
     try
     {
         ControlsMng.fillBodega(ddl_sede);
     }
     catch
     {
         throw;
     }
 }
 private void fillBodega()
 {
     try
     {
         ControlsMng.fillBodega(ddl_bodega);
         ddl_bodega.Items.Add(new ListItem("--TODAS--", "0"));
     }
     catch
     {
         throw;
     }
 }
示例#7
0
        /// <summary>
        /// Click en entrada compartida
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="args"></param>
        protected void referenciaCompartido_click(object sender, CommandEventArgs args)
        {
            hfTipoEntrada.Value = "compartida";
            Button btn = (Button)sender;

            try
            {
                ControlsMng.fillBodega(ddlBodega);
                fillUser();
                ddlBodega_changed(null, null);
                fillEntradaCompartida(getEntradaCompartida(args.CommandArgument.ToString()), btn.Text);
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }

            txt_pedimento_consolidado.Text = string.Empty;
            setEnabledControls(false, new WebControl[] {
                ddlBodega,
                txt_fecha,
                txt_hora_llegada,
                ddlCortina,
                ddlCliente,
                txt_referencia,
                //ddlDocumento,
                //txt_referencia_documento,
                //lst_documento_recibido,
                //btnAdd_documento,
                txt_pedimento_consolidado,
                lst_pedimentos_consolidados,
                btnAdd_pedimento,
                txt_origen,
                btnAddTransporte,
                lstTransportes,
                rfvlstTransportes,
                //txt_lineaTransporte,
                //ddlTransporte,
                //ddlTipo_Transporte,
                //txt_placa,
                //txt_caja_1,
                //txt_caja_2,
                txt_sello,
                txt_talon,
                ddlCustodia,
                txt_operador,
                cvReferencia
                //ddlVigilante
            });
        }
示例#8
0
 private void loadFirstTime()
 {
     try
     {
         ControlsMng.fillBodega(ddlBodega);
         ControlsMng.fillCortinaByBodega(ddlCortina, Convert.ToInt32(ddlBodega.SelectedValue));
         ddlBodega.SelectedValue = ((MstCasc)this.Master).getUsrLoged().Id_bodega.ToString();
         txt_fecha.Text          = DateTime.Today.ToString("dd MMM yy");
         ControlsMng.fillCliente(ddlCliente);
     }
     catch
     {
         throw;
     }
 }
示例#9
0
 private void fillBodega()
 {
     ControlsMng.fillBodega(ddlBodega);
     ddlBodega.Items.Insert(0, new ListItem("TODAS", "0"));
 }