Пример #1
0
        public Boolean InsertTabNexo_DBF_DAL(string correlat, string folioLi, string folioNc, string folioNd, string folioRe, string cdEstado, string codSuc)
        {
            bool      transacction   = false;
            ExecuteBD conn           = new ExecuteBD();
            int       filasAfectadas = -1;
            string    Tabla          = "TAB_NEXO.DBF";

            try
            {
                string Sql = "INSERT INTO " + Tabla +
                             @" (correlat,folio_li,folio_nc,folio_nd,folio_re,cdestado,cod_suc)
                        VALUES ('" + correlat +
                             "','" + folioLi +
                             "','" + folioNc +
                             "','" + folioNd +
                             "','" + folioRe +
                             "','" + cdEstado +
                             "','" + codSuc + "')";

                filasAfectadas = Convert.ToInt32(conn.ExecuteNonQueryFox(Sql, conn.RutaTabla(Tabla, "CJTABNEXO")));

                if (filasAfectadas > 0)
                {
                    transacction = true;
                }
            }
            catch (Exception ex)
            {
                objParam.GrabarErrores(FechaServidor, Environment.MachineName, Environment.MachineName, ParametrosPagoAutoData.P_int_codigo_modulo, "Error SqlException : " + ex.ToString(), false,
                                       ParametrosPagoAutoData.P_int_codigo_error_Sql_exceptions,
                                       ParametrosPagoAutoData.P_str_codigo_moduloServicio + "/DataAccess/InsertTabNexo");
                transacction = false;
            }
            return(transacction);
        }
Пример #2
0
        public Boolean ActualizacionMOVDIA_DBF_DAL(string rutDeudor, string demandante, string codSucursal, string codCajero, string tipoPago, string numOpe,
                                                   string numCuota, string banco, string numDocumento, string plaza, double mtoDoc, double correlativo,
                                                   string folio, DateTime fechaPago, string hora, string esta_liqui, string num_caja)
        {
            bool      transacction   = false;
            double    filasAfectadas = 0;
            ExecuteBD conn           = new ExecuteBD();
            DateTime  fechaAux       = new DateTime(1899, 12, 30);
            string    Tabla          = "MOVDIA.DBF";

            try
            {
                string Sql = "UPDATE " + Tabla +
                             " SET fec_pag = " + ((fechaPago.Equals(fechaAux)) ? "{  /  /    }" : "DATE(" + fechaPago.Year.ToString() + "," + fechaPago.Month.ToString() + "," + fechaPago.Day.ToString() + ")") +
                             ", hora_pago = '" + hora +
                             "', cod_cajero = '" + codCajero +
                             "', esta_liq = '" + esta_liqui +
                             "', tip_pag = '" + tipoPago +
                             "', correlat = '" + correlativo +
                             "', num_caj = '" + num_caja +
                             "' WHERE rut_deu = '" + rutDeudor +
                             "' AND cod_cli = '" + demandante +
                             "' AND esta_liq = 'P'";

                filasAfectadas = Convert.ToInt32(conn.ExecuteNonQueryFox(Sql, conn.RutaTabla(Tabla, "LQMOVDIA")));

                if (filasAfectadas > 0)
                {
                    transacction = true;
                }
            }

            catch (Exception ex)
            {
                objParam.GrabarErrores(FechaServidor, Environment.MachineName, Environment.MachineName, ParametrosPagoAutoData.P_int_codigo_modulo, "Error SqlException : " + ex.ToString(), false,
                                       ParametrosPagoAutoData.P_int_codigo_error_Sql_exceptions,
                                       ParametrosPagoAutoData.P_str_codigo_moduloServicio + "/DataAccess/ActualizacionMOVDIA_DBF_DAL");
                transacction = false;
            }

            return(transacction);
        }
Пример #3
0
        public Boolean ActualizacionTab_Prov_DBF_DAL(string rutcliente, string demandante, string correlat, string cod_cajero, DateTime fec_caja, string estado, string hor_caja, DateTime fechaPago)
        {
            bool      transacction   = false;
            ExecuteBD conn           = new ExecuteBD();
            DateTime  fechaAux       = new DateTime(1899, 12, 30);
            int       filasAfectadas = 0;
            string    Tabla          = "TAB_PROV.DBF";

            try
            {
                string query = " update " + Tabla +
                               " set fec_caja  =" + ((fechaPago.Equals(fechaAux)) ? "{  /  /    }" : "DATE(" + fechaPago.Year.ToString() + "," + fechaPago.Month.ToString() + "," + fechaPago.Day.ToString() + ")") +
                               ", correlat='" + correlat + "'" +
                               ", hor_caja='" + hor_caja + "'" +
                               ", cod_cajero='" + cod_cajero + "'" +
                               ", estado= '" + estado + "'" +
                               "  where Rut_Deu= '" + rutcliente + "'" +
                               "  and cod_cli='" + demandante + "'" +
                               "  and clase='ND'" +
                               "  and estado='P'";

                filasAfectadas = Convert.ToInt32(conn.ExecuteNonQueryFox(query, conn.RutaTabla(Tabla, "LQTAB_PROV")));

                if (filasAfectadas > 0)
                {
                    transacction = true;
                }
            }
            catch (Exception ex)
            {
                objParam.GrabarErrores(FechaServidor, Environment.MachineName, Environment.MachineName, ParametrosPagoAutoData.P_int_codigo_modulo, "Error SqlException : " + ex.ToString(), false,
                                       ParametrosPagoAutoData.P_int_codigo_error_Sql_exceptions,
                                       ParametrosPagoAutoData.P_str_codigo_moduloServicio + "/DataAccess/ActualizacionTab_Prov_DBF_DAL");
                transacction = false;
            }

            return(transacction);
        }
Пример #4
0
        public Boolean InsertarMovTos_DBF_DAL(string correlat, string rutDeudor, string codCajero, string tipoMov, string tip_liq
                                              , string tip_pag_tos, string cod_cli, double mto_oper, DateTime fec_oper, string hor_oper, DateTime fec_dia, string cod_suc)
        {
            bool      transacction   = false;
            ExecuteBD conn           = new ExecuteBD();
            DateTime  fechaAux       = new DateTime(1899, 12, 30);
            string    Tabla          = "MOVTOS.DBF";
            int       filasAfectadas = 0;
            string    num_doc        = "";
            string    banco          = "";
            string    plaza          = "";
            string    cod_tran       = "";
            string    anombrede      = "";
            string    estado         = "";
            string    cam_est        = "";
            string    suc_reneg      = "";
            string    fol_reneg      = "";
            string    cod_eje        = "";
            string    num_caj        = "";
            int       cod_folio      = 0;
            int       num_com        = 0;
            int       mtocap         = 0;
            int       mtohon         = 0;
            string    rutgirad       = "";
            string    nomgirad       = "";
            string    sub_tipmov     = "";
            string    ambito         = "";
            string    folmul         = "";

            try
            {
                string Sql = "INSERT INTO " + Tabla +
                             @"(correlat
                               ,rut_deu
                               ,cod_cajero
                               ,tip_mov
                               ,tip_liq
                               ,tip_pag
                               ,cod_cli
                               ,mto_oper
                               ,num_doc
                               ,banco
                               ,fec_oper
                               ,hor_oper
                               ,fec_dia
                               ,cod_suc
                               ,plaza
                               ,cod_tran
                               ,anombrede
                               ,estado
                               ,fec_lib
                               ,cam_est
                               ,fec_recep
                               ,fec_reneg
                               ,suc_reneg
                               ,fol_reneg
                               ,cod_eje
                               ,num_caj
                               ,cod_folio
                               ,num_com
                               ,ven_doc
                               ,mtocap
                               ,mtohon
                               ,rutgirad
                               ,nomgirad
                               ,sub_tipmov
                               ,ambito
                               ,folmul)
                         VALUES
                               ('" + correlat +
                             "','" + rutDeudor +
                             "','" + codCajero +
                             "','" + tipoMov +
                             "','" + tip_liq +
                             "','" + tip_pag_tos +
                             "','" + cod_cli +
                             "'," + mto_oper +
                             ",'" + num_doc +
                             "','" + banco +
                             "'," + ((fec_oper.Equals(fechaAux)) ? "{  /  /    }" : "DATE(" + fec_oper.Year.ToString() + "," + fec_oper.Month.ToString() + "," + fec_oper.Day.ToString() + ")") +
                             ",'" + hor_oper +
                             "'," + ((fec_dia.Equals(fechaAux)) ? "{  /  /    }" : "DATE(" + fec_dia.Year.ToString() + "," + fec_dia.Month.ToString() + "," + fec_dia.Day.ToString() + ")") +
                             ",'" + cod_suc +
                             "','" + plaza +
                             "','" + cod_tran +
                             "','" + anombrede +
                             "','" + estado +
                             "',{  /  /    }" +
                             ",'" + cam_est +
                             "',{  /  /    }" +
                             ",{  /  /    }" +
                             ",'" + suc_reneg +
                             "','" + fol_reneg +
                             "','" + cod_eje +
                             "','" + num_caj +
                             "'," + cod_folio +
                             "," + num_com +
                             ",{  /  /    }" +
                             "," + mtocap +
                             "," + mtohon +
                             ",'" + rutgirad +
                             "','" + nomgirad +
                             "','" + sub_tipmov +
                             "','" + ambito +
                             "','" + folmul + "')";

                filasAfectadas = Convert.ToInt32(conn.ExecuteNonQueryFox(Sql, conn.RutaTabla(Tabla, "CJMOVTOS")));
                if (filasAfectadas > 0)
                {
                    transacction = true;
                }
            }
            catch (Exception ex)
            {
                objParam.GrabarErrores(FechaServidor, Environment.MachineName, Environment.MachineName, ParametrosPagoAutoData.P_int_codigo_modulo, "Error SqlException : " + ex.ToString(), false,
                                       ParametrosPagoAutoData.P_int_codigo_error_Sql_exceptions,
                                       ParametrosPagoAutoData.P_str_codigo_moduloServicio + "/DataAccess/InsertarMovTos_DBF_DAL");
                transacction = false;
            }

            return(transacction);
        }