예제 #1
0
        public void DeleteRecibo(Recibo recibo)
        {
            try
            {
                SybaseEngine SybaseEngine = new SybaseEngine(Configuration.SybaseConnectionString);

                List <IDataParameter> parameters = new List <IDataParameter>
                {
                    new AseParameter("@NumRec", AseDbType.Integer)
                    {
                        Value = recibo.NumRec
                    }
                };
                SybaseEngine.ExecuteNonQuery
                (
                    SP.Pruebas.Usp_Uno_GrlPruebaReciboArq_Eli,
                    CommandType.StoredProcedure,
                    parameters
                );
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
예제 #2
0
        public void UpdateRecibo(Recibo recibo)
        {
            try
            {
                SybaseEngine SybaseEngine = new SybaseEngine(Configuration.SybaseConnectionString);

                List <IDataParameter> parameters = new List <IDataParameter>
                {
                    new AseParameter("@NumRec", AseDbType.Integer)
                    {
                        Value = recibo.NumRec
                    },
                    new AseParameter("@Oficina", AseDbType.VarChar, 10)
                    {
                        Value = recibo.Oficina
                    },
                    new AseParameter("@Cotizacion", AseDbType.VarChar, 10)
                    {
                        Value = recibo.Cotizacion
                    },
                    new AseParameter("@Folio", AseDbType.VarChar, 10)
                    {
                        Value = recibo.Folio
                    },
                    new AseParameter("@PrimaNeta", AseDbType.Decimal, 10)
                    {
                        Value = recibo.PrimaNeta, Precision = 2
                    }
                };
                SybaseEngine.ExecuteNonQuery
                (
                    SP.Pruebas.Usp_Uno_GrlPruebaReciboArq_Act,
                    CommandType.StoredProcedure,
                    parameters
                );
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }