Пример #1
0
 private void udtAduana(Aduana o)
 {
     try
     {
         CatalogCtrl.AduanaUdt(o);
     }
     catch
     {
         throw;
     }
 }
Пример #2
0
 private void istCliente_Vendor(Cliente_vendor o)
 {
     try
     {
         CatalogCtrl.Cliente_vendorAdd(o);
     }
     catch
     {
         throw;
     }
 }
Пример #3
0
 private void istAduana(Aduana o)
 {
     try
     {
         CatalogCtrl.AduanaAdd(o);
     }
     catch
     {
         throw;
     }
 }
Пример #4
0
 private void udtCliente_Vendor(Cliente_vendor o)
 {
     try
     {
         CatalogCtrl.Cliente_vendorUdt(o);
     }
     catch
     {
         throw;
     }
 }
Пример #5
0
 private void udtNom(Nom o)
 {
     try
     {
         CatalogCtrl.NomUdt(o);
     }
     catch
     {
         throw;
     }
 }
Пример #6
0
 private void istNom(Nom o)
 {
     try
     {
         CatalogCtrl.NomAdd(o);
     }
     catch
     {
         throw;
     }
 }
Пример #7
0
        public void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType     = "application/json";
            context.Response.ContentEncoding = Encoding.UTF8;
            string catalogo = context.Request["catalogo"].ToString();
            string response = string.Empty;

            try
            {
                switch (catalogo)
                {
                case "cliente":
                    response = cliente(context);
                    break;

                case "cliente_mercancia":
                    response = clienteMercancia(context);
                    break;

                case "cliente_vendor":
                    response = clienteVendor(context);
                    break;

                case "cliente_documento":
                    response = clienteDocumento(context);
                    break;

                case "documento":
                    response = CatalogCtrl.DocumentoLstToJson();
                    break;

                case "transporte":
                    response = JsonConvert.SerializeObject(CatalogCtrl.TransporteGetByTipo(Convert.ToInt32(context.Request["id_transporte_tipo"])));
                    break;

                case "transporte_tipo":
                    response = JsonConvert.SerializeObject(CatalogCtrl.TransporteTipoGet());
                    break;

                case "vigilante":
                    response = JsonConvert.SerializeObject(CatalogCtrl.vigilanteGetByBodega(Convert.ToInt32(context.Request["key"])));
                    break;

                default:
                    break;
                }
                context.Response.Write(response);
            }
            catch (Exception e)
            {
                context.Response.Write(e.Message);
            }
        }
Пример #8
0
 private void udtUsuario(Usuario oU)
 {
     try
     {
         CatalogCtrl.usuarioUdt(oU);
         updateMembershipUser(oU);
     }
     catch
     {
         throw;
     }
 }
Пример #9
0
 private void fillUsrPrvPerdByIdBodega(int id_bodega)
 {
     try
     {
         List <Usuario> lst = CatalogCtrl.UsuarioSelByRolAndBodega(enumRol.PrevPerdidas, id_bodega);
         hf_usr_prv_perd.Value = Newtonsoft.Json.JsonConvert.SerializeObject(lst);
     }
     catch
     {
         throw;
     }
 }
