コード例 #1
0
        private void fillData()
        {
            try
            {
                hf_clientes.Value = JsonConvert.SerializeObject(CatalogCtrl.Cliente_GetAll(), Formatting.Indented);

                //int idBodega = ((MstCasc)this.Master).getUsrLoged().Id_bodega;
                ControlsMng.fillBodegaByUser(ddlBodega, ((MstCasc)this.Master).getUsrLoged().Id);
                ddlBodega.Items[0].Selected = true;

                ControlsMng.fillCortinaByBodega(ddlCortina, Convert.ToInt32(ddlBodega.SelectedItem.Value));
                txt_fecha.Text = DateTime.Today.ToString("dd MMMM yy");
                //txt_bodega.Text = CatalogCtrl.BodegaGet(idBodega).Nombre;
                ControlsMng.fillTipoCarga(ddlTipoCarga);
                ddlTipoCarga.SelectedValue = "2";// En arribos por lo general llegan a granel
                hf_Documentos.Value        = CatalogCtrl.DocumentoLstToJson();
                //ControlsMng.fillDocumento(ddlDocumento);
                //ddlDocumento.Items.Remove(ddlDocumento.Items.FindByValue("1"));
                hf_id_usuario.Value = ((MstCasc)this.Master).getUsrLoged().Id.ToString();
                ControlsMng.fillCustodia(ddlCustodia);
                ControlsMng.fillVigilanciaByBodega(ddlVigilante, Convert.ToInt32(ddlBodega.SelectedValue));

                #region partidas
                VSLstEntPart            = new List <Entrada_partida>();
                grd_partidas.DataSource = VSLstEntPart;
                grd_partidas.DataBind();
                #endregion
            }
            catch
            {
                throw;
            }
        }
コード例 #2
0
        private void fillEntrada()
        {
            try
            {
                Entrada oE = EntradaCtrl.EntradaGetAllDataById(Convert.ToInt32(hfId.Value));
                txtFolio.Text      = oE.Folio + oE.Folio_indice;
                txtReferencia.Text = oE.Referencia;
                txtUsuario.Text    = oE.PUsuario.Nombre;

                txt_hora_llegada.Text = oE.Hora;
                ControlsMng.fillCortinaByBodega(ddlCortina, oE.Id_bodega);
                ddlCortina.SelectedValue = oE.Id_cortina.ToString();

                txt_origen.Text    = oE.Origen;
                txt_mercancia.Text = oE.Mercancia;

                txt_sello.Text = oE.Sello;
                txt_talon.Text = oE.Talon;
                ControlsMng.fillCustodia(ddlCustodia);
                ddlCustodia.SelectedValue = oE.Id_custodia.ToString();
                txt_operador.Text         = oE.Operador;

                txt_no_pallet.Text          = oE.No_pallet.ToString();
                txt_no_bulto_declarado.Text = oE.No_bulto_declarado.ToString();
                txt_no_bulto_recibido.Text  = oE.No_bulto_recibido.ToString();
                txt_no_pieza_declarada.Text = oE.No_pieza_recibida.ToString();
                txt_no_bulto_danado.Text    = oE.No_bulto_danado.ToString();
                txt_no_bulto_abierto.Text   = oE.No_bulto_abierto.ToString();

                txt_hora_descarga.Text = oE.Hora_descarga;
                txt_vigilante.Text     = oE.Vigilante;
                txt_observaciones.Text = oE.Observaciones;

                pnlEntrada.Visible = true;

                txtTipo.Text = "Entrada Única";

                if (oE.PEntPar.Id > 0)
                {
                    txtTipo.Text = "Entrada Parcial No: " + oE.PEntPar.No_entrada.ToString();
                }
            }
            catch
            {
                Response.Redirect("frmRelEntSal.aspx");
            }
        }
コード例 #3
0
        private void fillSalida()
        {
            try
            {
                pnlSalida.Visible = true;

                Salida oS = SalidaCtrl.SalidaGetAllDataById(Convert.ToInt32(hfId.Value));
                txtFolio.Text      = oS.Folio + oS.Folio_indice;
                txtReferencia.Text = oS.Referencia;
                txtUsuario.Text    = oS.PUsuario.Nombre;

                txt_hora_salida.Text = oS.Hora_salida;
                ControlsMng.fillCortinaByBodega(ddlCortinaSalida, oS.Id_bodega);
                ddlCortinaSalida.SelectedValue = oS.Id_cortina.ToString();

                txt_destino.Text         = oS.Destino;
                txt_mercanciaSalida.Text = oS.Mercancia;

                txt_selloSalida.Text = oS.Sello;
                txt_talonSalida.Text = oS.Talon;

                ControlsMng.fillCustodia(ddlCustodiaSalida);
                ddlCustodiaSalida.SelectedValue = oS.Id_custodia.ToString();
                txt_operadorSalida.Text         = oS.Operador;

                txt_no_palletSalida.Text = oS.No_pallet.ToString();
                txt_no_bulto.Text        = oS.No_bulto.ToString();
                txt_no_pieza.Text        = oS.No_pieza.ToString();
                txt_peso_unitario.Text   = oS.Peso_unitario.ToString();
                txt_total_carga.Text     = oS.Total_carga.ToString();

                txt_hora_carga.Text          = oS.Hora_carga;
                txt_vigilanteSalida.Text     = oS.Vigilante;
                txt_observacionesSalida.Text = oS.Observaciones;

                txtTipo.Text = "Salida Única";

                if (oS.PSalPar.Id > 0)
                {
                    txtTipo.Text = "Entrada Parcial No: " + oS.PSalPar.No_salida.ToString();
                }
            }
            catch
            {
                Response.Redirect("frmRelEntSal.aspx");
            }
        }
