Exemplo n.º 1
0
        public AgreeBase GetAgreeBase(long id)
        {
            try
            {
                List <OracleParameter> parameters = new List <OracleParameter>();
                parameters.AddRange(new List <OracleParameter> {
                    new OracleParameter()
                    {
                        ParameterName = "i_agree_id", OracleDbType = OracleDbType.Int64, Value = id
                    },
                    new OracleParameter()
                    {
                        ParameterName = "o_agree_rc", OracleDbType = OracleDbType.RefCursor, Direction = ParameterDirection.Output
                    }
                });

                AgreeBase cv = Execute_Get(AgreeBaseMaterializer.Instance, "procedure", parameters);

                return(cv);
            }
            catch (OracleException ex)
            {
                Logger.Error("GetAgreeBase: " + id + "\n\r" + ex.Message);

                return(null);
            }
        }
Exemplo n.º 2
0
        /// <summary>
        /// Returnes client visit by identifier
        /// </summary>
        /// <param name="id">Identifier of specified client visit</param>
        /// <returns>Instance of client visit</returns>
        public AgreeBase GetAgreeBase(long id)
        {
            AgreeBase agree = AgreeDao.Instance.GetAgreeBase(id);

            if (agree == null)
            {
                throw new DataObjectNotFoundException(string.Format("Заявление клиента с идентификатором {0} не найдено", id));
            }
            return(agree);
        }