/// <summary> /// ejecuta un servicio web y retorna una lista de pocos de la tabla BATCH_LOAD_CARGAMOV /// </summary> public void CallServiceGetListBatchProcess() { #region metodos try { var client = new RestClient(routeBach); client.Authenticator = new HttpBasicAuthenticator(basicAuthUser, basicAuthPass); var request = new RestRequest(Method.POST); request.Resource = nameServiceListBatch; request.RequestFormat = RestSharp.DataFormat.Json; request.AddHeader("Content-type", "application/json"); request.AddBody(new { }); request.Timeout = 60000; IRestResponse response = client.Execute(request); Dictionary <string, string> resx = dataMapper.GetResponseDictionary(response.Content); FixupCollection <BATCH_LOAD_CARGAMOV> list = new FixupCollection <BATCH_LOAD_CARGAMOV>(); if (resx != null) { list = dataMapper.GetDeserializeBatchLoad(resx["GetListBatchProcessResult"]); //asigmanos a la lista this.ListBatchLoad = list; } } catch (Exception) { throw; } #endregion }
public CatalogClienteModel(IDataMapper dataMapper) { this._dataMapper = new ClienteDataMapper(); this._cliente = new FixupCollection <DeleteCliente>(); this._selectedCliente = new CLIENTE(); this.loadCliente(); }
public CatalogTerminoEnvioModel(IDataMapper dataMapper) { this._dataMapper = new TerminoEnvioDataMapper(); this._terminoEnvio = new FixupCollection <DeleteTerminoEnvio>(); this._selectedTerminoEnvio = new TERMINO_ENVIO(); this.loadItems(); }
public object getElements() { object o = null; FixupCollection <TECNICO> tp = new FixupCollection <TECNICO>(); using (var Entity = new TAE2Entities()) { var query = (from p in Entity.TECNICOes where p.IS_ACTIVE == true select p).ToList(); foreach (TECNICO tec in ((List <TECNICO>)query)) { tec.CIUDAD = tec.CIUDAD; } if (query.Count > 0) { foreach (TECNICO t in query) { t.CIUDAD = t.CIUDAD; } o = query; } return(o); } }
public object getElement(object element) { object res = null; FixupCollection <TIPO_COTIZACION> tp = new FixupCollection <TIPO_COTIZACION>(); if (element != null) { using (var entity = new TAE2Entities()) { TIPO_COTIZACION ETipo = (TIPO_COTIZACION)element; var query = (from cust in entity.TIPO_COTIZACION where cust.UNID_TIPO_COTIZACION == ETipo.UNID_TIPO_COTIZACION select cust).ToList(); if (query.Count > 0) { res = query; } return(res); } } return(res); }
public CatalogUnidadModel(IDataMapper dataMapper) { this._dataMapper = new UnidadDataMapper(); this._unidad = new FixupCollection <DeleteUnidad>(); this._selectedUnidad = new UNIDAD(); this.loadItems(); }
public CatalogEquipoModel(IDataMapper dataMapper) { this._dataMapper = new EquipoDataMapper(); this._equipos = new FixupCollection <DeleteEquipo>(); this._selectedEquipo = new EQUIPO(); this.loadItems(); }
public CatalogMonedaModel(IDataMapper dataMapper) { this._dataMapper = new MonedaDataMapper(); this._moneda = new FixupCollection <DeleteMoneda>(); this._selectedMoneda = new MONEDA(); this.loadMonedas(); }
public CatalogProyectoModel(IDataMapper dataMapper) { this._dataMapper = new ProyectoDataMapper(); this._proyecto = new FixupCollection <DeleteProyecto>(); this._selectedProyecto = new PROYECTO(); this.loadItems(); }
public CatalogBancoModel(IDataMapper dataMapper) { this._dataMapper = new BancoDataMapper(); this._banco = new FixupCollection <DeleteBanco>(); this._selectedBanco = new BANCO(); this.loadBancos(); }
public CatalogInfraestructuraModel(IDataMapper dataMapper) { this._dataMapper = new InfraestructuraDataMapper(); this._infraestructuras = new FixupCollection <DeleteInfraestructura>(); this._selectedInfraestructura = new INFRAESTRUCTURA(); this.loadItems(); }
public CatalogMarcaModel(IDataMapper dataMapper) { this._dataMapper = new MarcaDataMapper(); this._marcas = new FixupCollection <DeleteMarca>(); this._selectedmarca = new MARCA(); this.loadItems(); }
public CatalogTipoPedimentoModel(IDataMapper dataMapper) { this._dataMapper = new TipoPedimentoDataMapper(); this._tipoPedimento = new FixupCollection <DeleteTipoPedimento>(); this._selectedTipoPedimento = new TIPO_PEDIMENTO(); this.loadItems(); }
public CatalogTipoCotizacionModel(IDataMapper dataMapper) { this._dataMapper = new TipoCotizacionDataMapper(); this._tipoCotizacion = new FixupCollection <DeleteTipoCotizacion>(); this._selectedTipoCotizacion = new TIPO_COTIZACION(); this.loadItems(); }
public CatalogDepartamentoModel(IDataMapper dataMapper) { this._dataMapper = new DepartamentoDataMapper(); this._departamento = new FixupCollection <DeleteDepartamento>(); this._selectedDepartamento = new DEPARTAMENTO(); this.loadDepartamentos(); }
public CatalogItemStatusModel(IDataMapper dataMapper) { this._dataMapper = new ItemStatusDataMapper(); this._itemStatus = new FixupCollection <DeleteItemStatus>(); this._selectedItemStatus = new ITEM_STATUS(); this.loadItems(); }
public void loadItems() { object element = this._dataMapper.getElements(); FixupCollection <DeleteArticulo> ic = new FixupCollection <DeleteArticulo>(); if (element != null) { if (((List <ARTICULO>)element).Count > 0) { foreach (ARTICULO item in (List <ARTICULO>)element) { DeleteArticulo aux = new DeleteArticulo(item); //item.IsChecked = false; ic.Add(aux); } } } this.Articulos = ic; //FixupCollection<DeleteArticulo> ic = new FixupCollection<DeleteArticulo>(); //foreach (ARTICULO elemento in (List<ARTICULO>)element) //{ // ic.Add((ARTICULO)elemento); //} //if (ic != null) //{ // this.Articulos = ic; //} }
public object getElements() { object res = null; FixupCollection <ARTICULO> tp = new FixupCollection <ARTICULO>(); using (var entity = new TAE2Entities()) { res = (from articulo in entity.ARTICULOes .Include("MODELO") .Include("MARCA") .Include("EQUIPO") .Include("CATEGORIA") where articulo.IS_ACTIVE == true select articulo).ToList(); //foreach (ARTICULO art in ((List<ARTICULO>)res)) //{ // art.CATEGORIA = art.CATEGORIA; // art.MARCA = art.MARCA; // art.MODELO = art.MODELO; // art.EQUIPO = art.EQUIPO; //} return(res); } }
public CatalogPaisModel(IDataMapper dataMapper) { this._dataMapper = new PaisDataMapper(); this._pais = new FixupCollection <DeletePais>(); this._selectedPais = new PAI(); this.loadItems(); }
/// <summary> /// /// </summary> /// <param name="categoria"></param> /// <param name="equipo"></param> /// <returns>Regresa un string JSON y si no hay datos </returns> public FixupCollection <ARTICULO> getElement(CATEGORIA categoria, EQUIPO equipo) { FixupCollection <ARTICULO> articulos = new FixupCollection <ARTICULO>(); if (categoria != null && equipo != null) { using (var entity = new TAE2Entities()) { try { (from cust in entity.ARTICULOes where cust.UNID_CATEGORIA == categoria.UNID_CATEGORIA && cust.UNID_EQUIPO == equipo.UNID_EQUIPO select cust).ToList <ARTICULO>().ForEach(o => articulos.Add(o)); } catch (Exception ex) { ; } } }//endif return(articulos); }
public CatalogPropiedadModel(IDataMapper dataMapper) { this._dataMapper = new PropiedadDataMapper(); this._propiedad = new FixupCollection <DeletePropiedad>(); this._selectedPropiedad = new PROPIEDAD(); this.loadItems(); }
public object getElement(object element) { FixupCollection <ITEM_STATUS> tp = new FixupCollection <ITEM_STATUS>(); object res = null; if (element != null) { using (var entity = new TAE2Entities()) { ITEM_STATUS ESta = (ITEM_STATUS)element; //var query= (from cust in entity.ITEM_STATUS // where cust.UNID_ITEM_STATUS == ESta.UNID_ITEM_STATUS // select cust).ToList(); //if (query.Count > 0) // { // res = query; // } // return res; var query = (from cust in entity.ITEM_STATUS where cust.UNID_ITEM_STATUS == ESta.UNID_ITEM_STATUS select cust).First(); res = query; } } return(res); }
public void loadRoles() { object element = this._dataMapper.getElementRoles(this.UNID_USUARIO); FixupCollection <DeleteRol> ic = new FixupCollection <DeleteRol>(); string ru = null; if (element != null) { if (((List <ROL>)element).Count > 0) { foreach (ROL item in (List <ROL>)element) { if (item.UNID_ROL != 1) { DeleteRol aux = new DeleteRol(item); ic.Add(aux); ru += item.ROL_NAME + " ; "; } } } } this.Roles = ic; this.UsuariosRoles = ru; }
public CatalogModeloModel(IDataMapper dataMapper) { this._dataMapper = new ModeloDataMapper(); this._modelos = new FixupCollection <DeleteModelo>(); this._selectedmodelo = new MODELO(); this.loadItems(); }
public CatalogCategoriaModel(IDataMapper dataMapper, long unidProv) { this._dataMapper = new CategoriaDataMapper(); this._itemCategoria = new FixupCollection <DeleteCategoria>(); this._selectedCategoria = new CATEGORIA(); this.loadItems(unidProv); }
public CatalogServicioModel(IDataMapper dataMapper) { this._dataMapper = new ServicioDataMapper(); this._servicio = new FixupCollection <DeleteServicio>(); this._selectedServicio = new SERVICIO(); this.loadItems(); }
public void updateProveedor(FixupCollection <DeleteProveedorCuenta> coll) { List <PROVEEDOR_CUENTA> listF = new List <PROVEEDOR_CUENTA>(); foreach (DeleteProveedorCuenta dd in coll) { listF.Add(new PROVEEDOR_CUENTA { BENEFICIARIO = dd.BENEFICIARIO, CLABE = dd.CLABE, IS_ACTIVE = dd.IS_ACTIVE, IS_MODIFIED = dd.IS_MODIFIED, LAST_MODIFIED_DATE = dd.LAST_MODIFIED_DATE, NUMERO_CUENTA = dd.NUMERO_CUENTA, UNID_BANCO = dd.UNID_BANCO, UNID_PROVEEDOR_CUENTA = dd.UNID_PROVEEDOR_CUENTA, UNID_PROVEEDOR = dd.UNID_PROVEEDOR }); } this._dataMapper.updateRelacion(new PROVEEDOR() { UNID_PROVEEDOR = this._unidProveedor, CALLE = this._calle, CODIGO_POSTAL = this._codigoPostal, CONTACTO = this._contacto, MAIL = this._mail, PROVEEDOR_NAME = this._proveedorName, RFC = this._RFC, TEL1 = this._tel1, TEL2 = this._tel2, UNID_CIUDAD = this._ciudad.UNID_CIUDAD, UNID_PAIS = this._pais.UNID_PAIS }, this._unidsCategorias, this._auxUnidsCategorias, this._unidsCuenta, this._auxUnidsCuenta, listF, this.ActualUser ); }
public CatalogCiudadModel(IDataMapper dataMapper) { this._dataMapper = new CiudadDataMapper(); this._ciudad = new FixupCollection <DeleteCiudad>(); this._selectedCiudad = new CIUDAD(); this.loadItems(); }
public CatalogTipoEmpresaModel(IDataMapper dataMapper) { this._dataMapper = new TipoEmpresaDataMapper(); this._tipoEmpresas = new FixupCollection <DeleteTipoEmpresa>(); this._selectedEmpresa = new TIPO_EMPRESA(); this.loadItems(); }
public FixupCollection <EQUIPO> GetArticuloEquipoByCategoria(CATEGORIA categoria) { FixupCollection <EQUIPO> equipos = new FixupCollection <EQUIPO>(); if (categoria != null) { using (var entity = new TAE2Entities()) { try { (from art in entity.ARTICULOes join catt in entity.CATEGORIAs on art.UNID_CATEGORIA equals catt.UNID_CATEGORIA join equ in entity.EQUIPOes on art.UNID_EQUIPO equals equ.UNID_EQUIPO where catt.UNID_CATEGORIA == categoria.UNID_CATEGORIA select equ ).Distinct().ToList <EQUIPO>().ForEach(o => equipos.Add(new EQUIPO() { UNID_EQUIPO = o.UNID_EQUIPO, EQUIPO_NAME = o.EQUIPO_NAME })); } catch (Exception ex) { } } } return(equipos); }