コード例 #1
0
        private void loadFirstTime()
        {
            try
            {
                int IdSalAduPrint = 0;
                if (Request.QueryString["_kp"] != null)
                {
                    int.TryParse(Request.QueryString["_kp"].ToString(), out IdSalAduPrint);
                    printSalAud(IdSalAduPrint);
                }

                ControlsMng.fillTransporte(ddlTransporte);
                ControlsMng.fillTipoTransporte(ddlTipo_Transporte, ddlTransporte);
                int IdTransporteTipo = 0;
                int.TryParse(ddlTipo_Transporte.SelectedValue, out IdTransporteTipo);
                validarTipo(IdTransporteTipo);

                ControlsMng.fillBodegaByUser(ddlBodega, ((MstCasc)this.Master).getUsrLoged().Id);
                fillUsrPrvPerdByIdBodega(Convert.ToInt32(ddlBodega.Items[0].Value));

                setDateRange();
            }
            catch
            {
                throw;
            }
        }
コード例 #2
0
 protected void ddlTransporte_changed(object sender, EventArgs args)
 {
     try
     {
         ControlsMng.fillTipoTransporte(ddlTipo_Transporte, ddlTransporte);
         ddlTipo_Transporte_changed(null, null);
     }
     catch (Exception e)
     {
         ((MstCasc)this.Master).setError = e.Message;
     }
 }
コード例 #3
0
 private void fillControls()
 {
     try
     {
         ControlsMng.fillBodegaByUser(ddlBodega, ((MstCasc)this.Master).getUsrLoged().Id);
         ControlsMng.fillCliente(ddlCliente);
         fillEjecutivoByIdCliente(Convert.ToInt32(ddlCliente.SelectedValue));
         ControlsMng.fillTipoTransporte(ddlTipo_Transporte);
     }
     catch
     {
         throw;
     }
 }
コード例 #4
0
ファイル: frmAvon.aspx.cs プロジェクト: comparan77/4CAD-CASC
 protected void Page_Load(object sender, EventArgs args)
 {
     ControlsMng.fillTipoTransporte(ddlTipo_Transporte);
     if (!IsPostBack)
     {
         try
         {
             loadFirstTime();
         }
         catch (Exception e)
         {
             ((MstCasc)this.Master).setError = e.Message;
         }
     }
 }
コード例 #5
0
 protected void grd_trafico_citas_row_databound(object sender, GridViewRowEventArgs args)
 {
     try
     {
         GridView grd_trafico = (GridView)sender;
         if (args.Row.RowType == DataControlRowType.DataRow)
         {
             DropDownList ddl = args.Row.FindControl("ddl_transporte") as DropDownList;
             ControlsMng.fillTipoTransporte(ddl);
             ddl.SelectedValue = grd_trafico.DataKeys[args.Row.RowIndex][1].ToString();
         }
     }
     catch (Exception e)
     {
         ((MstCasc)this.Master).setError = e.Message;
     }
 }
コード例 #6
0
 private void loadFirstTime()
 {
     try
     {
         ControlsMng.fillTipoCarga(ddlTipoCarga);
         ControlsMng.fillSalidaDestino(ddlDestino);
         ControlsMng.fillTransporte(ddlTransporte);
         ControlsMng.fillTipoTransporte(ddlTipo_Transporte, ddlTransporte);
         int IdTransporteTipo = 0;
         int.TryParse(ddlTipo_Transporte.SelectedValue, out IdTransporteTipo);
         validarTipo(IdTransporteTipo);
     }
     catch
     {
         throw;
     }
 }
コード例 #7
0
 protected void Page_Load(object sender, EventArgs args)
 {
     //Llena los clientes
     //ControlsMng.fillCliente(ddlCliente);
     ControlsMng.fillTipoTransporte(ddlTipo_Transporte);
     //ddlCliente.Enabled = true;
     if (!IsPostBack)
     {
         try
         {
             loadFirstTime();
         }
         catch (Exception e)
         {
             ((MstCasc)this.Master).setError = e.Message;
         }
     }
 }
コード例 #8
0
 private void loadFirstTime()
 {
     try
     {
         //ControlsMng.fillTransporte(ddlTransporte);
         //ControlsMng.fillTipoTransporte(ddlTipo_Transporte, ddlTransporte);
         ControlsMng.fillTipoCarga(ddlTipoCarga);
         ControlsMng.fillTipoTransporte(ddlTipo_Transporte);
         ControlsMng.fillSalidaDestino(ddlDestino);
         int IdTransporteTipo = 0;
         int.TryParse(ddlTipo_Transporte.SelectedValue, out IdTransporteTipo);
         fillSolicitudesSinCita();
         fillSolicitudesConCita();
     }
     catch
     {
         throw;
     }
 }
コード例 #9
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;
            }
        }
コード例 #10
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");
            }
        }
コード例 #11
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;
            }
        }
コード例 #12
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;
            }
        }
コード例 #13
0
        private void fillSalidaCompartida(Salida oS, string referencia)
        {
            if (oS != null)
            {
                try
                {
                    hfEsCompartida.Value     = true.ToString();
                    hfFolio.Value            = oS.Folio;
                    ddlBodega.SelectedValue  = oS.Id_bodega.ToString();
                    txt_fecha.Text           = oS.Fecha.ToString("dd MMM yy");
                    txt_hora_salida.Text     = oS.Hora_salida;
                    ddlCortina.SelectedValue = oS.Id_cortina.ToString();
                    ddlCliente.SelectedValue = oS.Id_cliente.ToString();
                    txt_referencia.Text      = referencia;

                    VSLstSD = new List <Salida_documento>();
                    lst_documento_recibido.Items.Clear();
                    foreach (Salida_documento itemSD in oS.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()));
                    }
                    lst_pedimentos_consolidados.Items.Clear();
                    foreach (Salida_compartida itemSC in oS.PLstSalComp)
                    {
                        if (string.Compare(itemSC.Referencia, referencia) != 0)
                        {
                            lst_pedimentos_consolidados.Items.Add(new ListItem(itemSC.Referencia, itemSC.Referencia));
                        }
                    }
                    txt_destino.Text            = oS.Destino;
                    ddlTransporte.SelectedValue = oS.Id_transporte.ToString();
                    ControlsMng.fillTipoTransporte(ddlTipo_Transporte, ddlTransporte);
                    ddlTipo_Transporte.SelectedValue = oS.Id_transporte_tipo.ToString();
                    validarTipo(oS.Id_transporte_tipo);
                    txt_placa.Text  = oS.Placa;
                    txt_caja.Text   = oS.Caja;
                    txt_caja_1.Text = oS.Caja1;
                    txt_caja_2.Text = oS.Caja2;
                    txt_sello.Text  = oS.Sello;
                    txt_talon.Text  = oS.Talon;

                    ddlCustodia.SelectedValue = oS.Id_custodia.ToString();
                    txt_operador.Text         = oS.Operador;
                    ControlsMng.fillVigilanciaByBodega(ddlVigilante, Convert.ToInt32(ddlBodega.SelectedValue));
                    ddlVigilante.Items.FindByText(oS.Vigilante).Selected = true;

                    if (!oS.Es_unica)
                    {
                        chk_tipo_salida.Checked = false;
                        chk_tipo_salida.Text    = CTE_TIP_SAL_PAR;
                        chk_ultima.Visible      = true;
                        lbl_no_salida.Visible   = true;

                        int NumSalida = SalidaCtrl.getNumSalPar(referencia);
                        NumSalida++;

                        lbl_no_salida.Text      = "Salida Número: " + NumSalida.ToString();
                        chk_tipo_salida.Enabled = false;
                    }
                }
                catch
                {
                    throw;
                }
            }
        }