private void udtAduana(Aduana o) { try { CatalogCtrl.AduanaUdt(o); } catch { throw; } }
private void istCliente_Vendor(Cliente_vendor o) { try { CatalogCtrl.Cliente_vendorAdd(o); } catch { throw; } }
private void istAduana(Aduana o) { try { CatalogCtrl.AduanaAdd(o); } catch { throw; } }
private void udtCliente_Vendor(Cliente_vendor o) { try { CatalogCtrl.Cliente_vendorUdt(o); } catch { throw; } }
private void udtNom(Nom o) { try { CatalogCtrl.NomUdt(o); } catch { throw; } }
private void istNom(Nom o) { try { CatalogCtrl.NomAdd(o); } catch { throw; } }
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); } }
private void udtUsuario(Usuario oU) { try { CatalogCtrl.usuarioUdt(oU); updateMembershipUser(oU); } catch { throw; } }
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; } }
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; } }
protected void Page_Load(object sender, EventArgs args) { if (!IsPostBack) { try { fillCatalog(CatalogCtrl.usuarioFillAllList()); } catch (Exception e) { ((MstCasc)this.Master).setError = e.Message; } } }
protected void Page_Load(object sender, EventArgs args) { if (!IsPostBack) { try { fillCatalog(CatalogCtrl.UbicacionfillEvenInactive()); } catch (Exception e) { ((MstCasc)this.Master).setError = e.Message; } } }
private void loadFirstTime() { try { VSLstOTS = new List <Orden_trabajo_servicio>(); VSLstServ = CatalogCtrl.ServicioLst(); rep_servicios.DataSource = VSLstServ; rep_servicios.DataBind(); } catch { throw; } }
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; } }
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; } }
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; } } }
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; } }
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; } }
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; }
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; } }
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; } }
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; } }
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; } } }
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; } }
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; } }
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; } }
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; } }