public DAC(string Usuario, SqlConnection Connection) { _usuario = Usuario; buildDbSchema(); _connection = Connection; _dataQry = new SGDAC.DAC(_connection); }
public CapturaPagosVale(byte Caja, DateTime FOperacion, byte Consecutivo, int Folio) { buildDataTable(); _data = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); CargaValeCapturado(Caja, FOperacion, Consecutivo, Folio); }
public BCArchivo(int ConsecutivoReporte, string Periodo, SqlConnection Connection) { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // _consecutivoReporte = ConsecutivoReporte; _periodo = Periodo; _data = new SGDAC.DAC(Connection); dsReporte = new DataSet("Reporte"); dtSegmentosArchivo = new DataTable("Segmentos"); dtConfiguracionArchivo = new DataTable("Configuracion"); dtCaracteresReemplazo = new DataTable("CaracteresReemplazo"); BCConsultaSegmentos(); BCConsultaConfiguracionArchivo(); BCCatalogoCaracteresReemplazo(); }
public DataTable ConsultaReporte(DataRow Reporte, SqlParameter[] Parameters) { SGDAC.DAC consulta = new SGDAC.DAC(new SqlConnection("Data Source=" + Convert.ToString(Reporte["Servidor"]) + ";Initial Catalog=" + Convert.ToString(Reporte["BaseDatos"]) + ";User Id=" + _usuario + ";Password="******";")); consulta.QueryingTimeOut = 0; DataTable dtResultado = new DataTable("Resultado"); try { consulta.LoadData(dtResultado, Convert.ToString(Reporte["ProcedimientoOrigen"]), CommandType.StoredProcedure, Parameters, true); } catch (Exception ex) { throw ex; } finally { consulta.CloseConnection(); } return(dtResultado); }
private void actualizarLectura(SGDAC.DAC datos, int Lectura, DateTime FLectura, decimal Precio, int Porcentaje, string Imagen, string Observaciones, string Usuario) { SqlParameter[] param = new SqlParameter[7]; param[0] = new SqlParameter("@Lectura", SqlDbType.Int); param[0].Value = Lectura; param[1] = new SqlParameter("@FLectura", SqlDbType.DateTime); param[1].Value = FLectura; param[2] = new SqlParameter("@Precio", SqlDbType.Money); param[2].Value = Precio; //Descuento por cliente param[3] = new SqlParameter("@Porcentaje", SqlDbType.Int); param[3].Value = Porcentaje; param[4] = new SqlParameter("@Imagen", SqlDbType.Text); param[4].Value = Imagen; param[5] = new SqlParameter("@Observaciones", SqlDbType.VarChar); param[5].Value = Observaciones; param[6] = new SqlParameter("@Usuario", SqlDbType.VarChar); param[6].Value = Usuario; try { datos.ModifyData("spEDFActualizaLectura", CommandType.StoredProcedure, param); } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
private Datos() { // // TODO: Add constructor logic here // data = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); }
public Datos(SqlConnection Connection) { _connection = Connection; data = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); CargaCatalogos(); }
public DLControlPanel(SqlConnection Connection) { // // Required for Windows Form Designer support // InitializeComponent(); // // TODO: Add any constructor code after InitializeComponent call // initializeViewers(); dsMain = new DataSet(); dsMain.ReadXmlSchema(Application.StartupPath + @"\BCDatos.xsd"); _data = new SGDAC.DAC(Connection); try { BCConsultaParametros(); BCConsultaRangos(); _diasAjuste = Convert.ToInt32(Parametro("BCDiasAjuste")); _diasCreditoOperador = Convert.ToInt32(Parametro("BCDiasCreditoOP")); _clasificacionCarteraEmpresa = Convert.ToString(Parametro("BCClasCreditoCyC")); dataGrid1.DataSource = dsMain.Tables["Rango"]; } catch { } }
public short CapturaSolicitudCredito(SGDAC.DAC Data) { short consecutivo = 0; SqlParameter[] _param = new SqlParameter[5]; _param[0] = new SqlParameter("@Cliente", SqlDbType.Int); _param[0].Value = _cliente; _param[1] = new SqlParameter("@TipoSolicitud", SqlDbType.TinyInt); _param[1].Value = DBNull.Value; _param[2] = new SqlParameter("@Observaciones", SqlDbType.VarChar, 250); _param[2].Value = DBNull.Value; _param[3] = new SqlParameter("@UsuarioAlta", SqlDbType.VarChar, 10); _param[3].Value = _usuarioSolicitante; _param[4] = new SqlParameter("@Consecutivo", SqlDbType.TinyInt); _param[4].Direction = ParameterDirection.Output; try { Data.ModifyData("spCyCSCCapturaSolicitudCredito", CommandType.StoredProcedure, _param); consecutivo = Convert.ToByte(_param[4].Value); } catch (Exception ex) { throw ex; } return(consecutivo); }
public AutorizacionCredito(byte ClaveCreditoAutorizado, string Usuario, int Cliente, SqlConnection Connection) { _claveCreditoAutorizado = ClaveCreditoAutorizado; _usuarioAutorizacion = Usuario; _cliente = Cliente; _data = new SGDAC.DAC(Connection); }
public ExportacionCobranzaExterna(string Usuario, SqlConnection Connection) { // // TODO: Add constructor logic here // _usuario = Usuario; _dataAccess = new SGDAC.DAC(Connection); }
public ConfiguracionConexion(SqlConnection Connection) { _data = new SGDAC.DAC(Connection); _dtConnnections = new DataTable(); _dataComponents = new ArrayList(); consultaConfiguracionConexion(); configuracionDataObjects(); }
public CapturaPagosVale() { buildDataTable(); _data = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); ConsultaPromocionVigente(); Inicializacion(); }
public DLEDFImportacion(SqlConnection Connection) { // // TODO: Add constructor logic here // mainData = new SGDAC.DAC(Connection); //Main data controla la conexión a la base de datos principal conexiones = new EDFConfiguracionConexion.ConfiguracionConexion(Connection); }
public Programacion(int Cliente, byte Dia, byte CadaCuanto) { _Programa = enumPrograma.PM; _Cliente = Cliente; this.Dia = Dia; this.CadaCuanto = CadaCuanto; _data = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); }
public ReprogramacionPedido(string Usuario, SqlConnection Connection) { // // TODO: Add constructor logic here // _connection = Connection; _usuario = Usuario; _dataAccessLayer = new SGDAC.DAC(_connection); }
public SolicitudDataComponent(int Cliente, SqlConnection Connection) { // // TODO: Add constructor logic here // _data = new SGDAC.DAC(Connection); _cliente = Cliente; _connection = Connection; }
public ProcesamientoArchivoAbonosExternos() { try { _dataAccess = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); } catch (Exception ex) { throw ex; } }
public ExportaDatos() { try { _dataAccess = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); } catch (Exception ex) { throw ex; } }
public ModificacionCobranzaOperador(int CobranzaOrigen, int Operador, int ResponsableResguardoOperador, string Usuario) { _datos = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); dtDetalleRelacionCobranza = new DataTable("DetalleRelacionCobranza"); _cobranzaOrigen = CobranzaOrigen; _operador = Operador; _usuario = Usuario; _respResguardoOperador = ResponsableResguardoOperador; }
private void actualizarLecturaMedidor(SGDAC.DAC datos, int Lectura, int Consecutivo, double LecturaFinal, double DiferenciaLectura, double ConsumoLitros, decimal Importe, decimal Impuesto, decimal Total, decimal Redondeo, string Imagen, byte MotivoNoLectura, byte Reimpresiones) { SqlParameter[] param = new SqlParameter[12]; param[0] = new SqlParameter("@Lectura", SqlDbType.Int); param[0].Value = Lectura; param[1] = new SqlParameter("@Consecutivo", SqlDbType.Int); param[1].Value = Consecutivo; param[2] = new SqlParameter("@LecturaFinal", SqlDbType.Decimal); param[2].Value = LecturaFinal; param[3] = new SqlParameter("@DiferenciaLectura", SqlDbType.Decimal); param[3].Value = DiferenciaLectura; param[4] = new SqlParameter("@ConsumoLitros", SqlDbType.Decimal); param[4].Value = ConsumoLitros; param[5] = new SqlParameter("@Importe", SqlDbType.Money); param[5].Value = Importe; param[6] = new SqlParameter("@Impuesto", SqlDbType.Money); param[6].Value = Impuesto; param[7] = new SqlParameter("@Total", SqlDbType.Money); param[7].Value = Total; param[8] = new SqlParameter("@Redondeo", SqlDbType.Money); param[8].Value = Redondeo; param[9] = new SqlParameter("@Imagen", SqlDbType.Text); param[9].Value = Imagen; param[10] = new SqlParameter("@MotivoNoLectura", SqlDbType.TinyInt); if (MotivoNoLectura == 0) { param[10].Value = DBNull.Value; } else { param[10].Value = MotivoNoLectura; } param[11] = new SqlParameter("@Reimpresiones", SqlDbType.TinyInt); param[11].Value = Reimpresiones; try { datos.ModifyData("spEDFActualizaLecturaMedidor", CommandType.StoredProcedure, param); } catch (SqlException ex) { throw ex; } catch (Exception ex) { throw ex; } }
public IntegracionPreCapturaCobranza(SqlConnection Connection, DateTime FCobranza, string Usuario, byte TipoCobranza) { data = new SGDAC.DAC(Connection); _fCobranza = FCobranza; _usuario = Usuario; _tipoCobranza = TipoCobranza; this.tablaListaDocumentos(); this.tablaListaEmpleados(); }
public UDSDataRecovery(DataSet ConfigFile, SqlConnection Connection) { //this._Config = ConfigFile; //this._UDSConnection = new OleDbConnection(); //this._UDSConnection.ConnectionString = this._Config.Tables["MSAccess"].Rows[0]["ConnectionString"].ToString().Trim() + this._Config.Tables["MSAccess"].Rows[0]["DestinationPath"].ToString().Trim(); this._SGConnection = Connection; this.dtSuministros = new DataTable("Suministros"); //this.OLEdac = new OLEDBDAC.DAC(this._UDSConnection); this.SQLdac = new SGDAC.DAC(this._SGConnection); this._cargaInicial = true; }
public Programacion(int Cliente, SigaMetClasses.Enumeradores.enumCardinalidad Cardinalidad, SigaMetClasses.Enumeradores.enumDiaSemana Dia, byte CadaCuanto) { _Programa = enumPrograma.PC; _Cliente = Cliente; this.Cardinalidad = Cardinalidad; this.Dia = (byte)(Dia); this.CadaCuanto = CadaCuanto; _data = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); }
public Datos() { try { //_dataAccess = new SGDAC.DAC(new System.Data.SqlClient.SqlConnection(conexion)); _dataAccess = new SGDAC.DAC(SigaMetClasses.DataLayer.Conexion); } catch (Exception ex) { throw ex; } }
public DataClass(int Cliente, string Usuario, string NombreCliente, SqlConnection Connection) { // // TODO: Add constructor logic here // _cliente = Cliente; _usuario = Usuario; _nombre = NombreCliente; dsCatalogos = new DataSet("Catalgos"); dtListaSeguimiento = new DataTable("ListaSeguimiento"); _data = new SGDAC.DAC(Connection); }
public ListaSolicitudesCredito(SqlConnection Connection) { _connection = Connection; _data = new SGDAC.DAC(Connection); dtCatalogoCartera = new DataTable("CatalogoCartera"); dtListaSolicitudesCredito = new DataTable("ListaSolicitudCredito"); dtListaEjecutivos = new DataTable("ListaEjecutivo"); cargaCatalogoCartera(); cargaCatalogoEjecutivos(); }
public Datos(SqlConnection Connection, string Usuario, int ResponsableOp, int ResponsableCyC) { // // TODO: Add constructor logic here // _dac = new SGDAC.DAC(Connection); //construirListaRelacionesGeneradas(); _usuario = Usuario; _responsableOp = ResponsableOp; _responsableCyC = ResponsableCyC; ConsultaClasificacionCartera(); listaRelaciones(); }
private void actualizarInformacionOrigen(DSImportacion DS_Importacion) { try { foreach (EDFConfiguracionConexion.DataComponent datos in conexiones.DataComponents) { datos.DataComponentInstance.OpenConnection(); datos.DataComponentInstance.BeginTransaction(); } foreach (EDFImportacion.DSImportacion.LecturaRow lecturaRow in DS_Importacion.Lectura.Rows) { SGDAC.DAC datos = conexiones.consultaDataObjectCorporativo(Convert.ToInt32(lecturaRow["Corporativo"])).DataComponentInstance; actualizarLectura(datos, Convert.ToInt32(lecturaRow.Lectura), lecturaRow.FLecturaFinal, 0, //Descuento por cliente Convert.ToInt32(lecturaRow.PorcentajeTanque), lecturaRow.Imagen, lecturaRow.Observaciones, lecturaRow.Usuario); foreach (EDFImportacion.DSImportacion.LecturaMedidorRow lecturaMedidorRow in DS_Importacion.LecturaMedidor.Select("Corporativo = " + lecturaRow.Corporativo.ToString() + " AND Lectura = " + lecturaRow.Lectura)) { actualizarLecturaMedidor(datos, Convert.ToInt32(lecturaMedidorRow.Lectura), Convert.ToInt32(lecturaMedidorRow.Consecutivo), lecturaMedidorRow.LecturaFinal, lecturaMedidorRow.DiferenciaLectura, lecturaMedidorRow.ConsumoLitros, lecturaMedidorRow.Importe, lecturaMedidorRow.Impuesto, lecturaMedidorRow.Total, lecturaMedidorRow.Redondeo, lecturaMedidorRow.Imagen, Convert.ToByte(lecturaMedidorRow.MotivoNoLectura), Convert.ToByte(lecturaMedidorRow.NumeroImpresion)); } } foreach (EDFConfiguracionConexion.DataComponent datos in conexiones.DataComponents) { datos.DataComponentInstance.Transaction.Commit(); } } catch (Exception ex) { foreach (EDFConfiguracionConexion.DataComponent datos in conexiones.DataComponents) { datos.DataComponentInstance.Transaction.Rollback(); } throw ex; } finally { foreach (EDFConfiguracionConexion.DataComponent datos in conexiones.DataComponents) { datos.DataComponentInstance.CloseConnection(); } } }
public DataComponent(string Key, SGDAC.DAC DataComponent) { this.Key = Key; this.DataComponentInstance = DataComponent; }