コード例 #4
0
ファイル: frmAvon.aspx.cs プロジェクト: comparan77/4CAD-CASC
 private void fillData()
 {
     try
     {
         int idBodega = ((MstCasc)this.Master).getUsrLoged().Id_bodega;
         ControlsMng.fillCortinaByBodega(ddlCortina, idBodega);
         txt_fecha.Text  = DateTime.Today.ToString("dd MMM yy");
         txt_bodega.Text = CatalogCtrl.BodegaGet(idBodega).Nombre;
         ControlsMng.fillTipoCarga(ddlTipoCarga);
         ControlsMng.fillDocumento(ddlDocumento);
         ddlDocumento.Items.Remove(ddlDocumento.Items.FindByValue("1"));
         hf_id_usuario.Value = ((MstCasc)this.Master).getUsrLoged().Id.ToString();
         ControlsMng.fillCustodia(ddlCustodia);
     }
     catch
     {
         throw;
     }
 }
コード例 #5
0
        private void fillControls()
        {
            try
            {
                ControlsMng.fillBodegaByUser(ddlBodega, ((MstCasc)this.Master).getUsrLoged().Id);
                ddlBodega.Items[0].Selected = true;

                ControlsMng.fillTarimaAlmacenProveedor(ddl_proveedor_origen);

                ControlsMng.fillCortinaByBodega(ddlCortina, Convert.ToInt32(ddlBodega.SelectedItem.Value));
                txt_fecha.Text = DateTime.Today.ToString("dd MMMM yy");

                ControlsMng.fillCustodia(ddlCustodia);
            }
            catch
            {
                throw;
            }
        }
コード例 #6
0
        private void fillControls()
        {
            try
            {
                txt_fecha.Text = DateTime.Today.ToString("dd MMM yy");
                //ControlsMng.fillSalidaDestino(ddlDestino);

                ControlsMng.fillTransporte(ddlTransporte);
                ControlsMng.fillTipoTransporte(ddlTipo_Transporte, ddlTransporte);
                int IdTransporteTipo = 0;
                int.TryParse(ddlTipo_Transporte.SelectedValue, out IdTransporteTipo);
                validarTipo(IdTransporteTipo);
                ControlsMng.fillCustodia(ddlCustodia);
            }
            catch
            {
                throw;
            }
        }
コード例 #7
0
        private void fillControls()
        {
            try
            {
                ddlBodega.SelectedValue = ((MstCasc)this.Master).getUsrLoged().Id_bodega.ToString();
                ControlsMng.fillCortinaByBodega(ddlCortina, Convert.ToInt32(ddlBodega.SelectedValue));
                ControlsMng.fillCliente(ddlCliente);
                ControlsMng.fillTransporte(ddl_linea);
                ControlsMng.fillTipoTransporte(ddl_tipo);
                ControlsMng.fillCustodia(ddlCustodia);
                ControlsMng.fillVigilanciaByBodega(ddlVigilante, Convert.ToInt32(ddlBodega.SelectedValue));

                int IdCliente = 0;
                int.TryParse(ddlCliente.SelectedValue, out IdCliente);
            }
            catch (Exception)
            {
                Response.Redirect("~/Login.aspx");
            }
        }
コード例 #8
0
        protected void ddlBodega_changed(object sender, EventArgs args)
        {
            try
            {
                clearControls();
                ControlsMng.fillCortinaByBodega(ddlCortina, Convert.ToInt32(ddlBodega.SelectedValue));
                ControlsMng.fillCliente(ddlCliente);
                int IdCliente = 0;

                int.TryParse(Request.QueryString["_idCte"], out IdCliente);

                if (IdCliente == 0)
                {
                    int.TryParse(ddlCliente.SelectedValue, out IdCliente);
                }


                ddlCliente.SelectedValue = IdCliente.ToString();
                ddlCliente_changed(null, null);
                //ControlsMng.fillDocumento(ddlDocumento);
                clienteRequiereDocumentos(IdCliente);
                //clienteDestinos(IdCliente);

                ControlsMng.fillTransporte(ddlTransporte);
                ControlsMng.fillTipoTransporte(ddlTipo_Transporte, ddlTransporte);
                int IdTransporteTipo = 0;
                int.TryParse(ddlTipo_Transporte.SelectedValue, out IdTransporteTipo);
                validarTipo(IdTransporteTipo);
                //fillVigilanteByBodega(Convert.ToInt32(ddlBodega.SelectedValue));
                //fillCliente();
                ControlsMng.fillCustodia(ddlCustodia);
                ControlsMng.fillVigilanciaByBodega(ddlVigilante, Convert.ToInt32(ddlBodega.SelectedValue));
                fillSalParcial(Convert.ToInt32(ddlBodega.SelectedValue));
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
        }
コード例 #9
0
        protected void ddlBodega_changed(object sender, EventArgs args)
        {
            try
            {
                clearControls();
                ControlsMng.fillCortinaByBodega(ddlCortina, Convert.ToInt32(ddlBodega.SelectedValue));

                ControlsMng.fillCliente(ddlCliente);
                int IdCliente = 0;
                int.TryParse(ddlCliente.SelectedValue, out IdCliente);

                clienteRequiereDocumentos(IdCliente);

                ControlsMng.fillTipoTransporte(ddlTipo_Transporte);
                int IdTransporteTipo = 0;
                int.TryParse(ddlTipo_Transporte.SelectedValue, out IdTransporteTipo);
                validarPlacas(IdTransporteTipo);
                ControlsMng.fillCustodia(ddlCustodia);
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
        }