public SqlDataAdapter ListUsrCfg() { SqlDataAdapter dt = null; string Sql = "Select CveUsuario,CveAlmacen " + " from SUsuarioConf "; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListBitacoras() { SqlDataAdapter dt = null; string Sql = "Select CodRegistro,Modulo,Operacion,Descripcion,Fecha,Hora,Usuario,Host,IP " + "from sgBitacoraSistema"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListMunicipios() { SqlDataAdapter dt = null; string Sql = "Select CveMunicipio,Descripcion " + "from CatMunicipios"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListInv_ClaseMov() { SqlDataAdapter dt = null; string Sql = "Select CveClsMov,Descripcion " + "from Inv_ClaseMov"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListPerfiles() { SqlDataAdapter dt = null; string Sql = "Select CodPerfil,Descripcion " + "from SPerfiles"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListParamSystems() { SqlDataAdapter dt = null; string Sql = "Select CodParametro,Descripcion " + "from application_parameters"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListCfgDocumentos() { SqlDataAdapter dt = null; string Sql = "Select CveDoc,Nombre " + "from CfgDocumentos WHERE Estatus = 1"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListImpuestos() { SqlDataAdapter dt = null; string Sql = "Select CveImpuesto,Tipo " + "from [Inv_Impuestos]"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListMarcas() { SqlDataAdapter dt = null; string Sql = "Select CveMarca,Descripcion " + "from Inv_Marcas"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListEmpleados() { SqlDataAdapter dt = null; string Sql = "Select CodEmpleado,Nombre " + "from CatEmpleados"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter RegistroActivo() { SqlDataAdapter dt = null; string Sql = "Select CveSucursal,Nombre,Calle,CveLocalidad,CP,Tel,Mail,Contacto,Cargo,Estatus " + "from CatSucursales where CveSucursal = @CveSucursal"; dt = db.SelectDA(Sql, ArrParametros); return(dt); }
public SqlDataAdapter RegistroActivo() { SqlDataAdapter dt = null; string Sql = "Select CveProveedor,Nombre,RFC,Calle,CveLocalidad,CP,Tel1,Mail1,TipoPersona,Estatus,Contacto,Tel2,Mail2,Cargo,Celular " + "from CatProveedores where CveProveedor = @CveProveedor"; dt = db.SelectDA(Sql, ArrParametros); return(dt); }
public SqlDataAdapter ListUsuarios() { SqlDataAdapter dt = null; string Sql = "Select Usuario,Nombre,CodPerfil " + "from SUsuarios"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListAlmacenes() { SqlDataAdapter dt = null; string Sql = "Select ClaveAlmacen,Descripcion " + "from Inv_CatAlmacenes"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListCfgCatFoliadores() { SqlDataAdapter dt = null; string Sql = "Select CveFoliador,Descripcion " + "from CfgCatFoliadores"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter RegistroActivo() { SqlDataAdapter dt = null; string Sql = "Select CveCliente,Nombre,CveLstPrecio " + "from CatClientes where CveCliente = @CveCliente"; dt = db.SelectDA(Sql, ArrParametros); return(dt); }
public SqlDataAdapter RegistroActivo() { SqlDataAdapter dt = null; string Sql = "Select * " + "from SAccesos where CodPerfil =@CodPerfil"; dt = db.SelectDA(Sql, ArrParametros); return(dt); }
public SqlDataAdapter ListLineas() { SqlDataAdapter dt = null; string Sql = "Select CveLinea,Descripcion " + "from Inv_Lineas" + " order by Descripción "; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListHijos() { SqlDataAdapter dt = null; string Sql = "Select id as Clave,Descripcion " + "from CatGeografia " + "where Padre = @Padre " + "order by Descripcion"; dt = db.SelectDA(Sql, ArrParametros); return(dt); }
public SqlDataAdapter ListDoctores() { SqlDataAdapter dt = null; string Sql = "Select D.Cedula,D.Nombre,D.Calle,D.Telefono,D.Correo,D.CP, G2.Descripcion as Municipio " + "FROM CatDoctores AS D" + "INNER JOIN dbo.CatGeografia AS G1 ON P.CveLocalidad = G1.id " + "INNER JOIN dbo.CatGeografia AS G2 ON G2.id = G1.Padre " + " order by D.Nombre "; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter RegistroActivo() { SqlDataAdapter dt = null; string Sql = "select Ex.ClaveArticulo,Ar.Descripcion,Ln.Descripcion,Ex.ClaveAlmacen,Ex.Cantidad,Ex.CantApartada," + " (Ex.Cantidad - Ex.CantApartada) as ExTotal, Ex.stockMin,Ex.stockMax,Ex.CostoPromedio," + " Ex.CostoUltimo,Ex.CostoActual,Ex.Ubicacion " + " from Inv_Existencias Ex join inv_CatArticulos Ar on Ex.ClaveArticulo = Ar.CveArticulo " + " join Inv_Lineas Ln on Ar.CveLinea = Ln.CveLinea " + " WHERE Ar.Estatus = 1"; dt = db.SelectDA(Sql, ArrParametros); return(dt); }
public SqlDataAdapter BusPrecio(String ModLlama) { // SqlDataAdapter dt = null; if (ModLlama.Equals("MProv") || ModLlama.Equals("Minv")) { string Sql = "SELECT ClaveArticulo,ClaveAlmacen,Cantidad,stockMin,stockMax," + " CantApartada,CostoPromedio,CostoUltimo,CostoActual " + " FROM Inv_Existencias WHERE ClaveArticulo = @CveArticulo and ClaveAlmacen=@CveAlmacen"; dt = db.SelectDA(Sql, ArrParametros); } return(dt); }
public SqlDataAdapter RegistroActivo() { SqlDataAdapter dt = null; string Sql = "Select MM.NoMovimiento, MM.FechaMovimiento, MM.CveAlmacenMov, MM.CveTipoMov, MM.EntSal," + " MM.NoDoc, MM.Documento, MM.CveAlmacenDes,CveTipoMovDest, MM.EntSalDest," + " MM.Modulo, MM.TipoDoc, MM.SerieDoc, MM.FolioDocOrigen, MM.Descuento," + " MM.TotalDscto, MM.TIva, MM.SubTotal, MM.TotalDoc, MM.CveProveedor," + " MM.CveCliente, MM.Cancelado, MM.CveUsarioCaptu, MM.CveCentroCosto, MM.NoMovtoTra," + " MM.DocTra, TM.CveClsMov " + "from Inv_MovtosMaster AS MM " + "INNER JOIN Inv_TipoMovtos as TM ON TM.CveTipoMov = MM.CveTipoMov " + "where NoMovimiento = @NoMovimiento"; dt = db.SelectDA(Sql, ArrParametros); return(dt); }
public SqlDataAdapter RegistroActivo(int HideCveArt) { SqlDataAdapter dt = null; string Sql = " SELECT CveArticulo, CodigoAlterno, CodigoBarra, CodigoSat, Fecha_Alta, " + " Descripcion, Modelo, CveLinea, CveMarca, CveClase1, " + " CveClase2, CveClase3, CveImpuesto, CveUMedida1, CveUMedida2, " + " UMedidaEquiv2, EsInventa, DispVenta, EsServicio, DispKit, " + " EsKit, FecUltCompra, CveProveedorUlt, Foto, Observacion, " + " Estatus, CveImpIEPS, CveImpRetIVA, CveImpRetISR, CveImpOtro, " + " RequiereReceta " + " FROM Inv_CatArticulos " + " WHERE Estatus = 1 AND " + (HideCveArt == 1? "CodigoBarra = @CveArticulo": " CveArticulo =@CveArticulo "); dt = db.SelectDA(Sql, ArrParametros); return(dt); }
public SqlDataAdapter ListDocumentos(String CodAlm, String FIni, String FFin, String CveDc, String CvS) { String StrSql = ""; if (!CodAlm.Equals("0") && !CodAlm.Equals("")) { StrSql = " AND Alm.ClaveAlmacen = '" + CodAlm + "'"; } if (!CvS.Equals("0") && !CvS.Equals("")) { StrSql += " AND M.CveSucursal = '" + CvS + "'"; } SqlDataAdapter dt = null; string Sql = "SELECT M.idMov,M.Documento,M.Serie,M.NumDoc,M.ClaveAlmacen, Alm.Descripcion 'Almacén'," + " M.FechaExpedicion as 'Fec Exp',M.Impuesto,M.Descuento,M.SubTotal,M.Total,M.CveProveedor," + " M.EsperaAceptacion, M.DocOrigen,M.CveSucursal, S.Nombre as Sucursal, P.Nombre AS Proveedor, " + " M.NoFactura " + " FROM DocCab AS M " + " INNER JOIN Inv_CatAlmacenes AS Alm ON M.ClaveAlmacen = Alm.ClaveAlmacen " + " INNER JOIN CatProveedores AS P ON P.CveProveedor = M.CveProveedor" + " LEFT JOIN CatSucursales S ON S.CveSucursal = M.CveSucursal " + " WHERE M.Estatus = 1" + " AND (CONVERT(date,M.FechaExpedicion) BETWEEN '" + FIni + "' AND '" + FFin + "')" + " AND CveDoc = '" + CveDc + "' " + StrSql; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListTipoMovtos() { SqlDataAdapter dt = null; string Sql = "Select CveTipoMov,Descripcion " + "from Inv_TipoMovtos"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter ListLstPrecios() { SqlDataAdapter dt = null; string Sql = "Select CveLstPrecio,Nombre " + "from Inv_LstPreciosMast WHERE Estatus = 1"; dt = db.SelectDA(Sql); return(dt); }
public SqlDataAdapter Kardex() { SqlDataAdapter dt = null; string Sql = "SELECT D.FechaMovimiento as Fecha, IIF(D.EntSal='E',A.Descripcion, ' '+A.Descripcion) as 'Concepto', " + "IIF(D.EntSal='E',D.Cantidad, null) as 'Cantidad_Entrada', IIF(D.EntSal='E',D.Precio, null) as 'Precio_Entrada', IIF(D.EntSal='E',D.Precio*D.Cantidad, null) as 'Total_Entrada'," + "IIF(D.EntSal='S',D.Cantidad, null) as 'Cantidad_Salida', null as 'Precio_Salida', IIF(D.EntSal='S',D.Precio*D.Cantidad, null) as 'Total_Salida'," + "null as 'Cantidad_Saldo', null as 'Precio_Prom', null as 'Total_Saldo' " + "FROM Inv_MovtosDetalles D JOIN Inv_TipoMovtos A ON D.CveTipoMov=A.CveTipoMov " + "WHERE D.CveArticulo = @CveArticulo AND D.CveAlmacenMov = @CveAlmacenMov " + "AND D.Cantidad>0 " + "AND D.Cancelado = 1 " + "ORDER BY Fecha ASC "; dt = db.SelectDA(Sql, ArrParametros); return(dt); }
private void CargarRegistrosDB() { string sql = "exec GetArbolDeSeguridad"; dtA = db.SelectDA(sql); Ds = new DataSet(); dtA.Fill(Ds); DataTable tablaArbol = Ds.Tables.Add("TablaArbol"); tablaArbol.Columns.Add("Modulo", typeof(string)); tablaArbol.Columns.Add("Nombre", typeof(string)); tablaArbol.Columns.Add("Tipo", typeof(string)); tablaArbol.Columns.Add("idNodo", typeof(string)); tablaArbol.Columns.Add("idPadre", typeof(string)); for (int j = 0; j < Ds.Tables[0].Rows.Count; j++) { object[] tmp = Ds.Tables[0].Rows[j].ItemArray; tablaArbol.Rows.Add(tmp); } }