Пример #10
0
        protected void btn_buscar_click(object sender, EventArgs args)
        {
            try
            {
                bool   exixteFondeo = false;
                string referencia   = txt_dato.Text.Trim();

                //Verificacion en tabla de Entrada_fondeo
                List <Entrada_fondeo> lstEntFo = EntradaCtrl.FondeoGetByReferencia(referencia);
                exixteFondeo = lstEntFo.Count > 0;
                if (!exixteFondeo)
                {
                    throw new Exception("El pedimento proporcionado no ha sido dado de alta en los fondeos");
                }


                //Verifica que sea un nuevo arribo o un arribo parcial
                if (!EntradaCtrl.EsReferenciaParcial(referencia, 1))
                {
                    EntradaCtrl.ReferenciaNuevaValida(referencia, 1);
                }
                else
                {
                    Entrada_parcial oEP = EntradaCtrl.ParcialGetByReferencia(referencia);
                    if (oEP.Id_entrada == 0)
                    {
                        throw new Exception("El pedimento entro parcialmente y ya se ha capturado la última parcialidad.");
                    }
                    fillEntradaParcial(EntradaCtrl.getEntradaParcial(oEP.Id_entrada), oEP);
                }

                pnl_infoArribo.Visible = exixteFondeo;

                if (exixteFondeo)
                {
                    fillData();

                    Entrada_fondeo oEFfirst = lstEntFo.First();
                    txt_referencia.Text = oEFfirst.Aduana + "-" + oEFfirst.Referencia;
                    Aduana oAduana = CatalogCtrl.AduanaGetByCodigo(oEFfirst.Aduana);
                    txt_origen.Text             = oAduana.Nombre;
                    txt_no_pieza_declarada.Text = lstEntFo.Sum(p => p.Piezas).ToString();
                    //txt_origen.Text = oAduana.Nombre;
                    //ddlCliente.SelectedValue = ;
                }
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
        }
Пример #11
0
 protected void Page_Load(object sender, EventArgs args)
 {
     if (!IsPostBack)
     {
         try
         {
             fillCatalog(CatalogCtrl.usuarioFillAllList());
         }
         catch (Exception e)
         {
             ((MstCasc)this.Master).setError = e.Message;
         }
     }
 }
Пример #12
0
 protected void Page_Load(object sender, EventArgs args)
 {
     if (!IsPostBack)
     {
         try
         {
             fillCatalog(CatalogCtrl.UbicacionfillEvenInactive());
         }
         catch (Exception e)
         {
             ((MstCasc)this.Master).setError = e.Message;
         }
     }
 }
Пример #13
0
 private void loadFirstTime()
 {
     try
     {
         VSLstOTS  = new List <Orden_trabajo_servicio>();
         VSLstServ = CatalogCtrl.ServicioLst();
         rep_servicios.DataSource = VSLstServ;
         rep_servicios.DataBind();
     }
     catch
     {
         throw;
     }
 }
Пример #14
0
        private string clienteDocumento(HttpContext context)
        {
            string response = string.Empty;
            string option   = context.Request["opt"].ToString();
            string key      = string.Empty;

            switch (option)
            {
            case "getList":
                key      = context.Request["key"].ToString();
                response = JsonConvert.SerializeObject(CatalogCtrl.Cliente_DocumentoFillLstByCliente(Convert.ToInt32(key)));
                break;
            }
            return(response);
        }
 public void fillNegocio()
 {
     try
     {
         List <string> lst = CatalogCtrl.Cliente_mercanciaGetNegocios();
         foreach (string strNegocio in lst)
         {
             optionNegocio += "<option value='" + strNegocio + "'>" + strNegocio + "</option>";
         }
     }
     catch
     {
         throw;
     }
 }
        private void setCliente()
        {
            int Id = 0;

            int.TryParse(hfFkey.Value, out Id);

            try
            {
                clienteGrupoNombre = CatalogCtrl.Cliente_grupoGet(Id).Nombre;
            }
            catch
            {
                throw;
            }
        }
Пример #17
0
        private void fillForm()
        {
            int Id = 0;

            int.TryParse(hfId.Value, out Id);

            try
            {
                Ubicacion o = CatalogCtrl.UbicacionGet(Id);
                txt_nombre.Text = o.Nombre;
            }
            catch
            {
                throw;
            }
        }
Пример #18
0
 protected void Page_Load(object sender, EventArgs args)
 {
     if (!IsPostBack)
     {
         try
         {
             hfFkey.Value = Request["fKey"];
             setCliente();
             fillCatalog(CatalogCtrl.Cliente_vendorfillEvenInactive(Convert.ToInt32(hfFkey.Value)));
         }
         catch (Exception e)
         {
             ((MstCasc)this.Master).setError = e.Message;
         }
     }
 }
Пример #19
0
        private void setCliente()
        {
            int Id = 0;

            int.TryParse(hfFkey.Value, out Id);

            try
            {
                lnkCliente.Text        = CatalogCtrl.Cliente_grupoGet(Id).Nombre;
                lnkCliente.NavigateUrl = "frmClienteGrupo.aspx?Action=Udt&Key=" + Id.ToString();
            }
            catch
            {
                throw;
            }
        }
        private void fillForm()
        {
            int Id = 0;

            int.TryParse(hfId.Value, out Id);

            try
            {
                Cliente_comprador o = CatalogCtrl.Cliente_compradorGet(Id);
                txt_nombre.Text = o.Nombre;
            }
            catch
            {
                throw;
            }
        }
Пример #21
0
        private void fillForm()
        {
            int Id = 0;

            int.TryParse(hfId.Value, out Id);

            try
            {
                Tipo_carga o = CatalogCtrl.Tipo_cargaGet(Id);
                txt_nombre.Text = o.Nombre;
            }
            catch
            {
                throw;
            }
        }
Пример #22
0
        private void fillData()
        {
            int entero = 0;

            int.TryParse(oSR.Id_entrada_inventario.ToString(), out entero);
            oEI = EntradaCtrl.InvetarioGetById(entero);
            oE  = EntradaCtrl.EntradaGetAllDataById(oEI.Id_entrada);
            oCV = CatalogCtrl.Cliente_vendorGet(oEI.Id_vendor);

            hf_id_salida_remision.Value = oSR.Id.ToString();

            int totalPiezas = 0;

            clearData();
            for (int indSRD = 0; indSRD < oSR.LstSRDetail.Count; indSRD++)
            {
                Salida_remision_detail oSRD = oSR.LstSRDetail[indSRD];
                totalPiezas += oSRD.Piezas;
                switch (indSRD)
                {
                case 0:
                    txt_bulto_1.Text        = oSRD.Bulto.ToString();
                    txt_piezasXbulto_1.Text = oSRD.Piezaxbulto.ToString();
                    txt_piezas_1.Text       = oSRD.Piezas.ToString();
                    break;

                case 1:
                    txt_bulto_2.Text        = oSRD.Bulto.ToString();
                    txt_piezasXbulto_2.Text = oSRD.Piezaxbulto.ToString();
                    txt_piezas_2.Text       = oSRD.Piezas.ToString();
                    break;

                default:
                    break;
                }
            }
            txt_piezaTotal.Text = totalPiezas.ToString();

            DateTime fecha = default(DateTime);

            DateTime.TryParse(oSR.Fecha_recibido.ToString(), out fecha);
            if (DateTime.Compare(fecha, default(DateTime)) != 0)
            {
                txt_fecha_rr.Text = fecha.ToString("dd/MM/yyyy");
            }
            txt_RR.Text = oSR.Etiqueta_rr;
        }
Пример #23
0
        private void validarTipo(int IdTransporteTipo)
        {
            try
            {
                //if (IdTransporteTipo > 0 && string.Compare(hf_click_save.Value, "1") != 0)
                if (IdTransporteTipo > 0)
                {
                    Transporte_tipo o = CatalogCtrl.Transporte_tipo_getyById(IdTransporteTipo);

                    //rv_total_carga_max.MinimumValue = "0";
                    //rv_total_carga_max.MaximumValue = o.Peso_maximo.ToString();
                    //rv_total_carga_max.ErrorMessage = "El peso excede los " + o.Peso_maximo.ToString() + " Kg, para el tipo de transrpote selecccionado";

                    txt_placa.Text      = string.Empty;
                    txt_placa.ReadOnly  = (!o.Requiere_placa);
                    txt_caja.Text       = string.Empty;
                    txt_caja.ReadOnly   = (!o.Requiere_caja);
                    txt_caja_1.Text     = string.Empty;
                    txt_caja_1.ReadOnly = (!o.Requiere_caja1);
                    txt_caja_2.Text     = string.Empty;
                    txt_caja_2.ReadOnly = (!o.Requiere_caja2);

                    if (txt_placa.ReadOnly)
                    {
                        txt_placa.Text = "N.A.";
                    }
                    if (txt_caja.ReadOnly)
                    {
                        txt_caja.Text = "N.A.";
                    }
                    if (txt_caja_1.ReadOnly)
                    {
                        txt_caja_1.Text = "N.A.";
                    }
                    if (txt_caja_2.ReadOnly)
                    {
                        txt_caja_2.Text = "N.A.";
                    }

                    hf_cond_trans.Value = Newtonsoft.Json.JsonConvert.SerializeObject(TransporteCtrl.TransCondByTransporteTipo(IdTransporteTipo, false, true));
                }
            }
            catch
            {
                throw;
            }
        }
Пример #24
0
        private void fillForm()
        {
            int Id = 0;

            int.TryParse(hfId.Value, out Id);

            try
            {
                Aduana o = CatalogCtrl.AduanaGet(Id);
                txt_codigo.Text = o.Codigo;
                txt_nombre.Text = o.Nombre;
            }
            catch
            {
                throw;
            }
        }
Пример #25
0
        private void fillForm()
        {
            int Id = 0;

            int.TryParse(hfId.Value, out Id);

            try
            {
                Nom o = CatalogCtrl.NomGet(Id);
                txt_nombre.Text      = o.Nombre;
                txt_descripcion.Text = o.Descripcion;
            }
            catch
            {
                throw;
            }
        }
Пример #26
0
 protected void logCasc_LoggedIn(object sender, EventArgs args)
 {
     try
     {
         Usuario oU = CatalogCtrl.UsuarioSelByClaveContrasenia(logCasc.UserName, logCasc.Password);
         oU.Contrasenia = string.Empty;
         Session.Add("userCasc", oU);
         FormsAuthentication.RedirectFromLoginPage(oU.Clave, logCasc.RememberMeSet);
     }
     catch (Exception ex)
     {
         hfTitleErr.Value = ex.Message;
         if (ex.InnerException != null)
         {
             hfDescErr.Value = ex.InnerException.Message;
         }
     }
 }
Пример #27
0
        protected void lnk_change_status_click(object sender, CommandEventArgs args)
        {
            try
            {
                int Id = 0;
                int.TryParse(args.CommandName, out Id);
                bool status = false;
                bool.TryParse(args.CommandArgument.ToString(), out status);

                Cliente_vendor o = new Cliente_vendor();
                o.Id = Id;
                CatalogCtrl.Cliente_vendorChangeStatus(o, status);
                fillCatalog(CatalogCtrl.Cliente_vendorfillEvenInactive(Convert.ToInt32(hfFkey.Value)));
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
        }
Пример #28
0
        private void fillForm()
        {
            int Id = 0;

            int.TryParse(hfId.Value, out Id);

            try
            {
                Cliente_vendor o = CatalogCtrl.Cliente_vendorGet(Id);
                txt_id_fiscal.Text = o.Id_fiscal;
                txt_vendor.Text    = o.Codigo;
                txt_nombre.Text    = o.Nombre;
                txt_direccion.Text = o.Direccion;
            }
            catch
            {
                throw;
            }
        }
Пример #29
0
        protected void lnk_change_status_click(object sender, CommandEventArgs args)
        {
            try
            {
                int Id = 0;
                int.TryParse(args.CommandName, out Id);
                bool status = false;
                bool.TryParse(args.CommandArgument.ToString(), out status);

                Ubicacion o = new Ubicacion();
                o.Id = Id;
                CatalogCtrl.UbicacionChangeStatus(o, status);
                fillCatalog(CatalogCtrl.UbicacionfillEvenInactive());
            }
            catch (Exception e)
            {
                ((MstCasc)this.Master).setError = e.Message;
            }
        }
Пример #30
0
 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;
     }
 }