コード例 #1
0
        //----------------------
        // Insert DocVigencia
        //----------------------
        public bool Ins_DocVigencia(string cDocCodigo, DateTime dFechaIni, DateTime dFechaFin)
        {
            bool exito = false;

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

                ReqConAsiento.cDocCodigo = cDocCodigo;
                ReqConAsiento.dFechaIni  = dFechaIni;
                ReqConAsiento.dFechaFin  = dFechaFin;

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