Exemplo n.º 1
0
        public void CloseRequest(Int32? requestId, RequestStatus status)
        {
            if (requestId == null)
                throw new ArgumentException();

            var connection = new SqlConnection(ConnectionString);
            var cmd = new SqlCommand("dbo.CloseRequest", connection)
            {CommandType = System.Data.CommandType.StoredProcedure};

            cmd.Parameters.Add(new SqlParameter("RequestId", System.Data.SqlDbType.NVarChar)).Value = requestId;
            cmd.Parameters.Add(new SqlParameter("Status", System.Data.SqlDbType.NChar)).Value = status.Key;

            ExecuteCommand(connection, cmd);
        }
Exemplo n.º 2
0
 public void CloseRequest(RequestStatus status)
 {
     var requestId = HttpContext.Current.Items[Keys.REQUEST_ID_KEY] as int?;
     _LoggerDao.CloseRequest(requestId, status);
 }