Exemplo n.º 1
0
        //----------------------
        // Insert DocRef
        //----------------------
        public bool Ins_DocRef(string cDocCodigo, string cDocRefCodigo, DateTime dDocRefFecReg)
        {
            bool exito = false;

            try
            {
                BE_ReqDocRef  ReqConAsiento = new BE_ReqDocRef();
                DA_ConAsiento ObjConAsiento = new DA_ConAsiento();

                ReqConAsiento.cDocCodigo    = cDocCodigo;
                ReqConAsiento.cDocRefCodigo = cDocRefCodigo;
                ReqConAsiento.dDocRefFecReg = dDocRefFecReg;

                if (!ObjConAsiento.Ins_DocRef(ReqConAsiento))
                {
                    throw new ApplicationException("Se encontraron errores en la transaccion: [Ins_DocRef].!");
                }
                else
                {
                    exito = true;
                }
            }
            catch (Exception)
            {
                throw;
            }
            return(exito);
        }